@itwin/appui-react 5.0.4 → 5.1.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 +55 -38
- package/lib/appui-react/UiFramework.d.ts +1 -1
- package/lib/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/appui-react/UiFramework.js +46 -46
- package/lib/appui-react/UiFramework.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawCommandItems.js +1 -1
- package/lib/appui-react/accudraw/AccuDrawCommandItems.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawDialog.js +1 -1
- package/lib/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts +2 -0
- package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawFieldContainer.js +38 -26
- package/lib/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawInputField.d.ts +4 -2
- package/lib/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawInputField.js +45 -38
- package/lib/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawInputField.scss +0 -15
- package/lib/appui-react/accudraw/AccuDrawPopupManager.js +3 -3
- package/lib/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawUiSettings.js.map +1 -1
- package/lib/appui-react/accudraw/AccuDrawWidget.js +2 -2
- package/lib/appui-react/accudraw/AccuDrawWidget.js.map +1 -1
- package/lib/appui-react/accudraw/Calculator.js +1 -1
- package/lib/appui-react/accudraw/Calculator.js.map +1 -1
- package/lib/appui-react/accudraw/CalculatorPopup.js +1 -1
- package/lib/appui-react/accudraw/CalculatorPopup.js.map +1 -1
- package/lib/appui-react/accudraw/FrameworkAccuDraw.d.ts +2 -2
- package/lib/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/appui-react/accudraw/FrameworkAccuDraw.js +18 -15
- package/lib/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/appui-react/accudraw/MenuButton.js +1 -1
- package/lib/appui-react/accudraw/MenuButton.js.map +1 -1
- package/lib/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/appui-react/backstage/BackstageComposer.js +2 -3
- package/lib/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/appui-react/backstage/BackstageComposerItem.js +6 -6
- package/lib/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/appui-react/backstage/BackstageItem.js.map +1 -1
- package/lib/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
- package/lib/appui-react/backstage/BackstageManager.js +3 -3
- package/lib/appui-react/backstage/BackstageManager.js.map +1 -1
- package/lib/appui-react/backstage/InternalBackstageManager.js +2 -2
- package/lib/appui-react/backstage/InternalBackstageManager.js.map +1 -1
- package/lib/appui-react/configurableui/ActivityTracker.d.ts.map +1 -1
- package/lib/appui-react/configurableui/ActivityTracker.js +0 -1
- package/lib/appui-react/configurableui/ActivityTracker.js.map +1 -1
- package/lib/appui-react/configurableui/ConfigurableUiContent.js +6 -6
- package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/appui-react/configurableui/ConfigurableUiControl.js.map +1 -1
- package/lib/appui-react/configurableui/InternalConfigurableUiManager.d.ts +1 -1
- package/lib/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
- package/lib/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/appui-react/content/ContentControl.js +1 -1
- package/lib/appui-react/content/ContentControl.js.map +1 -1
- package/lib/appui-react/content/ContentGroup.js +7 -7
- package/lib/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/appui-react/content/ContentLayout.js +16 -17
- package/lib/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/appui-react/content/DefaultViewOverlay.js +1 -1
- package/lib/appui-react/content/DefaultViewOverlay.js.map +1 -1
- package/lib/appui-react/content/FloatingViewportContent.js +4 -4
- package/lib/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/appui-react/content/IModelViewport.d.ts +1 -1
- package/lib/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/appui-react/content/IModelViewport.js +1 -1
- package/lib/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/appui-react/content/InternalContentViewManager.js +26 -26
- package/lib/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/appui-react/content/ViewportContentControl.js +1 -1
- package/lib/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/appui-react/content/split-pane/SplitPane.js +2 -2
- package/lib/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/appui-react/cursor/CursorInformation.js +2 -2
- package/lib/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts +1 -1
- package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
- package/lib/appui-react/cursor/cursormenu/CursorMenu.js +3 -3
- package/lib/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.d.ts +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.js +3 -3
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +1 -1
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
- package/lib/appui-react/dialog/ContentDialog.js.map +1 -1
- package/lib/appui-react/dialog/ContentDialogManager.js +2 -2
- package/lib/appui-react/dialog/ContentDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/DialogManagerBase.js +4 -4
- package/lib/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/appui-react/dialog/InternalContentDialogManager.d.ts.map +1 -1
- package/lib/appui-react/dialog/InternalContentDialogManager.js +2 -3
- package/lib/appui-react/dialog/InternalContentDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/InternalModalDialogManager.js +1 -1
- package/lib/appui-react/dialog/InternalModalDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/InternalModelessDialogManager.d.ts.map +1 -1
- package/lib/appui-react/dialog/InternalModelessDialogManager.js +1 -2
- package/lib/appui-react/dialog/InternalModelessDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/ModalDialogManager.js +2 -2
- package/lib/appui-react/dialog/ModalDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/ModelessDialog.js +1 -1
- package/lib/appui-react/dialog/ModelessDialog.js.map +1 -1
- package/lib/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
- package/lib/appui-react/dialog/ModelessDialogManager.js +2 -3
- package/lib/appui-react/dialog/ModelessDialogManager.js.map +1 -1
- package/lib/appui-react/dialog/StandardMessageBox.js +1 -1
- package/lib/appui-react/dialog/StandardMessageBox.js.map +1 -1
- package/lib/appui-react/dialog/UiDataProvidedDialog.js.map +1 -1
- package/lib/appui-react/feedback/ElementTooltip.d.ts +1 -1
- package/lib/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/appui-react/feedback/ValidationTextbox.js.map +1 -1
- package/lib/appui-react/framework/FrameworkBackstage.js.map +1 -1
- package/lib/appui-react/framework/FrameworkContent.js +3 -3
- package/lib/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/appui-react/framework/FrameworkControls.js.map +1 -1
- package/lib/appui-react/framework/FrameworkDialogs.js +2 -2
- package/lib/appui-react/framework/FrameworkDialogs.js.map +1 -1
- package/lib/appui-react/framework/FrameworkFrontstages.js +8 -8
- package/lib/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
- package/lib/appui-react/framework/FrameworkToolSettings.js +1 -1
- package/lib/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/appui-react/frontstage/Frontstage.js.map +1 -1
- package/lib/appui-react/frontstage/FrontstageConfig.d.ts +5 -2
- package/lib/appui-react/frontstage/FrontstageConfig.d.ts.map +1 -1
- package/lib/appui-react/frontstage/FrontstageConfig.js.map +1 -1
- package/lib/appui-react/frontstage/FrontstageDef.d.ts +5 -1
- package/lib/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/appui-react/frontstage/FrontstageDef.js +22 -17
- package/lib/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/appui-react/frontstage/InternalFrontstageManager.js +29 -29
- package/lib/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/appui-react/frontstage/ModalSettingsStage.js +2 -2
- package/lib/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/appui-react/frontstage/NestedFrontstage.js +1 -1
- package/lib/appui-react/frontstage/NestedFrontstage.js.map +1 -1
- package/lib/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
- package/lib/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/appui-react/hooks/useActiveIModelConnection.js +1 -1
- package/lib/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
- package/lib/appui-react/hooks/useUiVisibility.js +1 -1
- package/lib/appui-react/hooks/useUiVisibility.js.map +1 -1
- package/lib/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
- package/lib/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -1
- package/lib/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
- package/lib/appui-react/keyboardshortcut/KeyboardShortcutProps.js.map +1 -1
- package/lib/appui-react/layout/StandardLayout.js.map +1 -1
- package/lib/appui-react/layout/backstage/Backstage.js.map +1 -1
- package/lib/appui-react/layout/backstage/Item.js.map +1 -1
- package/lib/appui-react/layout/backstage/Separator.js +1 -1
- package/lib/appui-react/layout/backstage/Separator.js.map +1 -1
- package/lib/appui-react/layout/base/usePointerCaptor.d.ts +1 -1
- package/lib/appui-react/layout/base/usePointerCaptor.d.ts.map +1 -1
- package/lib/appui-react/layout/footer/dialog/Dialog.js.map +1 -1
- package/lib/appui-react/layout/footer/dialog/TitleBar.js.map +1 -1
- package/lib/appui-react/layout/footer/snap-mode/Panel.js.map +1 -1
- package/lib/appui-react/layout/footer/snap-mode/Snap.js.map +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/Dialog.js.map +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/Instruction.js.map +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/Item.js.map +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/NewDot.js +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/NewDot.js.map +1 -1
- package/lib/appui-react/layout/footer/tool-assistance/Separator.js.map +1 -1
- package/lib/appui-react/layout/outline/SectionOutline.js.map +1 -1
- package/lib/appui-react/layout/popup/Tooltip.js.map +1 -1
- package/lib/appui-react/layout/state/internal/PanelStateHelpers.js +1 -1
- package/lib/appui-react/layout/state/internal/PanelStateHelpers.js.map +1 -1
- package/lib/appui-react/layout/state/internal/TabStateHelpers.js +6 -6
- package/lib/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
- package/lib/appui-react/layout/state/internal/ToolSettingsStateHelpers.js +6 -6
- package/lib/appui-react/layout/state/internal/ToolSettingsStateHelpers.js.map +1 -1
- package/lib/appui-react/layout/state/internal/WidgetStateHelpers.js +13 -13
- package/lib/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
- package/lib/appui-react/layout/target/TargetContainer.js.map +1 -1
- package/lib/appui-react/layout/target/useAllowedSideTarget.js +1 -1
- package/lib/appui-react/layout/target/useAllowedSideTarget.js.map +1 -1
- package/lib/appui-react/layout/tool-settings/Docked.js +1 -1
- package/lib/appui-react/layout/tool-settings/Docked.js.map +1 -1
- package/lib/appui-react/layout/tool-settings/Handle.js.map +1 -1
- package/lib/appui-react/layout/tool-settings/Overflow.js.map +1 -1
- package/lib/appui-react/layout/tool-settings/Panel.js +1 -1
- package/lib/appui-react/layout/tool-settings/Panel.js.map +1 -1
- package/lib/appui-react/layout/tool-settings/Setting.js.map +1 -1
- package/lib/appui-react/layout/widget/Menu.js +1 -1
- package/lib/appui-react/layout/widget/Menu.js.map +1 -1
- package/lib/appui-react/layout/widget/MenuTab.js.map +1 -1
- package/lib/appui-react/layout/widget/NavigationArea.js.map +1 -1
- package/lib/appui-react/layout/widget/Tab.js +1 -1
- package/lib/appui-react/layout/widget/Tab.js.map +1 -1
- package/lib/appui-react/layout/widget/TabBar.js +1 -1
- package/lib/appui-react/layout/widget/TabBar.js.map +1 -1
- package/lib/appui-react/layout/widget/ToolsArea.js.map +1 -1
- package/lib/appui-react/layout/widget/Widget.js.map +1 -1
- package/lib/appui-react/layout/widget/tools/button/Button.js.map +1 -1
- package/lib/appui-react/layout/widget/tools/button/Expandable.js.map +1 -1
- package/lib/appui-react/layout/widget-panels/Expander.js +1 -1
- package/lib/appui-react/layout/widget-panels/Expander.js.map +1 -1
- package/lib/appui-react/layout/widget-panels/Grip.d.ts.map +1 -1
- package/lib/appui-react/layout/widget-panels/Grip.js +3 -3
- package/lib/appui-react/layout/widget-panels/Grip.js.map +1 -1
- package/lib/appui-react/layout/widget-panels/Panel.d.ts.map +1 -1
- package/lib/appui-react/layout/widget-panels/useAnimatePanel.d.ts.map +1 -1
- package/lib/appui-react/messages/InputField.js +2 -2
- package/lib/appui-react/messages/InputField.js.map +1 -1
- package/lib/appui-react/messages/MessageManager.d.ts +4 -4
- package/lib/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/appui-react/messages/MessageManager.js +25 -25
- package/lib/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/appui-react/messages/MessageRenderer.js.map +1 -1
- package/lib/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/appui-react/messages/Pointer.js +7 -7
- package/lib/appui-react/messages/Pointer.js.map +1 -1
- package/lib/appui-react/messages/ReactNotifyMessageDetails.d.ts +2 -2
- package/lib/appui-react/messages/ReactNotifyMessageDetails.d.ts.map +1 -1
- package/lib/appui-react/messages/ReactNotifyMessageDetails.js.map +1 -1
- package/lib/appui-react/navigationaids/CubeNavigationAidControl.js +2 -2
- package/lib/appui-react/navigationaids/CubeNavigationAidControl.js.map +1 -1
- package/lib/appui-react/navigationaids/DrawingNavigationAidControl.js +2 -2
- package/lib/appui-react/navigationaids/DrawingNavigationAidControl.js.map +1 -1
- package/lib/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/appui-react/navigationaids/SheetNavigationAid.js +2 -2
- package/lib/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
- package/lib/appui-react/navigationaids/SheetsModalFrontstage.js +8 -8
- package/lib/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts +1 -1
- package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
- package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js +3 -3
- package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/appui-react/pickers/ListPicker.d.ts +1 -0
- package/lib/appui-react/pickers/ListPicker.d.ts.map +1 -1
- package/lib/appui-react/pickers/ListPicker.js +11 -10
- package/lib/appui-react/pickers/ListPicker.js.map +1 -1
- package/lib/appui-react/pickers/ViewSelector.d.ts +1 -0
- package/lib/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/appui-react/pickers/ViewSelector.js +7 -6
- package/lib/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/appui-react/popup/CardPopup.js +2 -2
- package/lib/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/appui-react/popup/ComponentPopup.js.map +1 -1
- package/lib/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/appui-react/popup/InputEditorPopup.js.map +1 -1
- package/lib/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/appui-react/popup/KeyinPalettePanel.js +2 -3
- package/lib/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/appui-react/popup/KeyinPalettePopup.js +1 -1
- package/lib/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/appui-react/popup/PopupManager.d.ts +1 -1
- package/lib/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/appui-react/popup/PopupManager.js +4 -4
- package/lib/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/appui-react/popup/PositionPopup.js +2 -2
- package/lib/appui-react/popup/PositionPopup.js.map +1 -1
- package/lib/appui-react/popup/ToolSettingsPopup.js.map +1 -1
- package/lib/appui-react/popup/ToolbarPopup.js +1 -1
- package/lib/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/appui-react/preview/PreviewFeatures.d.ts +3 -5
- package/lib/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
- package/lib/appui-react/preview/PreviewFeatures.js +1 -2
- package/lib/appui-react/preview/PreviewFeatures.js.map +1 -1
- package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.d.ts +5 -0
- package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.d.ts.map +1 -0
- package/lib/appui-react/preview/{allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.js → allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.js} +5 -5
- package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.js.map +1 -0
- package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.d.ts +1 -1
- package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.d.ts.map +1 -1
- package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js +1 -1
- package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js.map +1 -1
- package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts +1 -1
- package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts.map +1 -1
- package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.js.map +1 -1
- package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts +1 -4
- package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts.map +1 -1
- package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js +13 -13
- package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -1
- package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.d.ts +1 -1
- package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.d.ts.map +1 -1
- package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js +1 -1
- package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js.map +1 -1
- package/lib/appui-react/preview/widget-action-dropdown/MoreButton.d.ts +1 -1
- package/lib/appui-react/preview/widget-action-dropdown/MoreButton.d.ts.map +1 -1
- package/lib/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
- package/lib/appui-react/redux/ConfigurableUiState.d.ts.map +1 -1
- package/lib/appui-react/redux/ConfigurableUiState.js +1 -1
- package/lib/appui-react/redux/ConfigurableUiState.js.map +1 -1
- package/lib/appui-react/redux/FrameworkState.js.map +1 -1
- package/lib/appui-react/redux/ReducerRegistry.js +1 -1
- package/lib/appui-react/redux/ReducerRegistry.js.map +1 -1
- package/lib/appui-react/redux/SessionState.d.ts.map +1 -1
- package/lib/appui-react/redux/SessionState.js.map +1 -1
- package/lib/appui-react/redux/StateManager.js +2 -2
- package/lib/appui-react/redux/StateManager.js.map +1 -1
- package/lib/appui-react/redux/connectIModel.js +1 -1
- package/lib/appui-react/redux/connectIModel.js.map +1 -1
- package/lib/appui-react/redux/redux-ts.js.map +1 -1
- package/lib/appui-react/selection/SelectionContextItemDef.js +2 -2
- package/lib/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/appui-react/settings/SettingsManager.js +1 -1
- package/lib/appui-react/settings/SettingsManager.js.map +1 -1
- package/lib/appui-react/settings/quantityformatting/QuantityFormat.js +3 -3
- package/lib/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
- package/lib/appui-react/settings/ui/UiSettingsPage.js +5 -5
- package/lib/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/appui-react/shared/ActionButtonItemDef.js +1 -1
- package/lib/appui-react/shared/ActionButtonItemDef.js.map +1 -1
- package/lib/appui-react/shared/AnyItemDef.js.map +1 -1
- package/lib/appui-react/shared/AnyToolbarItemDef.js.map +1 -1
- package/lib/appui-react/shared/CommandItemDef.js +1 -1
- package/lib/appui-react/shared/CommandItemDef.js.map +1 -1
- package/lib/appui-react/shared/CustomItemDef.js +1 -1
- package/lib/appui-react/shared/CustomItemDef.js.map +1 -1
- package/lib/appui-react/shared/CustomItemProps.js.map +1 -1
- package/lib/appui-react/shared/GroupItemProps.js.map +1 -1
- package/lib/appui-react/shared/ItemDefBase.js.map +1 -1
- package/lib/appui-react/shared/ItemMap.js +1 -1
- package/lib/appui-react/shared/ItemMap.js.map +1 -1
- package/lib/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/appui-react/shared/MenuItem.js +1 -1
- package/lib/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/appui-react/shared/ToolItemDef.js +1 -1
- package/lib/appui-react/shared/ToolItemDef.js.map +1 -1
- package/lib/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
- package/lib/appui-react/stagepanels/StagePanelDef.js +2 -2
- package/lib/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/appui-react/statusbar/Field.js.map +1 -1
- package/lib/appui-react/statusbar/Indicator.js +2 -2
- package/lib/appui-react/statusbar/Indicator.js.map +1 -1
- package/lib/appui-react/statusbar/LabelIndicator.js +2 -2
- package/lib/appui-react/statusbar/LabelIndicator.js.map +1 -1
- package/lib/appui-react/statusbar/Overflow.js.map +1 -1
- package/lib/appui-react/statusbar/Separator.js +1 -1
- package/lib/appui-react/statusbar/Separator.js.map +1 -1
- package/lib/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/appui-react/statusbar/StatusBarComposer.js +6 -6
- package/lib/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/appui-react/statusbar/StatusBarItem.js.map +1 -1
- package/lib/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
- package/lib/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
- package/lib/appui-react/statusbar/dialog/Button.js.map +1 -1
- package/lib/appui-react/statusbar/dialog/Dialog.js.map +1 -1
- package/lib/appui-react/statusbar/dialog/TitleBar.js.map +1 -1
- package/lib/appui-react/statusbar/popup/Popup.js +2 -2
- package/lib/appui-react/statusbar/popup/Popup.js.map +1 -1
- package/lib/appui-react/statusfields/ActivityCenter.js +2 -2
- package/lib/appui-react/statusfields/ActivityCenter.js.map +1 -1
- package/lib/appui-react/statusfields/SectionsField.js.map +1 -1
- package/lib/appui-react/statusfields/SelectionCount.js.map +1 -1
- package/lib/appui-react/statusfields/SelectionInfo.js +2 -2
- package/lib/appui-react/statusfields/SelectionInfo.js.map +1 -1
- package/lib/appui-react/statusfields/SelectionScope.js +3 -3
- package/lib/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/appui-react/statusfields/SnapMode.js +2 -2
- package/lib/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/appui-react/statusfields/ViewAttributes.d.ts +1 -1
- package/lib/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/appui-react/statusfields/ViewAttributes.js +1 -1
- package/lib/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/appui-react/statusfields/message-center/MessageCenterField.js +1 -1
- package/lib/appui-react/statusfields/message-center/MessageCenterField.js.map +1 -1
- package/lib/appui-react/statusfields/message-center/MessageCenterMessage.js.map +1 -1
- package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts +1 -1
- package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
- package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
- package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +5 -5
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/appui-react/syncui/InternalSyncUiEventDispatcher.js +2 -2
- package/lib/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -1
- package/lib/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/appui-react/syncui/SyncUiEventDispatcher.js +3 -8
- package/lib/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
- package/lib/appui-react/syncui/UiSyncEvent.js +1 -1
- package/lib/appui-react/syncui/UiSyncEvent.js.map +1 -1
- package/lib/appui-react/theme/ThemeManager.js +1 -1
- package/lib/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/appui-react/toolbar/GroupItem.js +1 -1
- package/lib/appui-react/toolbar/GroupItem.js.map +1 -1
- package/lib/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarComposer.js +3 -3
- package/lib/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarHelper.js +4 -4
- package/lib/appui-react/toolbar/ToolbarHelper.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarItemUtilities.js +1 -1
- package/lib/appui-react/toolbar/ToolbarItemUtilities.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarItemsManager.js +10 -10
- package/lib/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
- package/lib/appui-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Badge.d.ts +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Badge.d.ts.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Badge.js +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Badge.js.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/GroupItem.js +2 -2
- package/lib/appui-react/toolbar/new-toolbars/GroupItem.js.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Item.js +1 -1
- package/lib/appui-react/toolbar/new-toolbars/Item.js.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/ToolGroup.js.map +1 -1
- package/lib/appui-react/toolbar/new-toolbars/useOverflow.d.ts.map +1 -1
- package/lib/appui-react/toolbar/useDefaultToolbarItems.js +1 -1
- package/lib/appui-react/toolbar/useDefaultToolbarItems.js.map +1 -1
- package/lib/appui-react/toolbar/useUiItemsProviderToolbarItems.js +1 -1
- package/lib/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
- package/lib/appui-react/tools/CoreToolDefinitions.js +2 -2
- package/lib/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/appui-react/tools/KeyinPaletteTools.d.ts +1 -1
- package/lib/appui-react/tools/OpenSettingsTool.d.ts +1 -1
- package/lib/appui-react/tools/RestoreLayoutTool.d.ts +2 -2
- package/lib/appui-react/tools/ToolbarItems.js +1 -1
- package/lib/appui-react/tools/ToolbarItems.js.map +1 -1
- package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.d.ts.map +1 -1
- package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -3
- package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
- package/lib/appui-react/toolsettings/InternalToolSettingsManager.js +2 -2
- package/lib/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
- package/lib/appui-react/toolsettings/ToolInformation.js +1 -1
- package/lib/appui-react/toolsettings/ToolInformation.js.map +1 -1
- package/lib/appui-react/toolsettings/ToolUiProvider.js +1 -1
- package/lib/appui-react/toolsettings/ToolUiProvider.js.map +1 -1
- package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +5 -5
- package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.js +1 -1
- package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -4
- package/lib/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +3 -3
- package/lib/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -3
- package/lib/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -1
- package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/appui-react/ui-items-provider/UiItemsManager.js +3 -3
- package/lib/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/appui-react/uiadmin/FrameworkUiAdmin.js +3 -3
- package/lib/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
- package/lib/appui-react/uistate/AppUiSettings.js +2 -2
- package/lib/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/appui-react/uistate/LocalStateStorage.js +1 -1
- package/lib/appui-react/uistate/LocalStateStorage.js.map +1 -1
- package/lib/appui-react/uistate/UiStateStorage.js +1 -1
- package/lib/appui-react/uistate/UiStateStorage.js.map +1 -1
- package/lib/appui-react/uistate/useReduxFrameworkState.js +1 -1
- package/lib/appui-react/uistate/useReduxFrameworkState.js.map +1 -1
- package/lib/appui-react/uistate/useUiStateStorage.js +1 -1
- package/lib/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/appui-react/utils/PropsHelper.js +5 -5
- package/lib/appui-react/utils/PropsHelper.js.map +1 -1
- package/lib/appui-react/utils/RectangleProps.js.map +1 -1
- package/lib/appui-react/utils/SizeProps.js.map +1 -1
- package/lib/appui-react/utils/ViewUtilities.d.ts.map +1 -1
- package/lib/appui-react/utils/ViewUtilities.js.map +1 -1
- package/lib/appui-react/utils/getActiveViewport.js +1 -1
- package/lib/appui-react/utils/getActiveViewport.js.map +1 -1
- package/lib/appui-react/widget-panels/DockedBar.js.map +1 -1
- package/lib/appui-react/widget-panels/Frontstage.js +7 -7
- package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/appui-react/widget-panels/StatusBar.js +5 -5
- package/lib/appui-react/widget-panels/StatusBar.js.map +1 -1
- package/lib/appui-react/widget-panels/Tab.js +4 -4
- package/lib/appui-react/widget-panels/Tab.js.map +1 -1
- package/lib/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
- package/lib/appui-react/widget-panels/ToolSettings.js +8 -5
- package/lib/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/appui-react/widgets/BackstageAppButton.js +2 -2
- package/lib/appui-react/widgets/BackstageAppButton.js.map +1 -1
- package/lib/appui-react/widgets/BasicNavigationWidget.js +1 -1
- package/lib/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/appui-react/widgets/BasicToolWidget.js +1 -1
- package/lib/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/appui-react/widgets/ContentToolWidgetComposer.js +1 -1
- package/lib/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/appui-react/widgets/NavigationWidgetComposer.js +10 -10
- package/lib/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/appui-react/widgets/StatusBarWidgetComposerControl.js +1 -1
- package/lib/appui-react/widgets/StatusBarWidgetComposerControl.js.map +1 -1
- package/lib/appui-react/widgets/ToolWidgetComposer.js +1 -1
- package/lib/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/appui-react/widgets/ViewToolWidgetComposer.js +1 -1
- package/lib/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/appui-react/widgets/Widget.js.map +1 -1
- package/lib/appui-react/widgets/WidgetControl.js +1 -1
- package/lib/appui-react/widgets/WidgetControl.js.map +1 -1
- package/lib/appui-react/widgets/WidgetDef.js +21 -21
- package/lib/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/appui-react/widgets/WidgetManager.d.ts.map +1 -1
- package/lib/appui-react/widgets/useWidget.d.ts.map +1 -1
- package/lib/appui-react.js +1 -1
- package/lib/appui-react.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +0 -15
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +0 -15
- package/package.json +18 -18
- package/lib/appui-react/layout/widget/tools/button/Back.d.ts +0 -21
- package/lib/appui-react/layout/widget/tools/button/Back.d.ts.map +0 -1
- package/lib/appui-react/layout/widget/tools/button/Back.js +0 -23
- package/lib/appui-react/layout/widget/tools/button/Back.js.map +0 -1
- package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.d.ts +0 -5
- package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.d.ts.map +0 -1
- package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.js.map +0 -1
- package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.d.ts +0 -5
- package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.d.ts.map +0 -1
- package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.js +0 -13
- package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtonItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ActionButtonItemDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,
|
|
1
|
+
{"version":3,"file":"ActionButtonItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ActionButtonItemDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,qDAAqD;AAErD;;;GAGG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,WAAW;IAY3D,YAAY,SAAoB,EAAE,cAAmC;QACnE,KAAK,CAAC,SAAS,CAAC,CAAC;QAiBnB,qFAAqF;QAC9E,oBAAe,GAAG,CAAC,IAAe,EAAE,EAAE;YAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QAlBA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,mEAAmE;IAC5D,OAAO;QACZ,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;YACzD,IAAI,IAAI,CAAC,eAAe,CAAC,cAAc;gBACrC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC;;gBACjE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,IAAI,CAAC,eAAe;YAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAOD,sDAAsD;IAC/C,YAAY,CAAC,WAAwB;QAC1C,IAAI,SAAS,GAAG,mBAAmB,CAAC,iBAAiB,CAAC;QACtD,IAAI,IAAI,CAAC,IAAI;YACX,SAAS;gBACP,WAAW,KAAK,WAAW,CAAC,UAAU;oBACpC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;oBACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAEzB,OAAO,SAAS,CAAC;IACnB,CAAC;;AApCD,qDAAqD;AACvC,qCAAiB,GAAG,EAAE,AAAL,CAAM","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 Item\n */\n\nimport type { CommandHandler, OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/components-react\";\nimport { ItemDefBase } from \"./ItemDefBase.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\nimport type { SizeProps } from \"../utils/SizeProps.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Abstract base class that is used by classes to execute an action when pressed.\n * @public\n * @deprecated in 4.15.0. Use type specific utilities for creating items instead, i.e. `ToolbarItemUtilities.createActionItem`.\n */\nexport abstract class ActionButtonItemDef extends ItemDefBase {\n private _onItemExecuted?: OnItemExecutedFunc;\n\n /** Command Handler for the action button */\n protected _commandHandler?: CommandHandler;\n /** Parameters passed to the Command Handler */\n public parameters?: any;\n /** Size of the action button, as set by handleSizeKnown */\n public size?: SizeProps;\n /** The default button size for all action buttons */\n public static defaultButtonSize = 42;\n\n constructor(itemProps: ItemProps, onItemExecuted?: OnItemExecutedFunc) {\n super(itemProps);\n\n this.execute = this.execute.bind(this);\n this._onItemExecuted = onItemExecuted;\n }\n\n /** Called when the action button is invoked by a click or touch */\n public execute(): void {\n if (this._commandHandler && this._commandHandler.execute) {\n if (this._commandHandler.getCommandArgs)\n this._commandHandler.execute(this._commandHandler.getCommandArgs());\n else this._commandHandler.execute(this._commandHandler.parameters);\n }\n\n if (this._onItemExecuted) this._onItemExecuted(this);\n }\n\n /** Called when the size of the action button is initialized and the size is known */\n public handleSizeKnown = (size: SizeProps) => {\n this.size = size;\n };\n\n /** Determines the dimension in a given orientation */\n public getDimension(orientation: Orientation): number {\n let dimension = ActionButtonItemDef.defaultButtonSize;\n if (this.size)\n dimension =\n orientation === Orientation.Horizontal\n ? this.size.width\n : this.size.height;\n\n return dimension;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnyItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/AnyItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { GroupItemDef } from \"../toolbar/GroupItem.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport type { CommandItemDef } from \"./CommandItemDef.js\";\nimport type { ToolItemDef } from \"./ToolItemDef.js\";\n\n/* eslint-disable
|
|
1
|
+
{"version":3,"file":"AnyItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/AnyItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { GroupItemDef } from \"../toolbar/GroupItem.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport type { CommandItemDef } from \"./CommandItemDef.js\";\nimport type { ToolItemDef } from \"./ToolItemDef.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Union of all Item definitions that can be specified in a GroupItem\n * @public\n * @deprecated in 4.15.0. Use type specific item definitions instead, i.e. {@link ToolbarItem}.\n */\nexport type AnyItemDef =\n | GroupItemDef\n | CommandItemDef\n | ToolItemDef\n | ActionButtonItemDef;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnyToolbarItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/AnyToolbarItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { AnyItemDef } from \"./AnyItemDef.js\";\nimport type { CustomItemDef } from \"./CustomItemDef.js\";\n\n/** Union of all Item definitions that can be specified in a Toolbar\n * @public\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"AnyToolbarItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/AnyToolbarItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { AnyItemDef } from \"./AnyItemDef.js\";\nimport type { CustomItemDef } from \"./CustomItemDef.js\";\n\n/** Union of all Item definitions that can be specified in a Toolbar\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type AnyToolbarItemDef = AnyItemDef | CustomItemDef;\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module Item
|
|
7
7
|
*/
|
|
8
8
|
import { ActionButtonItemDef } from "./ActionButtonItemDef.js";
|
|
9
|
-
/* eslint-disable
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
10
10
|
/** An Item that executes a Command.
|
|
11
11
|
* @public
|
|
12
12
|
* @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CommandItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,
|
|
1
|
+
{"version":3,"file":"CommandItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CommandItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,qDAAqD;AAErD;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,mBAAmB;IAKrD,YACE,gBAAkC,EAClC,cAAmC;QAEnC,KAAK,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QANnC,cAAS,GAAW,EAAE,CAAC;QAQ5B,IAAI,gBAAgB,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,eAAe,GAAG;gBACrB,OAAO,EAAE,gBAAgB,CAAC,OAAO;gBACjC,UAAU,EAAE,gBAAgB,CAAC,UAAU;gBACvC,cAAc,EAAE,gBAAgB,CAAC,cAAc;aAChD,CAAC;QACJ,CAAC;QAED,IAAI,gBAAgB,CAAC,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC;aACvE,CAAC;YACJ,cAAc,CAAC,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,eAAe,GAAG,cAAc,CAAC,IAAI,CAAC;QACxE,CAAC;IACH,CAAC;IAED,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;;AA3Bc,mBAAI,GAAG,CAAC,AAAJ,CAAK;AACV,8BAAe,GAAG,UAAU,AAAb,CAAc","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Item\n */\n\nimport type { OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport type { CommandItemProps } from \"./ItemProps.js\";\nimport type { ToolbarActionItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** An Item that executes a Command.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.\n */\nexport class CommandItemDef extends ActionButtonItemDef {\n private static _sId = 0;\n public static commandIdPrefix = \"Command-\";\n public commandId: string = \"\";\n\n constructor(\n commandItemProps: CommandItemProps,\n onItemExecuted?: OnItemExecutedFunc\n ) {\n super(commandItemProps, onItemExecuted);\n\n if (commandItemProps.execute) {\n this._commandHandler = {\n execute: commandItemProps.execute,\n parameters: commandItemProps.parameters,\n getCommandArgs: commandItemProps.getCommandArgs,\n };\n }\n\n if (commandItemProps.commandId) this.commandId = commandItemProps.commandId;\n else {\n CommandItemDef._sId++;\n this.commandId = CommandItemDef.commandIdPrefix + CommandItemDef._sId;\n }\n }\n\n public get id(): string {\n return this.commandId;\n }\n}\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module Item
|
|
7
7
|
*/
|
|
8
8
|
import { ActionButtonItemDef } from "./ActionButtonItemDef.js";
|
|
9
|
-
/* eslint-disable
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
10
10
|
/** An Item that renders a React component.
|
|
11
11
|
* @public
|
|
12
12
|
* @deprecated in 4.15.0. Use specific item type utilities instead, i.e. `ToolbarItemUtilities.createCustomItem`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CustomItemDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,
|
|
1
|
+
{"version":3,"file":"CustomItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CustomItemDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,qDAAqD;AAErD;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAMpD,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,KAAK,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;aAC9C,CAAC;YACJ,aAAa,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC;QACpE,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;IAC7C,CAAC;IAED,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;;AAnBc,kBAAI,GAAG,CAAC,CAAC;AACV,4BAAc,GAAG,SAAS,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Item\n */\n\nimport type * as React from \"react\";\nimport { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport type { CustomItemProps } from \"./CustomItemProps.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** An Item that renders a React component.\n * @public\n * @deprecated in 4.15.0. Use specific item type utilities instead, i.e. `ToolbarItemUtilities.createCustomItem`.\n */\nexport class CustomItemDef extends ActionButtonItemDef {\n private static _sId = 0;\n public static customIdPrefix = \"Custom-\";\n public customId: string;\n public popupPanelNode?: React.ReactNode;\n\n constructor(props: CustomItemProps) {\n super(props);\n\n if (props.customId) this.customId = props.customId;\n else {\n CustomItemDef._sId++;\n this.customId = CustomItemDef.customIdPrefix + CustomItemDef._sId;\n }\n\n this.popupPanelNode = props.popupPanelNode;\n }\n\n public get id(): string {\n return this.customId;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CustomItemProps.ts"],"names":[],"mappings":"","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 Item\n */\nimport type { ToolbarCustomItem } from \"../toolbar/ToolbarItem.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\n\n/** Definition for a Custom item that renders a React component.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarCustomItem}.\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"CustomItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/CustomItemProps.ts"],"names":[],"mappings":"","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 Item\n */\nimport type { ToolbarCustomItem } from \"../toolbar/ToolbarItem.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\n\n/** Definition for a Custom item that renders a React component.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarCustomItem}.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface CustomItemProps extends ItemProps {\n customId?: string;\n popupPanelNode?: React.ReactNode;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/GroupItemProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { StringGetter } from \"@itwin/appui-abstract\";\nimport type { AnyItemDef } from \"./AnyItemDef.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\nimport type { ToolbarGroupItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable
|
|
1
|
+
{"version":3,"file":"GroupItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/GroupItemProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type { StringGetter } from \"@itwin/appui-abstract\";\nimport type { AnyItemDef } from \"./AnyItemDef.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\nimport type { ToolbarGroupItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Definition for a Group item that opens a group of items.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarGroupItem}.\n */\nexport interface GroupItemProps extends ItemProps {\n defaultActiveItemId?: string;\n groupId?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n items: AnyItemDef[];\n itemsInColumn?: number;\n /** if set, it is used to explicitly set a label at top of open group component. */\n panelLabel?: string | StringGetter;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if panelLabel is not explicitly set. */\n panelLabelKey?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemDefBase.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemDefBase.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAQH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmBtD;;;GAGG;AACH,MAAM,OAAgB,WAA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,CAAC,WAAW,EACrB,SAAS,CAAC,cAAc,CACzB,CAAC;IACJ,CAAC;IAED,YAAY,SAAoB;QAnDxB,WAAM,GAAmD,EAAE,CAAC;QAC5D,aAAQ,GAAmD,EAAE,CAAC;QAC9D,iBAAY,GAAmD,EAAE,CAAC;QAEnE,cAAS,GAAY,KAAK,CAAC;QAC1B,cAAS,GAAY,KAAK,CAAC;QA+CjC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,IAAW,MAAM;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IAGD,2BAA2B;IAC3B,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,2BAA2B;IAC3B,IAAW,KAAK;QACd,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,CAAiD;QAC/D,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IAED,6BAA6B;IAC7B,IAAW,OAAO;QAChB,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,CAAiD;QACjE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,iCAAiC;IACjC,IAAW,WAAW;QACpB,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,CAAiD;QACrE,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IACxB,CAAC;CACF","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 Item\n */\n\nimport type * as React from \"react\";\nimport type {\n ConditionalBooleanValue,\n ConditionalStringValue,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { PropsHelper } from \"../utils/PropsHelper.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\nimport type { BadgeType, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable
|
|
1
|
+
{"version":3,"file":"ItemDefBase.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemDefBase.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAQH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmBtD;;;GAGG;AACH,MAAM,OAAgB,WAAW;IAO/B,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,IAAW,QAAQ,CAAC,CAAU;QAC5B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;IAaM,MAAM,CAAC,aAAa,CAAC,EAAe,EAAE,SAAoB;QAC/D,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACjC,EAAE,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;QAErC,EAAE,CAAC,SAAS;YACV,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAClE,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QAE5E,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QACnC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QAEnC,IAAI,SAAS,CAAC,eAAe,KAAK,SAAS;YACzC,EAAE,CAA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QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,CAAiD;QACjE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,iCAAiC;IACjC,IAAW,WAAW;QACpB,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,CAAiD;QACrE,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IACxB,CAAC;CACF","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 Item\n */\n\nimport type * as React from \"react\";\nimport type {\n ConditionalBooleanValue,\n ConditionalStringValue,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { PropsHelper } from \"../utils/PropsHelper.js\";\nimport type { ItemProps } from \"./ItemProps.js\";\nimport type { BadgeType, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Base state for any 'stateful' React component.\n * @public\n * @deprecated in 4.15.0. Define a custom state for your React components.\n */\nexport interface BaseItemState {\n isVisible?: boolean; // Default - true\n isEnabled?: boolean; // Default - true\n isActive?: boolean; // Default - false\n isPressed?: boolean; // Default - false\n}\n\n/** The base class for Items.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarItem}.\n */\nexport abstract class ItemDefBase {\n private _label: string | StringGetter | ConditionalStringValue = \"\";\n private _tooltip: string | StringGetter | ConditionalStringValue = \"\";\n private _description: string | StringGetter | ConditionalStringValue = \"\";\n\n public isPressed: boolean = false;\n private _isActive: boolean = false;\n public get isActive(): boolean {\n return this._isActive;\n }\n public set isActive(v: boolean) {\n this._isActive = v;\n }\n public applicationData?: any;\n\n public isHidden?: boolean | ConditionalBooleanValue;\n public isDisabled?: boolean | ConditionalBooleanValue;\n\n /** @deprecated in 4.16.0. Use `badgeKind` property instead. */\n public badgeType?: BadgeType;\n public badgeKind?: BadgeKind;\n\n public iconSpec?: IconSpec;\n public iconElement?: React.ReactNode;\n\n public static initializeDef(me: ItemDefBase, itemProps: ItemProps): void {\n me.isHidden = itemProps.isHidden;\n me.isDisabled = itemProps.isDisabled;\n\n me.isPressed =\n itemProps.isPressed !== undefined ? itemProps.isPressed : false;\n me.isActive = itemProps.isActive !== undefined ? itemProps.isActive : false;\n\n me.badgeType = itemProps.badgeType;\n me.badgeKind = itemProps.badgeKind;\n\n if (itemProps.applicationData !== undefined)\n me.applicationData = itemProps.applicationData;\n if (itemProps.iconSpec) me.iconSpec = itemProps.iconSpec;\n if (itemProps.icon) me.iconSpec = itemProps.icon;\n\n me._label = PropsHelper.getStringSpec(itemProps.label, itemProps.labelKey);\n me._tooltip = PropsHelper.getStringSpec(\n itemProps.tooltip,\n itemProps.tooltipKey\n );\n me._description = PropsHelper.getStringSpec(\n itemProps.description,\n itemProps.descriptionKey\n );\n }\n\n constructor(itemProps: ItemProps) {\n ItemDefBase.initializeDef(this, itemProps);\n }\n\n public get trayId() {\n return undefined;\n }\n public abstract get id(): string;\n\n /** Get the label string */\n public get rawLabel(): string | StringGetter | ConditionalStringValue {\n return this._label;\n }\n\n /** Get the label string */\n public get label(): string {\n return PropsHelper.getStringFromSpec(this._label);\n }\n\n /** Set the label.\n * @param v A string or a function to get the string.\n */\n public setLabel(v: string | StringGetter | ConditionalStringValue) {\n this._label = v;\n }\n\n /** Get the tooltip string */\n public get tooltip(): string {\n return PropsHelper.getStringFromSpec(this._tooltip);\n }\n\n /** Set the tooltip.\n * @param v A string or a function to get the string.\n */\n public setTooltip(v: string | StringGetter | ConditionalStringValue) {\n this._tooltip = v;\n }\n\n /** Get the description string */\n public get description(): string {\n return PropsHelper.getStringFromSpec(this._description);\n }\n\n /** Set the description.\n * @param v A string or a function to get the string.\n */\n public setDescription(v: string | StringGetter | ConditionalStringValue) {\n this._description = v;\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Item
|
|
7
7
|
*/
|
|
8
|
-
/* eslint-disable
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
9
9
|
/** Contains a map of Items.
|
|
10
10
|
* @public
|
|
11
11
|
* @deprecated in 4.15.0. Map for deprecated {@link ItemDefBase} class instances. Use `Map` to store your objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemMap.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemMap.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH,
|
|
1
|
+
{"version":3,"file":"ItemMap.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemMap.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH,qDAAqD;AAErD;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,GAAwB;IACnD,YAAY,KAAqB;QAC/B,KAAK,EAAE,CAAC;QAER,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAEM,OAAO,CAAC,IAAiB;QAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEM,QAAQ,CAAC,KAAoB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAiB,EAAE,EAAE;YAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAkB;IAC9C,YAAY,KAAqB;QAC/B,KAAK,EAAE,CAAC;QAER,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAEM,OAAO,CAAC,IAAiB;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;IAEM,QAAQ,CAAC,KAAoB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAiB,EAAE,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC;IACd,CAAC;CACF","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 Item\n */\n\nimport type { ItemDefBase } from \"./ItemDefBase.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Contains a map of Items.\n * @public\n * @deprecated in 4.15.0. Map for deprecated {@link ItemDefBase} class instances. Use `Map` to store your objects.\n */\nexport class ItemMap extends Map<string, ItemDefBase> {\n constructor(items?: ItemDefBase[]) {\n super();\n\n if (items && typeof items === \"object\") this.addItems(items);\n }\n\n public addItem(item: ItemDefBase) {\n this.set(item.id, item);\n }\n\n public addItems(items: ItemDefBase[]) {\n items.forEach((item: ItemDefBase) => {\n this.set(item.id, item);\n });\n }\n}\n\n/** Contains a list of Items.\n * @public\n * @deprecated in 4.15.0. List of deprecated {@link ItemDefBase} class instances. Use `Array` to store your objects.\n */\nexport class ItemList extends Array<ItemDefBase> {\n constructor(items?: ItemDefBase[]) {\n super();\n\n if (items && typeof items === \"object\") this.addItems(items);\n }\n\n public addItem(item: ItemDefBase) {\n this.push(item);\n }\n\n public addItems(items: ItemDefBase[]) {\n items.forEach((item: ItemDefBase) => {\n this.push(item);\n });\n }\n\n public get items(): ItemDefBase[] {\n return this;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type {\n ConditionalBooleanValue,\n ConditionalStringValue,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport type { BadgeType, IconProps, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport type { ToolbarActionItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable
|
|
1
|
+
{"version":3,"file":"ItemProps.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ItemProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Item\n */\n\nimport type {\n ConditionalBooleanValue,\n ConditionalStringValue,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport type { BadgeType, IconProps, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport type { ToolbarActionItem } from \"../toolbar/ToolbarItem.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Definition that specifies properties shared between many ConfigurableUi components.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.\n */\nexport interface ItemProps extends IconProps {\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item.\n * @deprecated in 4.16.0. Use `badgeKind` property instead.\n */\n badgeType?: BadgeType;\n /** Specifies the kind of badge, if any, to be overlaid on the item. */\n badgeKind?: BadgeKind;\n /** abstract icon definition, used when create itemDef from abstract item (ie. MenuItem) */\n icon?: IconSpec;\n\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n labelKey?: string;\n\n /** if set, it is used to explicitly set the description shown by a component. */\n description?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if description is not explicitly set. */\n descriptionKey?: string;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n tooltipKey?: string;\n}\n\n/** Properties for a Tool item with a tool id.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.\n */\nexport interface ToolItemProps extends ItemProps, CommandHandler {\n toolId: string;\n}\n\n/** Properties for a Command item.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.\n */\nexport interface CommandItemProps extends ItemProps, CommandHandler {\n commandId?: string;\n}\n\n/** Definition for a command handler.\n * @public\n * @deprecated in 4.15.0. Use specific item types instead, i.e. {@link ToolbarActionItem}.\n */\nexport interface CommandHandler {\n /** Function to execute */\n execute?: (args?: any) => any;\n /** Parameters passed to the function */\n parameters?: any;\n /** Function to get the parameters passed to the function */\n getCommandArgs?: () => any[];\n}\n"]}
|
|
@@ -47,7 +47,7 @@ export class MenuItem extends ItemDefBase {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
// eslint-disable-next-line
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
51
51
|
throw new UiError(UiFramework.loggerCategory("MenuItem"), `Either 'item', 'execute' or 'submenu' must be specified for '${props.id}'.`);
|
|
52
52
|
}
|
|
53
53
|
this.iconRightSpec = props.iconRight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/appui-react/shared/MenuItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkF/C;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAOvC,uIAAuI;IACvI,YAAY,KAA0B,EAAE,WAAwB;QAC9D,KAAK,CAAC,KAAK,CAAC,CAAC;QARP,QAAG,GAAG,EAAE,CAAC;QAUf,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,EAAY,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,GAAG,IAAI,cAAc,CAAC,KAAK,CAAC,IAAI,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ACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,UAAU,GAAY,uBAAuB,CAAC,QAAQ,CAC1D,IAAI,CAAC,UAAU,CAChB,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAErD,OAAO,CACL,oBAAC,cAAc,IACb,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACS,CAClB,CAAC;QACJ,CAAC;QAED,OAAO,CACL,oBAAC,eAAe,IACd,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EACjC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACU,CACnB,CAAC;IACJ,CAAC;CACF","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 Item\n */\n\nimport * as React from \"react\";\nimport type {\n AbstractMenuItemProps,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue, UiError } from \"@itwin/appui-abstract\";\nimport type { BadgeType, CommonProps, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport { ContextMenuItem, ContextSubMenu } from \"@itwin/core-react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport { CommandItemDef } from \"./CommandItemDef.js\";\nimport { ItemDefBase } from \"./ItemDefBase.js\";\nimport type { CommandItemProps } from \"./ItemProps.js\";\nimport type { ConditionalStringValue } from \"./ConditionalValue.js\";\n\n/** Properties for context menu items.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface CursorMenuItemProps extends CommonProps {\n /** The id for the menu item. */\n id: string;\n /** Icon to display. */\n iconNode?: React.ReactNode;\n /** Icon to display.\n * @deprecated in 4.16.0. Use {@link CursorMenuItemProps.iconNode} instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n iconSpec?: IconSpec;\n /** The item to execute when this item is invoked. Either 'item', 'submenu' or `execute` must be specified.\n * @deprecated in 4.15.0. Use properties of this object instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n item?: CommandItemProps;\n /** Function to execute. */\n execute?: () => any;\n /** Nested array of item props. Either 'item', 'submenu' or 'execute' must be specified. */\n submenu?: CursorMenuItemProps[];\n /** Icon to display on right side of the menu item.\n * Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id.\n */\n iconRight?: string | ConditionalStringValue;\n\n // #region \"ItemProps\" properties previously extended from deprecated type.\n\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item.\n * @deprecated in 4.16.0. Use `badgeKind` property instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n badgeType?: BadgeType;\n /** Specifies the kind of badge, if any, to be overlaid on the item. */\n badgeKind?: BadgeKind;\n /** Abstract icon definition. Used when creating itemDef from abstract item (ie. MenuItem).\n * @deprecated in 4.16.0. Use {@link CursorMenuItemProps.iconNode} instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n icon?: IconSpec;\n\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n labelKey?: string;\n\n /** if set, it is used to explicitly set the description shown by a component. */\n description?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if description is not explicitly set. */\n descriptionKey?: string;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n tooltipKey?: string;\n\n // #endregion \"ItemProps\"\n}\n\n/* eslint-disable deprecation/deprecation */\n\n/** Menu Item Properties\n * @public\n * @deprecated in 4.11.0. Please use {@link CursorMenuItemProps}.\n */\nexport type MenuItemProps = AbstractMenuItemProps;\n\n/** Menu Item\n * @alpha\n * @deprecated in 4.15.0. Used in a deprecated class {@link MenuItemHelpers}.\n */\nexport class MenuItem extends ItemDefBase {\n private _id = \"\";\n private _actionItem?: ActionButtonItemDef;\n private _submenu: MenuItem[];\n private _onSelection?: () => void;\n private _execute?: () => void;\n\n /** onSelection is an optional parameter typically supplied to allow menu parent to close context menu when a menu item is selected. */\n constructor(props: CursorMenuItemProps, onSelection?: () => void) {\n super(props);\n\n this._id = props.id;\n this._submenu = new Array<MenuItem>();\n this._onSelection = onSelection;\n\n if (props.item) {\n this._actionItem = new CommandItemDef(props.item);\n\n // Copy over icon, label & badgeType from the item\n if (!this.iconSpec) this.iconSpec = this._actionItem.iconSpec;\n if (!this.label) this.setLabel(this._actionItem.label);\n if (!this.badgeType) this.badgeType = this._actionItem.badgeType;\n if (!this.badgeKind) this.badgeKind = this._actionItem.badgeKind;\n if (!this.isDisabled) this.isDisabled = this._actionItem.isDisabled;\n } else if (props.execute) {\n this._execute = props.execute;\n } else if (props.submenu) {\n props.submenu.forEach((childProps: CursorMenuItemProps) => {\n const childItem = new MenuItem(childProps, onSelection);\n this._submenu.push(childItem);\n });\n } else {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(\"MenuItem\"),\n `Either 'item', 'execute' or 'submenu' must be specified for '${props.id}'.`\n );\n }\n\n this.iconRightSpec = props.iconRight;\n }\n\n public get id(): string {\n return this._id;\n }\n\n public get submenu(): MenuItem[] {\n return this._submenu;\n }\n\n public get actionItem(): ActionButtonItemDef | undefined {\n return this._actionItem;\n }\n\n public iconRightSpec?: IconSpec;\n\n public itemPicked(): void {\n setTimeout(() => {\n if (this._actionItem) this._actionItem.execute();\n else if (this._execute) this._execute();\n });\n\n if (this._onSelection) this._onSelection();\n }\n}\n\n/** Menu Item helper methods\n * @alpha\n * @deprecated in 4.15.0. Use {@link @itwin/core-react#ContextMenuItem} and {@link @itwin/core-react#ContextSubMenu} components.\n */\nexport class MenuItemHelpers {\n public static createMenuItems(\n itemPropsList: CursorMenuItemProps[],\n onSelection?: () => void\n ): MenuItem[] {\n const menuItems = new Array<MenuItem>();\n itemPropsList.forEach((itemProps: CursorMenuItemProps) => {\n menuItems.push(new MenuItem(itemProps, onSelection));\n });\n return menuItems;\n }\n\n public static createMenuItemNodes(itemList: MenuItem[]): React.ReactNode[] {\n const itemNodes: React.ReactNode[] = [];\n\n itemList.forEach((item: MenuItem, index: number) => {\n const reactItem = this.createMenuItemNode(item, index);\n if (reactItem) itemNodes.push(reactItem);\n });\n\n return itemNodes;\n }\n\n private static createMenuItemNode(\n item: MenuItem,\n index: number\n ): React.ReactNode {\n const label = item.label;\n const iconSpec = item.iconSpec;\n const iconRightSpec = item.iconRightSpec;\n const badgeType = item.badgeType;\n const badgeKind = item.badgeKind;\n const isDisabled: boolean = ConditionalBooleanValue.getValue(\n item.isDisabled\n );\n\n if (item.submenu && item.submenu.length > 0) {\n const items = this.createMenuItemNodes(item.submenu);\n\n return (\n <ContextSubMenu\n key={index}\n icon={iconSpec}\n label={label}\n badgeType={badgeType}\n badgeKind={badgeKind}\n disabled={isDisabled}\n >\n {items}\n </ContextSubMenu>\n );\n }\n\n return (\n <ContextMenuItem\n key={index}\n onSelect={() => item.itemPicked()}\n icon={iconSpec}\n iconRight={iconRightSpec}\n badgeType={badgeType}\n badgeKind={badgeKind}\n disabled={isDisabled}\n >\n {label}\n </ContextMenuItem>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/appui-react/shared/MenuItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkF/C;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAOvC,uIAAuI;IACvI,YAAY,KAA0B,EAAE,WAAwB;QAC9D,KAAK,CAAC,KAAK,CAAC,CAAC;QARP,QAAG,GAAG,EAAE,CAAC;QAUf,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,EAAY,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,KAAK,C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,CAAC,kBAAkB,CAC/B,IAAc,EACd,KAAa;QAEb,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,UAAU,GAAY,uBAAuB,CAAC,QAAQ,CAC1D,IAAI,CAAC,UAAU,CAChB,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAErD,OAAO,CACL,oBAAC,cAAc,IACb,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACS,CAClB,CAAC;QACJ,CAAC;QAED,OAAO,CACL,oBAAC,eAAe,IACd,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EACjC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACU,CACnB,CAAC;IACJ,CAAC;CACF","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 Item\n */\n\nimport * as React from \"react\";\nimport type {\n AbstractMenuItemProps,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue, UiError } from \"@itwin/appui-abstract\";\nimport type { BadgeType, CommonProps, IconSpec } from \"@itwin/core-react\";\nimport type { BadgeKind } from \"@itwin/core-react/internal\";\nimport { ContextMenuItem, ContextSubMenu } from \"@itwin/core-react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport { CommandItemDef } from \"./CommandItemDef.js\";\nimport { ItemDefBase } from \"./ItemDefBase.js\";\nimport type { CommandItemProps } from \"./ItemProps.js\";\nimport type { ConditionalStringValue } from \"./ConditionalValue.js\";\n\n/** Properties for context menu items.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface CursorMenuItemProps extends CommonProps {\n /** The id for the menu item. */\n id: string;\n /** Icon to display. */\n iconNode?: React.ReactNode;\n /** Icon to display.\n * @deprecated in 4.16.0. Use {@link CursorMenuItemProps.iconNode} instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iconSpec?: IconSpec;\n /** The item to execute when this item is invoked. Either 'item', 'submenu' or `execute` must be specified.\n * @deprecated in 4.15.0. Use properties of this object instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n item?: CommandItemProps;\n /** Function to execute. */\n execute?: () => any;\n /** Nested array of item props. Either 'item', 'submenu' or 'execute' must be specified. */\n submenu?: CursorMenuItemProps[];\n /** Icon to display on right side of the menu item.\n * Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id.\n */\n iconRight?: string | ConditionalStringValue;\n\n // #region \"ItemProps\" properties previously extended from deprecated type.\n\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item.\n * @deprecated in 4.16.0. Use `badgeKind` property instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n badgeType?: BadgeType;\n /** Specifies the kind of badge, if any, to be overlaid on the item. */\n badgeKind?: BadgeKind;\n /** Abstract icon definition. Used when creating itemDef from abstract item (ie. MenuItem).\n * @deprecated in 4.16.0. Use {@link CursorMenuItemProps.iconNode} instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n icon?: IconSpec;\n\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n labelKey?: string;\n\n /** if set, it is used to explicitly set the description shown by a component. */\n description?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if description is not explicitly set. */\n descriptionKey?: string;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | StringGetter | ConditionalStringValue;\n /** if set, it is used to define a key that is used to look up a localized string. This value is used only if label is not explicitly set. */\n tooltipKey?: string;\n\n // #endregion \"ItemProps\"\n}\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Menu Item Properties\n * @public\n * @deprecated in 4.11.0. Please use {@link CursorMenuItemProps}.\n */\nexport type MenuItemProps = AbstractMenuItemProps;\n\n/** Menu Item\n * @alpha\n * @deprecated in 4.15.0. Used in a deprecated class {@link MenuItemHelpers}.\n */\nexport class MenuItem extends ItemDefBase {\n private _id = \"\";\n private _actionItem?: ActionButtonItemDef;\n private _submenu: MenuItem[];\n private _onSelection?: () => void;\n private _execute?: () => void;\n\n /** onSelection is an optional parameter typically supplied to allow menu parent to close context menu when a menu item is selected. */\n constructor(props: CursorMenuItemProps, onSelection?: () => void) {\n super(props);\n\n this._id = props.id;\n this._submenu = new Array<MenuItem>();\n this._onSelection = onSelection;\n\n if (props.item) {\n this._actionItem = new CommandItemDef(props.item);\n\n // Copy over icon, label & badgeType from the item\n if (!this.iconSpec) this.iconSpec = this._actionItem.iconSpec;\n if (!this.label) this.setLabel(this._actionItem.label);\n if (!this.badgeType) this.badgeType = this._actionItem.badgeType;\n if (!this.badgeKind) this.badgeKind = this._actionItem.badgeKind;\n if (!this.isDisabled) this.isDisabled = this._actionItem.isDisabled;\n } else if (props.execute) {\n this._execute = props.execute;\n } else if (props.submenu) {\n props.submenu.forEach((childProps: CursorMenuItemProps) => {\n const childItem = new MenuItem(childProps, onSelection);\n this._submenu.push(childItem);\n });\n } else {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n throw new UiError(\n UiFramework.loggerCategory(\"MenuItem\"),\n `Either 'item', 'execute' or 'submenu' must be specified for '${props.id}'.`\n );\n }\n\n this.iconRightSpec = props.iconRight;\n }\n\n public get id(): string {\n return this._id;\n }\n\n public get submenu(): MenuItem[] {\n return this._submenu;\n }\n\n public get actionItem(): ActionButtonItemDef | undefined {\n return this._actionItem;\n }\n\n public iconRightSpec?: IconSpec;\n\n public itemPicked(): void {\n setTimeout(() => {\n if (this._actionItem) this._actionItem.execute();\n else if (this._execute) this._execute();\n });\n\n if (this._onSelection) this._onSelection();\n }\n}\n\n/** Menu Item helper methods\n * @alpha\n * @deprecated in 4.15.0. Use {@link @itwin/core-react#ContextMenuItem} and {@link @itwin/core-react#ContextSubMenu} components.\n */\nexport class MenuItemHelpers {\n public static createMenuItems(\n itemPropsList: CursorMenuItemProps[],\n onSelection?: () => void\n ): MenuItem[] {\n const menuItems = new Array<MenuItem>();\n itemPropsList.forEach((itemProps: CursorMenuItemProps) => {\n menuItems.push(new MenuItem(itemProps, onSelection));\n });\n return menuItems;\n }\n\n public static createMenuItemNodes(itemList: MenuItem[]): React.ReactNode[] {\n const itemNodes: React.ReactNode[] = [];\n\n itemList.forEach((item: MenuItem, index: number) => {\n const reactItem = this.createMenuItemNode(item, index);\n if (reactItem) itemNodes.push(reactItem);\n });\n\n return itemNodes;\n }\n\n private static createMenuItemNode(\n item: MenuItem,\n index: number\n ): React.ReactNode {\n const label = item.label;\n const iconSpec = item.iconSpec;\n const iconRightSpec = item.iconRightSpec;\n const badgeType = item.badgeType;\n const badgeKind = item.badgeKind;\n const isDisabled: boolean = ConditionalBooleanValue.getValue(\n item.isDisabled\n );\n\n if (item.submenu && item.submenu.length > 0) {\n const items = this.createMenuItemNodes(item.submenu);\n\n return (\n <ContextSubMenu\n key={index}\n icon={iconSpec}\n label={label}\n badgeType={badgeType}\n badgeKind={badgeKind}\n disabled={isDisabled}\n >\n {items}\n </ContextSubMenu>\n );\n }\n\n return (\n <ContextMenuItem\n key={index}\n onSelect={() => item.itemPicked()}\n icon={iconSpec}\n iconRight={iconRightSpec}\n badgeType={badgeType}\n badgeKind={badgeKind}\n disabled={isDisabled}\n >\n {label}\n </ContextMenuItem>\n );\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { IModelApp } from "@itwin/core-frontend";
|
|
9
9
|
import { ActionButtonItemDef } from "./ActionButtonItemDef.js";
|
|
10
|
-
/* eslint-disable
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
11
11
|
/** An Item that starts the execution of a Tool.
|
|
12
12
|
* @public
|
|
13
13
|
* @deprecated in 4.15.0. Use {@link ToolbarItemUtilities.createForTool} instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ToolItemDef.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,
|
|
1
|
+
{"version":3,"file":"ToolItemDef.js","sourceRoot":"","sources":["../../../src/appui-react/shared/ToolItemDef.ts"],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IAAI,CAAC;SAC/D,CAAC,CAAC;IACL,CAAC;CACF","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 Item\n */\n\nimport type { Tool } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport { ActionButtonItemDef } from \"./ActionButtonItemDef.js\";\nimport type { ToolItemProps } from \"./ItemProps.js\";\nimport type { ToolbarItemUtilities } from \"../toolbar/ToolbarItemUtilities.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** An Item that starts the execution of a Tool.\n * @public\n * @deprecated in 4.15.0. Use {@link ToolbarItemUtilities.createForTool} instead.\n */\nexport class ToolItemDef extends ActionButtonItemDef {\n public toolId: string = \"\";\n\n constructor(\n toolItemProps: ToolItemProps,\n onItemExecuted?: OnItemExecutedFunc\n ) {\n super(toolItemProps, onItemExecuted);\n\n if (toolItemProps.execute) {\n this._commandHandler = {\n execute: toolItemProps.execute,\n parameters: toolItemProps.parameters,\n getCommandArgs: toolItemProps.getCommandArgs,\n };\n }\n\n this.toolId = toolItemProps.toolId;\n }\n\n public get id(): string {\n return this.toolId;\n }\n\n /** Create a ToolItemDef that will run a registered tool.\n * @deprecated in 4.15.0. Use {@link ToolbarItemUtilities.createForTool} instead.\n */\n public static getItemDefForTool(\n tool: typeof Tool,\n icon?: string,\n ...args: any[]\n ): ToolItemDef {\n return new ToolItemDef({\n toolId: tool.toolId,\n icon: icon\n ? icon\n : tool.iconSpec && tool.iconSpec.length > 0\n ? tool.iconSpec\n : undefined,\n label: () => tool.flyover,\n description: () => tool.description,\n execute: async () => IModelApp.tools.run(tool.toolId, ...args),\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanelConfig.js","sourceRoot":"","sources":["../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Frontstage\n */\n\nimport type { WidgetConfig } from \"../widgets/WidgetConfig.js\";\nimport type { StagePanelState } from \"./StagePanelState.js\";\n\n/** Configuration from which a stage panel is created.\n * @public\n */\nexport interface StagePanelConfig {\n /** Default Panel state. Controls how the panel is initially displayed. Defaults to StagePanelState.Open. */\n readonly defaultState?: StagePanelState;\n /** Maximum size of the panel.\n * @deprecated in 4.12.0. Please use {@link StagePanelConfig.maxSizeSpec}.\n */\n readonly maxSize?: StagePanelMaxSizeSpec; // eslint-disable-line
|
|
1
|
+
{"version":3,"file":"StagePanelConfig.js","sourceRoot":"","sources":["../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Frontstage\n */\n\nimport type { WidgetConfig } from \"../widgets/WidgetConfig.js\";\nimport type { StagePanelState } from \"./StagePanelState.js\";\n\n/** Configuration from which a stage panel is created.\n * @public\n */\nexport interface StagePanelConfig {\n /** Default Panel state. Controls how the panel is initially displayed. Defaults to StagePanelState.Open. */\n readonly defaultState?: StagePanelState;\n /** Maximum size of the panel.\n * @deprecated in 4.12.0. Please use {@link StagePanelConfig.maxSizeSpec}.\n */\n readonly maxSize?: StagePanelMaxSizeSpec; // eslint-disable-line @typescript-eslint/no-deprecated\n /** Maximum size of the panel. */\n readonly maxSizeSpec?: StagePanelSizeSpec;\n /** Minimum size of the panel.\n * @deprecated in 4.12.0. Please use {@link StagePanelConfig.minSizeSpec}.\n */\n readonly minSize?: number;\n /** Minimum size of the panel. */\n readonly minSizeSpec?: StagePanelSizeSpec;\n /** Indicates whether the panel is pinned. Defaults to true. */\n readonly pinned?: boolean;\n /** Indicates whether the panel is resizable. Defaults to true. */\n readonly resizable?: boolean;\n /** Default size of the panel.\n * @deprecated in 4.12.0. Please use {@link StagePanelConfig.sizeSpec}.\n */\n readonly size?: number;\n /** Default size of the panel. */\n readonly sizeSpec?: StagePanelSizeSpec;\n /** Configuration of the panel sections. */\n readonly sections?: StagePanelSectionsConfig;\n}\n\n/** Configuration from which a stage panel section is created.\n * @public\n */\nexport type StagePanelSectionConfig = ReadonlyArray<WidgetConfig>;\n\n/** Configuration from which stage panel sections are created.\n * @public\n */\nexport interface StagePanelSectionsConfig {\n /** Configuration of the `start` section. */\n readonly start?: StagePanelSectionConfig;\n /** Configuration of the `end` section. */\n readonly end?: StagePanelSectionConfig;\n}\n\n/** Available units of panel max size. Pixels or percentage of App size.\n * @note Percentage of App `height` is used for top/bottom panel and percentage of App `width` is used for left/right panel.\n * @public\n * @deprecated in 4.12.0. Please use {@link StagePanelSizeSpec}.\n */\nexport type StagePanelMaxSizeSpec = number | { percentage: number };\n\n/** Available units of panel size - pixels or percentage of app size.\n * @note Percentage of App `height` is used for top/bottom panel and percentage of app `width` is used for left/right panel.\n * @public\n */\nexport type StagePanelSizeSpec = number | { percentage: number };\n"]}
|
|
@@ -18,7 +18,7 @@ import { StagePanelState } from "./StagePanelState.js";
|
|
|
18
18
|
* @beta
|
|
19
19
|
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
20
20
|
*/
|
|
21
|
-
// eslint-disable-next-line
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
22
22
|
export class PanelStateChangedEvent extends UiEvent {
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -56,7 +56,7 @@ export class StagePanelDef extends WidgetHost {
|
|
|
56
56
|
get size() {
|
|
57
57
|
const frontstageDef = UiFramework.frontstages.activeFrontstageDef;
|
|
58
58
|
const state = frontstageDef?.nineZoneState;
|
|
59
|
-
// eslint-disable-next-line
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
60
60
|
if (!state)
|
|
61
61
|
return this.initialConfig?.size;
|
|
62
62
|
const side = toPanelSide(this.location);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanelDef.js","sourceRoot":"","sources":["../../../src/appui-react/stagepanels/StagePanelDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAGvF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAMtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAWvD;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,sBAAuB,SAAQ,OAAmC;CAAG;AAiBlF;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAM3C,gCAAgC;IAChC;QACE,KAAK,EAAE,CAAC;QANF,cAAS,GAAuB,kBAAkB,CAAC,IAAI,CAAC;QACxD,WAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACpC,SAAI,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAK1C,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,MAA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AAC;AAEF,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,KAAoB,EAAE,IAAe;IACjE,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;AAC5E,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { Draft } from \"immer\";\nimport { produce } from \"immer\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager.js\";\nimport type { NineZoneState } from \"../layout/state/NineZoneState.js\";\nimport type { PanelSide } from \"../layout/widget-panels/PanelTypes.js\";\nimport { WidgetDef } from \"../widgets/WidgetDef.js\";\nimport { WidgetHost } from \"../widgets/WidgetHost.js\";\nimport type {\n StagePanelConfig,\n StagePanelSectionConfig,\n StagePanelSizeSpec,\n} from \"./StagePanelConfig.js\";\nimport { StagePanelLocation } from \"./StagePanelLocation.js\";\nimport { StagePanelSection } from \"./StagePanelSection.js\";\nimport { StagePanelState } from \"./StagePanelState.js\";\n\n/** Panel state changed event args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface PanelStateChangedEventArgs {\n panelDef: StagePanelDef;\n panelState: StagePanelState;\n}\n\n/** Panel state changed event class.\n * @beta\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class PanelStateChangedEvent extends UiEvent<PanelStateChangedEventArgs> {}\n\n/** @internal */\nexport interface PanelSizeChangedEventArgs {\n panelDef: StagePanelDef;\n size: number | undefined;\n}\n\n/** Panel pinned changed event args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface PanelPinnedChangedEventArgs {\n panelDef: StagePanelDef;\n pinned: boolean;\n}\n\n/**\n * A StagePanelDef represents each Stage Panel within a Frontstage.\n * @public\n */\nexport class StagePanelDef extends WidgetHost {\n private _initialConfig?: StagePanelConfig;\n private _location: StagePanelLocation = StagePanelLocation.Left;\n private _start = new StagePanelSectionDef();\n private _end = new StagePanelSectionDef();\n\n /** Constructor for PanelDef. */\n constructor() {\n super();\n }\n\n /** @internal */\n public static create(config: StagePanelConfig, location: StagePanelLocation) {\n const def = new StagePanelDef();\n def.initializeFromConfig(config, location);\n return def;\n }\n\n /** @internal */\n public initializeFromConfig(\n config: StagePanelConfig | undefined,\n location: StagePanelLocation\n ) {\n this._location = location;\n this._initialConfig = config;\n this._start.initializeFromConfig(config?.sections?.start);\n this._end.initializeFromConfig(config?.sections?.end);\n }\n\n /** @internal */\n public get initialConfig() {\n return this._initialConfig;\n }\n\n /** Current size of the panel.\n * @deprecated in 4.12.0. Use {@link StagePanelDef.sizeSpec} instead.\n */\n public get size(): number | undefined {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n // eslint-disable-next-line deprecation/deprecation\n if (!state) return this.initialConfig?.size;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.size;\n }\n\n public set size(size) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_SIZE\",\n side,\n size,\n });\n }\n\n /** Current size of the panel */\n public get sizeSpec(): StagePanelSizeSpec | undefined {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.initialConfig?.sizeSpec;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.size;\n }\n\n public set sizeSpec(size) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_SIZE\",\n side,\n size,\n });\n }\n\n /** @internal */\n public handleSizeChanged(size: number | undefined) {\n InternalFrontstageManager.onPanelSizeChangedEvent.emit({\n panelDef: this,\n size,\n });\n }\n\n /** Indicates whether the panel is resizable. */\n public get resizable(): boolean {\n return this.defaultResizable;\n }\n\n /** Indicates whether the panel is pinned. */\n public get pinned(): boolean {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.defaultPinned;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.pinned;\n }\n\n public set pinned(pinned: boolean) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_PINNED\",\n side,\n pinned,\n });\n }\n\n /** @internal */\n public handlePinnedChanged(pinned: boolean) {\n UiFramework.frontstages.onPanelPinnedChangedEvent.emit({\n panelDef: this,\n pinned,\n });\n }\n\n /** Location of panel. */\n public get location(): StagePanelLocation {\n return this._location;\n }\n\n /** Panel state. Defaults to PanelState.Open. */\n public get panelState(): StagePanelState {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.defaultState;\n const side = toPanelSide(this.location);\n return getPanelState(state, side);\n }\n\n public set panelState(panelState: StagePanelState) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n const collapsed = panelState === StagePanelState.Open ? false : true;\n frontstageDef.dispatch({\n type: \"PANEL_SET_COLLAPSED\",\n collapsed,\n side,\n });\n }\n\n /** @internal */\n public handlePanelStateChanged(panelState: StagePanelState) {\n UiFramework.frontstages.onPanelStateChangedEvent.emit({\n panelDef: this,\n panelState,\n });\n }\n\n /** @internal */\n public get defaultState() {\n const defaultState = this._initialConfig?.defaultState;\n return defaultState ?? StagePanelState.Open;\n }\n\n /** @internal */\n public get defaultPinned() {\n return this._initialConfig?.pinned ?? true;\n }\n\n /** @internal */\n public get defaultResizable() {\n return this._initialConfig?.resizable ?? true;\n }\n\n /** Gets the list of Widgets. */\n public override get widgetDefs(): ReadonlyArray<WidgetDef> {\n return [\n ...super.widgetDefs,\n ...this._start.widgetDefs,\n ...this._end.widgetDefs,\n ];\n }\n\n public override updateDynamicWidgetDefs(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n _section: StagePanelSection | undefined,\n allStageWidgetDefs: WidgetDef[]\n ) {\n this._start.updateDynamicWidgetDefs(\n stageId,\n stageUsage,\n location,\n StagePanelSection.Start,\n allStageWidgetDefs\n );\n this._end.updateDynamicWidgetDefs(\n stageId,\n stageUsage,\n location,\n StagePanelSection.End,\n allStageWidgetDefs\n );\n }\n\n /** @internal */\n public getPanelSectionDef(section: StagePanelSection) {\n switch (section) {\n case StagePanelSection.Start: {\n return this._start;\n }\n case StagePanelSection.End: {\n return this._end;\n }\n }\n }\n}\n\n/** @internal */\nexport class StagePanelSectionDef extends WidgetHost {\n /** @internal */\n public initializeFromConfig(config: StagePanelSectionConfig | undefined) {\n config?.forEach((widgetConfig) => {\n const widgetDef = WidgetDef.create(widgetConfig);\n this.addWidgetDef(widgetDef);\n });\n }\n}\n\n/** @internal */\nexport function toPanelSide(location: StagePanelLocation): PanelSide {\n switch (location) {\n case StagePanelLocation.Bottom:\n return \"bottom\";\n case StagePanelLocation.Left:\n return \"left\";\n case StagePanelLocation.Right:\n return \"right\";\n case StagePanelLocation.Top:\n return \"top\";\n }\n}\n\n/** @internal */\nexport const setPanelPinned: (\n nineZone: NineZoneState,\n side: PanelSide,\n pinned: boolean\n) => NineZoneState = produce(\n (nineZone: Draft<NineZoneState>, side: PanelSide, pinned: boolean) => {\n const panel = nineZone.panels[side];\n panel.pinned = pinned;\n }\n);\n\n/** @internal */\nexport function getPanelState(state: NineZoneState, side: PanelSide) {\n const panel = state.panels[side];\n return panel.collapsed ? StagePanelState.Minimized : StagePanelState.Open;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StagePanelDef.js","sourceRoot":"","sources":["../../../src/appui-react/stagepanels/StagePanelDef.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAGvF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAMtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAWvD;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,OAAO,sBAAuB,SAAQ,OAAmC;CAAG;AAiBlF;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAM3C,gCAAgC;IAChC;QACE,KAAK,EAAE,CAAC;QANF,cAAS,GAAuB,kBAAkB,CAAC,IAAI,CAAC;QACxD,WAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACpC,SAAI,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAK1C,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,MAAM,CAAC,MAAwB,EAAE,QAA4B;QACzE,MAAM,GAAG,GAAG,IAAI,aAAa,EAAE,CAAC;QAChC,GAAG,CAAC,oBAAoB,CAAC,MAAM,EAAE,QAAQ,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,CAAC;IACjC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;AAC5E,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { Draft } from \"immer\";\nimport { produce } from \"immer\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager.js\";\nimport type { NineZoneState } from \"../layout/state/NineZoneState.js\";\nimport type { PanelSide } from \"../layout/widget-panels/PanelTypes.js\";\nimport { WidgetDef } from \"../widgets/WidgetDef.js\";\nimport { WidgetHost } from \"../widgets/WidgetHost.js\";\nimport type {\n StagePanelConfig,\n StagePanelSectionConfig,\n StagePanelSizeSpec,\n} from \"./StagePanelConfig.js\";\nimport { StagePanelLocation } from \"./StagePanelLocation.js\";\nimport { StagePanelSection } from \"./StagePanelSection.js\";\nimport { StagePanelState } from \"./StagePanelState.js\";\n\n/** Panel state changed event args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface PanelStateChangedEventArgs {\n panelDef: StagePanelDef;\n panelState: StagePanelState;\n}\n\n/** Panel state changed event class.\n * @beta\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class PanelStateChangedEvent extends UiEvent<PanelStateChangedEventArgs> {}\n\n/** @internal */\nexport interface PanelSizeChangedEventArgs {\n panelDef: StagePanelDef;\n size: number | undefined;\n}\n\n/** Panel pinned changed event args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface PanelPinnedChangedEventArgs {\n panelDef: StagePanelDef;\n pinned: boolean;\n}\n\n/**\n * A StagePanelDef represents each Stage Panel within a Frontstage.\n * @public\n */\nexport class StagePanelDef extends WidgetHost {\n private _initialConfig?: StagePanelConfig;\n private _location: StagePanelLocation = StagePanelLocation.Left;\n private _start = new StagePanelSectionDef();\n private _end = new StagePanelSectionDef();\n\n /** Constructor for PanelDef. */\n constructor() {\n super();\n }\n\n /** @internal */\n public static create(config: StagePanelConfig, location: StagePanelLocation) {\n const def = new StagePanelDef();\n def.initializeFromConfig(config, location);\n return def;\n }\n\n /** @internal */\n public initializeFromConfig(\n config: StagePanelConfig | undefined,\n location: StagePanelLocation\n ) {\n this._location = location;\n this._initialConfig = config;\n this._start.initializeFromConfig(config?.sections?.start);\n this._end.initializeFromConfig(config?.sections?.end);\n }\n\n /** @internal */\n public get initialConfig() {\n return this._initialConfig;\n }\n\n /** Current size of the panel.\n * @deprecated in 4.12.0. Use {@link StagePanelDef.sizeSpec} instead.\n */\n public get size(): number | undefined {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (!state) return this.initialConfig?.size;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.size;\n }\n\n public set size(size) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_SIZE\",\n side,\n size,\n });\n }\n\n /** Current size of the panel */\n public get sizeSpec(): StagePanelSizeSpec | undefined {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.initialConfig?.sizeSpec;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.size;\n }\n\n public set sizeSpec(size) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_SIZE\",\n side,\n size,\n });\n }\n\n /** @internal */\n public handleSizeChanged(size: number | undefined) {\n InternalFrontstageManager.onPanelSizeChangedEvent.emit({\n panelDef: this,\n size,\n });\n }\n\n /** Indicates whether the panel is resizable. */\n public get resizable(): boolean {\n return this.defaultResizable;\n }\n\n /** Indicates whether the panel is pinned. */\n public get pinned(): boolean {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.defaultPinned;\n\n const side = toPanelSide(this.location);\n const panel = state.panels[side];\n return panel.pinned;\n }\n\n public set pinned(pinned: boolean) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n frontstageDef.dispatch({\n type: \"PANEL_SET_PINNED\",\n side,\n pinned,\n });\n }\n\n /** @internal */\n public handlePinnedChanged(pinned: boolean) {\n UiFramework.frontstages.onPanelPinnedChangedEvent.emit({\n panelDef: this,\n pinned,\n });\n }\n\n /** Location of panel. */\n public get location(): StagePanelLocation {\n return this._location;\n }\n\n /** Panel state. Defaults to PanelState.Open. */\n public get panelState(): StagePanelState {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n const state = frontstageDef?.nineZoneState;\n if (!state) return this.defaultState;\n const side = toPanelSide(this.location);\n return getPanelState(state, side);\n }\n\n public set panelState(panelState: StagePanelState) {\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const side = toPanelSide(this.location);\n const collapsed = panelState === StagePanelState.Open ? false : true;\n frontstageDef.dispatch({\n type: \"PANEL_SET_COLLAPSED\",\n collapsed,\n side,\n });\n }\n\n /** @internal */\n public handlePanelStateChanged(panelState: StagePanelState) {\n UiFramework.frontstages.onPanelStateChangedEvent.emit({\n panelDef: this,\n panelState,\n });\n }\n\n /** @internal */\n public get defaultState() {\n const defaultState = this._initialConfig?.defaultState;\n return defaultState ?? StagePanelState.Open;\n }\n\n /** @internal */\n public get defaultPinned() {\n return this._initialConfig?.pinned ?? true;\n }\n\n /** @internal */\n public get defaultResizable() {\n return this._initialConfig?.resizable ?? true;\n }\n\n /** Gets the list of Widgets. */\n public override get widgetDefs(): ReadonlyArray<WidgetDef> {\n return [\n ...super.widgetDefs,\n ...this._start.widgetDefs,\n ...this._end.widgetDefs,\n ];\n }\n\n public override updateDynamicWidgetDefs(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n _section: StagePanelSection | undefined,\n allStageWidgetDefs: WidgetDef[]\n ) {\n this._start.updateDynamicWidgetDefs(\n stageId,\n stageUsage,\n location,\n StagePanelSection.Start,\n allStageWidgetDefs\n );\n this._end.updateDynamicWidgetDefs(\n stageId,\n stageUsage,\n location,\n StagePanelSection.End,\n allStageWidgetDefs\n );\n }\n\n /** @internal */\n public getPanelSectionDef(section: StagePanelSection) {\n switch (section) {\n case StagePanelSection.Start: {\n return this._start;\n }\n case StagePanelSection.End: {\n return this._end;\n }\n }\n }\n}\n\n/** @internal */\nexport class StagePanelSectionDef extends WidgetHost {\n /** @internal */\n public initializeFromConfig(config: StagePanelSectionConfig | undefined) {\n config?.forEach((widgetConfig) => {\n const widgetDef = WidgetDef.create(widgetConfig);\n this.addWidgetDef(widgetDef);\n });\n }\n}\n\n/** @internal */\nexport function toPanelSide(location: StagePanelLocation): PanelSide {\n switch (location) {\n case StagePanelLocation.Bottom:\n return \"bottom\";\n case StagePanelLocation.Left:\n return \"left\";\n case StagePanelLocation.Right:\n return \"right\";\n case StagePanelLocation.Top:\n return \"top\";\n }\n}\n\n/** @internal */\nexport const setPanelPinned: (\n nineZone: NineZoneState,\n side: PanelSide,\n pinned: boolean\n) => NineZoneState = produce(\n (nineZone: Draft<NineZoneState>, side: PanelSide, pinned: boolean) => {\n const panel = nineZone.panels[side];\n panel.pinned = pinned;\n }\n);\n\n/** @internal */\nexport function getPanelState(state: NineZoneState, side: PanelSide) {\n const panel = state.panels[side];\n return panel.collapsed ? StagePanelState.Minimized : StagePanelState.Open;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Field.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,CAAC;AAgBtB;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG;IAClC,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;IACvC,MAAM,UAAU,GAAG,UAAU,CAC3B,sBAAsB,EACtB,cAAc,IAAI,aAAa,EAC/B,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,OAAO;IACL,iEAAiE;IACjE,6BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,KAAK,CAAC,OAAO,EAEpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,CAAC,IAGb,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport type { CommonProps } from \"@itwin/core-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport \"./Field.scss\";\n\n/** Properties of [[StatusBarField]] component.\n * @beta\n * @deprecated in 4.13.0. Props of deprecated component {@link StatusBarField}.\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Field.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,CAAC;AAgBtB;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG;IAClC,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;IACvC,MAAM,UAAU,GAAG,UAAU,CAC3B,sBAAsB,EACtB,cAAc,IAAI,aAAa,EAC/B,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,OAAO;IACL,iEAAiE;IACjE,6BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,KAAK,CAAC,OAAO,EAEpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,CAAC,IAGb,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport type { CommonProps } from \"@itwin/core-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport \"./Field.scss\";\n\n/** Properties of [[StatusBarField]] component.\n * @beta\n * @deprecated in 4.13.0. Props of deprecated component {@link StatusBarField}.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface StatusBarFieldProps extends CommonProps {\n /** Field content. */\n children?: React.ReactNode;\n /** Function called when field is clicked. */\n onClick?: () => void;\n /** Title of a field. */\n title?: string;\n}\n\n/** Field component used in [[StatusBar]] component.\n * @beta\n * @deprecated in 4.13.0. Use [iTwinUI Button](https://itwinui.bentley.com/docs/button) instead.\n */\nexport const StatusBarField = React.forwardRef<\n HTMLDivElement,\n StatusBarFieldProps // eslint-disable-line @typescript-eslint/no-deprecated\n>(function StatusBarField(props, ref) {\n const hasClickAction = !!props.onClick;\n const classNames = classnames(\n \"uifw-statusbar-field\",\n hasClickAction && \"uifw-action\",\n props.className\n );\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n ref={ref}\n className={classNames}\n title={props.title}\n style={props.style}\n onClick={props.onClick}\n {...{\n role: \"button\",\n tabIndex: -1,\n }}\n >\n {props.children}\n </div>\n );\n});\n"]}
|
|
@@ -12,7 +12,7 @@ import { StatusBarField } from "./Field.js";
|
|
|
12
12
|
* @beta
|
|
13
13
|
* @deprecated in 4.14.0. Use [iTwinUI Button](https://itwinui.bentley.com/docs/button) (or other components) and {@link StatusBarPopover AppUI StatusBarPopover} instead.
|
|
14
14
|
*/
|
|
15
|
-
// eslint-disable-next-line
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
16
16
|
export function StatusBarIndicator(props) {
|
|
17
17
|
const hasClickAction = !!props.onClick || !!props.popup;
|
|
18
18
|
const [isOpen, setIsOpen] = React.useState(!!props.defaultIsOpen);
|
|
@@ -24,7 +24,7 @@ export function StatusBarIndicator(props) {
|
|
|
24
24
|
return (React.createElement(React.Fragment, null,
|
|
25
25
|
React.createElement(StatusBarField, { ref: target, className: props.className, title: props.title, style: props.style, onClick: hasClickAction ? handleOnIndicatorClick : undefined }, props.children),
|
|
26
26
|
props.popup && (
|
|
27
|
-
// eslint-disable-next-line
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
28
28
|
React.createElement(StatusBarPopup, { target: target.current, onClose: () => setIsOpen(false), isOpen: isOpen }, props.popup))));
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=Indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Indicator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqB5C;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Indicator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqB5C;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAClE,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;QACnB,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;IACpB,CAAC,CAAC;IACF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,OAAO,CACL;QAEE,oBAAC,cAAc,IACb,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,IAE3D,KAAK,CAAC,QAAQ,CACA;QAChB,KAAK,CAAC,KAAK,IAAI;QACd,4DAA4D;QAC5D,oBAAC,cAAc,IACb,MAAM,EAAE,MAAM,CAAC,OAAO,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC/B,MAAM,EAAE,MAAM,IAEb,KAAK,CAAC,KAAK,CACG,CAClB,CACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { StatusBarPopup } from \"./popup/Popup.js\";\nimport { StatusBarField } from \"./Field.js\";\nimport { StatusBarPopover } from \"./popup/StatusBarPopover.js\";\n\n/** Properties of [[StatusBarIndicator]] component.\n * @beta\n * @deprecated in 4.14.0. Props of deprecated component {@link StatusBarIndicator}.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface StatusBarIndicatorProps extends CommonProps {\n /** Indicator content. */\n children?: React.ReactNode;\n /** Content to display in a popup when indicator is clicked. */\n popup?: React.ReactNode;\n /** Function called when indicator is clicked. */\n onClick?: () => void;\n /** Default state of an indicator popup. */\n defaultIsOpen?: boolean;\n /** Title of an indicator. */\n title?: string;\n}\n\n/** General-purpose [[StatusBar]] indicator.\n * @beta\n * @deprecated in 4.14.0. Use [iTwinUI Button](https://itwinui.bentley.com/docs/button) (or other components) and {@link StatusBarPopover AppUI StatusBarPopover} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function StatusBarIndicator(props: StatusBarIndicatorProps) {\n const hasClickAction = !!props.onClick || !!props.popup;\n const [isOpen, setIsOpen] = React.useState(!!props.defaultIsOpen);\n const handleOnIndicatorClick = () => {\n setIsOpen(!isOpen);\n props.onClick?.();\n };\n const target = React.useRef<HTMLDivElement>(null);\n return (\n <>\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <StatusBarField\n ref={target}\n className={props.className}\n title={props.title}\n style={props.style}\n onClick={hasClickAction ? handleOnIndicatorClick : undefined}\n >\n {props.children}\n </StatusBarField>\n {props.popup && (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <StatusBarPopup\n target={target.current}\n onClose={() => setIsOpen(false)}\n isOpen={isOpen}\n >\n {props.popup}\n </StatusBarPopup>\n )}\n </>\n );\n}\n"]}
|
|
@@ -16,12 +16,12 @@ import { Label } from "@itwin/itwinui-react";
|
|
|
16
16
|
* @beta
|
|
17
17
|
* @deprecated in 4.14.0. Use [iTwinUI Label](https://itwinui.bentley.com/docs/typography#label) and {@link Icon AppUI Icon} instead.
|
|
18
18
|
*/
|
|
19
|
-
// eslint-disable-next-line
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
20
20
|
export function StatusBarLabelIndicator(props) {
|
|
21
21
|
const { className, iconSpec, label, labelSide, ...other } = props;
|
|
22
22
|
const classNames = classnames("uifw-statusbar-labelIndicator", labelSide === StatusBarLabelSide.Right && "uifw-reversed", className);
|
|
23
23
|
return (
|
|
24
|
-
// eslint-disable-next-line
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
25
25
|
React.createElement(StatusBarIndicator, { className: classNames, ...other },
|
|
26
26
|
label && React.createElement(Label, { className: "uifw-label" }, label),
|
|
27
27
|
iconSpec && React.createElement(Icon, { iconSpec: iconSpec })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelIndicator.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/LabelIndicator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CA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BAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACtB,CACtB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport \"./LabelIndicator.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { StatusBarIndicatorProps } from \"./Indicator.js\";\nimport { StatusBarIndicator } from \"./Indicator.js\";\nimport type { IconSpec } from \"@itwin/core-react\";\nimport { Icon } from \"@itwin/core-react\";\nimport { StatusBarLabelSide } from \"./StatusBarItem.js\";\nimport { Label } from \"@itwin/itwinui-react\";\n\n/** Properties of [[StatusBarLabelIndicator]] component.\n * @beta\n * @deprecated in 4.14.0. Props of deprecated component {@link StatusBarLabelIndicator}.\n */\nexport interface StatusBarLabelIndicatorProps\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extends Omit<StatusBarIndicatorProps, \"children\"> {\n /** Specification of an icon. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iconSpec?: IconSpec;\n /** Indicator label. */\n label?: string;\n /** Side to display label. */\n labelSide?: StatusBarLabelSide;\n}\n\n/** [[StatusBar]] indicator that shows a label with an icon.\n * @beta\n * @deprecated in 4.14.0. Use [iTwinUI Label](https://itwinui.bentley.com/docs/typography#label) and {@link Icon AppUI Icon} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function StatusBarLabelIndicator(props: StatusBarLabelIndicatorProps) {\n const { className, iconSpec, label, labelSide, ...other } = props;\n const classNames = classnames(\n \"uifw-statusbar-labelIndicator\",\n labelSide === StatusBarLabelSide.Right && \"uifw-reversed\",\n className\n );\n return (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <StatusBarIndicator className={classNames} {...other}>\n {label && <Label className=\"uifw-label\">{label}</Label>}\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n {iconSpec && <Icon iconSpec={iconSpec} />}\n </StatusBarIndicator>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overflow.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Overflow.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,iBAAiB,CAAC;AAazB;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAEvC,MAAM,KAAK,GAAG,iBAAiB,CAAiB,QAAQ,CAAC,CAAC;IAE1D,OAAO,CACL,oBAAC,gBAAgB,IACf,OAAO,EACL,6BACE,SAAS,EAAC,+BAA+B,iBAC7B,+BAA+B,IAE1C,aAAa,CACV;QAGR,oBAAC,UAAU,OACL,UAAU,EACd,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAC,EACtC,SAAS,EAAC,YAAY;YAEtB,oBAAC,OAAO,OAAG,CACA,CACI,CACpB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { useResizeObserver } from \"@itwin/core-react/internal\";\nimport * as React from \"react\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\nimport { StatusBarPopover } from \"./popup/StatusBarPopover.js\";\nimport \"./Overflow.scss\";\n\n/** Properties of [[StatusBarOverflow]] component.\n * @internal\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"Overflow.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Overflow.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,iBAAiB,CAAC;AAazB;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAEvC,MAAM,KAAK,GAAG,iBAAiB,CAAiB,QAAQ,CAAC,CAAC;IAE1D,OAAO,CACL,oBAAC,gBAAgB,IACf,OAAO,EACL,6BACE,SAAS,EAAC,+BAA+B,iBAC7B,+BAA+B,IAE1C,aAAa,CACV;QAGR,oBAAC,UAAU,OACL,UAAU,EACd,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAC,EACtC,SAAS,EAAC,YAAY;YAEtB,oBAAC,OAAO,OAAG,CACA,CACI,CACpB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { useResizeObserver } from \"@itwin/core-react/internal\";\nimport * as React from \"react\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\nimport { StatusBarPopover } from \"./popup/StatusBarPopover.js\";\nimport \"./Overflow.scss\";\n\n/** Properties of [[StatusBarOverflow]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface StatusBarOverflowProps extends CommonProps {\n /** Function called when button is resized. */\n onResize: (w: number) => void;\n /** Fields to be placed in the overflow panel. */\n overflowItems: React.ReactNode[];\n}\n\n/** Entry point to overflow status bar items of [[StatusBarComposer]] component.\n * @internal\n */\nexport function StatusBarOverflow(props: StatusBarOverflowProps) {\n const { overflowItems, onResize, ...otherProps } = props;\n const { translate } = useTranslation();\n\n const roRef = useResizeObserver<HTMLDivElement>(onResize);\n\n return (\n <StatusBarPopover\n content={\n <div\n className=\"uifw-statusbar-overflow-panel\"\n data-testid=\"uifw-statusbar-overflow-panel\"\n >\n {overflowItems}\n </div>\n }\n >\n <IconButton\n {...otherProps}\n ref={roRef}\n label={translate(\"statusBar.overflow\")}\n styleType=\"borderless\"\n >\n <SvgMore />\n </IconButton>\n </StatusBarPopover>\n );\n}\n"]}
|
|
@@ -11,7 +11,7 @@ import classnames from "classnames";
|
|
|
11
11
|
/** Component used to separate status fields in a status bar.
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
// eslint-disable-next-line
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
15
15
|
export function StatusBarSeparator(props) {
|
|
16
16
|
const className = classnames("uifw-statusBar-separator", props.className);
|
|
17
17
|
return React.createElement("div", { className: className, style: props.style });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Separator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../../src/appui-react/statusbar/Separator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;GAEG;AACH,4DAA4D;AAC5D,MAAM,UAAU,kBAAkB,CAAC,KAAkB;IACnD,MAAM,SAAS,GAAG,UAAU,CAAC,0BAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,OAAO,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC;AAC3D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport \"./Separator.scss\";\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"@itwin/core-react\";\n\n/** Component used to separate status fields in a status bar.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function StatusBarSeparator(props: CommonProps) {\n const className = classnames(\"uifw-statusBar-separator\", props.className);\n return <div className={className} style={props.style} />;\n}\n"]}
|