@itwin/appui-react 4.16.4 → 4.17.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 +32 -1
- package/lib/cjs/appui-react/UiFramework.d.ts +5 -0
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +5 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts +1 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.js +2 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/CopyStyles.js +10 -5
- package/lib/cjs/appui-react/childwindow/CopyStyles.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +7 -2
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
- package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
- package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
- package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
- package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
- package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
- package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +27 -25
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
- package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +10 -6
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
- package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +23 -25
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +16 -12
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/cjs/appui-react/utils/getActiveViewport.d.ts +10 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.d.ts.map +1 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.js +26 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.js.map +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +3 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +3 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +5 -0
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +6 -1
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
- package/lib/esm/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/CopyStyles.js +8 -3
- package/lib/esm/appui-react/childwindow/CopyStyles.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
- package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +45 -11
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
- package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
- package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
- package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
- package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
- package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
- package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
- package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
- package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
- package/lib/esm/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js +27 -25
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
- package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js +10 -6
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
- package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +23 -25
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +16 -12
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/esm/appui-react/utils/getActiveViewport.d.ts +10 -0
- package/lib/esm/appui-react/utils/getActiveViewport.d.ts.map +1 -0
- package/lib/esm/appui-react/utils/getActiveViewport.js +22 -0
- package/lib/esm/appui-react/utils/getActiveViewport.js.map +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
- package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react.d.ts +3 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +3 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentGenerator.js","sourceRoot":"","sources":["../../../../src/appui-react/uiprovider/ComponentGenerator.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,6CAA2C;AAC3C,2CAAoC;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AA6B,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5D,OAAO,IAAI,CAAC,mCAAmC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBACvE,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;aACnC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,6DAA6D;IACtD,sBAAsB;QAC3B,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAc,EAAE,KAAa,EAAE,EAAE,CACpE,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,KAAK,CAAC,CACtC,CAAC;IACJ,CAAC;CACF;AA5LD,gDA4LC","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 UiProvider\n */\n\nimport \"./DefaultDialogGridContainer.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n BaseDialogItem,\n DialogItem,\n DialogItemValue,\n DialogPropertySyncItem,\n DialogRow,\n SyncPropertiesChangeEventArgs,\n} from \"@itwin/appui-abstract\";\nimport {\n PropertyValueFormat,\n UiLayoutDataProvider,\n} from \"@itwin/appui-abstract\";\nimport type { PropertyUpdatedArgs } from \"@itwin/components-react\";\nimport { EditorContainer } from \"@itwin/components-react\";\nimport type { ToolSettingsEntry } from \"../widget-panels/ToolSettings\";\nimport { assert, Logger } from \"@itwin/core-bentley\";\nimport { Label } from \"@itwin/itwinui-react\";\n\nfunction EditorLabel({\n uiDataProvider,\n item,\n isLeftmostRecord,\n}: {\n uiDataProvider: UiLayoutDataProvider;\n item: DialogItem;\n isLeftmostRecord?: boolean;\n}) {\n const [isDisabled, setIsDisabled] = React.useState(!!item.isDisabled);\n const displayLabel = React.useMemo(() => {\n return item.property.displayLabel || item.property.name;\n }, [item]);\n\n // listen for tool sync property events and update the isDisabled state\n React.useEffect(() => {\n return uiDataProvider.onSyncPropertiesChangeEvent.addListener((args) => {\n const mySyncItem = args.properties.find(\n (syncItem) => syncItem.propertyName === item.property.name\n );\n if (mySyncItem) {\n setIsDisabled(!!mySyncItem.isDisabled);\n }\n });\n }, [uiDataProvider, item]);\n\n const className = classnames(\n \"uifw-default-label\",\n !!isLeftmostRecord && \"uifw-default-narrow-only-display\"\n );\n return (\n <Label\n className={className}\n htmlFor={item.property.name}\n disabled={isDisabled}\n >\n {displayLabel}:\n </Label>\n );\n}\n\nfunction PropertyEditor({\n uiDataProvider,\n initialItem,\n isLock,\n setFocus,\n onCancel,\n}: {\n uiDataProvider: UiLayoutDataProvider;\n initialItem: BaseDialogItem;\n isLock?: boolean;\n setFocus?: boolean;\n onCancel?: () => void;\n}) {\n const getLatestRecordValue = React.useCallback(\n (initial: BaseDialogItem) => {\n let newRecord = UiLayoutDataProvider.getPropertyRecord(initial);\n\n const foundItem = isLock\n ? uiDataProvider.items.find(\n (item) => item.lockProperty?.property.name === initial.property.name\n )\n : uiDataProvider.items.find(\n (item) => item.property.name === initial.property.name\n );\n if (foundItem) {\n if (isLock) {\n newRecord = newRecord.copyWithNewValue({\n value: foundItem.lockProperty!.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n });\n newRecord.isDisabled = foundItem.lockProperty!.isDisabled;\n } else {\n newRecord = newRecord.copyWithNewValue({\n value: foundItem.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n });\n newRecord.isDisabled = foundItem.isDisabled;\n }\n }\n return newRecord;\n },\n [isLock, uiDataProvider.items]\n );\n\n const currentRecord = getLatestRecordValue(initialItem);\n const [propertyRecord, setPropertyRecord] = React.useState(currentRecord);\n\n // monitor tool for sync UI events\n React.useEffect(() => {\n const handleSync = (args: SyncPropertiesChangeEventArgs) => {\n const mySyncItem = args.properties.find(\n (syncItem: DialogPropertySyncItem) =>\n syncItem.propertyName === initialItem.property.name\n );\n if (mySyncItem) {\n const newPropertyValue = propertyRecord.copyWithNewValue(\n {\n value: mySyncItem.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n displayValue: mySyncItem.value.displayValue,\n },\n mySyncItem.property\n );\n\n if (mySyncItem.property) {\n if (mySyncItem.property.name === mySyncItem.propertyName) {\n newPropertyValue.isDisabled = mySyncItem.isDisabled;\n setPropertyRecord(newPropertyValue);\n } else {\n Logger.logError(\n \"PropertyEditor\",\n `Error trying to replace propertyName=${mySyncItem.propertyName} with property named ${mySyncItem.property.name}`\n );\n }\n } else {\n newPropertyValue.isDisabled = mySyncItem.isDisabled;\n setPropertyRecord(newPropertyValue);\n }\n }\n };\n uiDataProvider.onSyncPropertiesChangeEvent.addListener(handleSync);\n return () => {\n uiDataProvider.onSyncPropertiesChangeEvent.removeListener(handleSync);\n };\n }, [uiDataProvider, propertyRecord, initialItem.property.name]);\n\n React.useEffect(() => {\n const updateItem = () => {\n const newItem = uiDataProvider.items.find(\n (item) => item.property.name === initialItem.property.name\n );\n if (!newItem) return;\n setPropertyRecord(getLatestRecordValue(newItem));\n };\n\n return uiDataProvider.onItemsReloadedEvent.addListener(updateItem);\n }, [uiDataProvider, initialItem.property.name, getLatestRecordValue]);\n\n const className = React.useMemo(\n () => (isLock ? \"uifw-default-property-lock\" : \"uifw-default-editor\"),\n [isLock]\n );\n const handleCommit = React.useCallback(\n (commit: PropertyUpdatedArgs) => {\n // UiLayoutDataProvider supports only primitive property types\n assert(\n commit.newValue.valueFormat === PropertyValueFormat.Primitive &&\n commit.propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n );\n const newPropertyValue = propertyRecord.copyWithNewValue(commit.newValue);\n const syncItem: DialogPropertySyncItem = {\n value: commit.newValue as DialogItemValue,\n propertyName: initialItem.property.name,\n isDisabled: newPropertyValue.isDisabled,\n };\n uiDataProvider.applyUiPropertyChange(syncItem);\n // Now have the uiDataProvider refetch the latest property values from the tool\n uiDataProvider.reloadDialogItems(true);\n },\n [initialItem.property.name, propertyRecord, uiDataProvider]\n );\n const handleCancel = () => {};\n\n return (\n <div key={initialItem.property.name} className={className}>\n <EditorContainer\n key={initialItem.property.name}\n propertyRecord={propertyRecord}\n setFocus={setFocus}\n onCommit={handleCommit}\n onCancel={onCancel ?? handleCancel}\n />\n </div>\n );\n}\n\n/** Utility methods to generate react ui from DialogRow specs\n * @internal\n */\nexport class ComponentGenerator {\n constructor(\n private _uiDataProvider: UiLayoutDataProvider,\n private _onCancel?: () => void\n ) {}\n\n public get uiDataProvider() {\n return this._uiDataProvider;\n }\n\n private getEditor(\n item: BaseDialogItem,\n isLock = false,\n setFocus = false\n ): React.ReactNode {\n return (\n <PropertyEditor\n key={item.property.name}\n uiDataProvider={this.uiDataProvider}\n initialItem={item}\n isLock={isLock}\n setFocus={setFocus}\n onCancel={this._onCancel}\n />\n );\n }\n\n private generateRowWithButtonGroupEditors(\n row: DialogRow,\n rowIndex: number\n ): React.ReactNode {\n if (1 === row.items.length) {\n return (\n <div\n key={row.items[0].property.name}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n {this.getEditor(row.items[0])}\n </div>\n );\n }\n\n return (\n <div\n key={rowIndex}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item) => this.getEditor(item))}\n </div>\n </div>\n );\n }\n\n private generateEntryWithButtonGroupEditors(\n row: DialogRow,\n rowIndex: number\n ): ToolSettingsEntry {\n if (1 === row.items.length) {\n return {\n labelNode: \"\",\n editorNode: (\n <div\n key={row.items[0].property.name}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n {this.getEditor(row.items[0])}\n </div>\n ),\n };\n }\n\n return {\n labelNode: \"\",\n editorNode: (\n <div\n key={rowIndex}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item) => this.getEditor(item))}\n </div>\n </div>\n ),\n };\n }\n\n private getEditorLabel(\n item: DialogItem,\n isLeftmostRecord = false\n ): React.ReactNode {\n return (\n <EditorLabel\n uiDataProvider={this.uiDataProvider}\n item={item}\n isLeftmostRecord={isLeftmostRecord}\n />\n );\n }\n\n private getLeftLockAndLabel(\n rowItem: DialogItem,\n multiplePropertiesOnRow: boolean\n ): React.ReactNode {\n const record = UiLayoutDataProvider.getPropertyRecord(rowItem);\n const lockEditor = UiLayoutDataProvider.hasAssociatedLockProperty(rowItem)\n ? this.getEditor(rowItem.lockProperty!, true)\n : null;\n const label = UiLayoutDataProvider.editorWantsLabel(rowItem)\n ? this.getEditorLabel(rowItem)\n : null;\n const classNames = multiplePropertiesOnRow\n ? \"uifw-default-lock-and-label uifw-default-wide-only-display\"\n : \"uifw-default-lock-and-label\";\n return (\n <div key={`lock-${record.property.name}`} className={classNames}>\n {lockEditor}\n {label}\n </div>\n );\n }\n\n private getInlineLabelAndEditor(\n item: DialogItem,\n isLeftmostRecord: boolean\n ): React.ReactNode {\n const label = UiLayoutDataProvider.editorWantsLabel(item)\n ? this.getEditorLabel(item, isLeftmostRecord)\n : null;\n return (\n <div\n key={item.property.name}\n className=\"uifw-default-inline-label-and-editor\"\n >\n {label}\n {this.getEditor(item)}\n </div>\n );\n }\n\n private getRowWithMultipleEditors(row: DialogRow): React.ReactNode {\n return (\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item: DialogItem, index: number) =>\n this.getInlineLabelAndEditor(item, index === 0)\n )}\n </div>\n );\n }\n\n private getDivForRow(row: DialogRow): React.ReactNode {\n if (row.items.length === 1) return this.getEditor(row.items[0]);\n return this.getRowWithMultipleEditors(row);\n }\n\n public getRow(row: DialogRow, rowIndex: number): React.ReactNode {\n if (UiLayoutDataProvider.onlyContainButtonGroupEditors(row)) {\n return this.generateRowWithButtonGroupEditors(row, rowIndex);\n } else {\n return (\n <React.Fragment key={rowIndex}>\n {this.getLeftLockAndLabel(row.items[0], row.items.length > 1)}\n {this.getDivForRow(row)}\n </React.Fragment>\n );\n }\n }\n\n public getToolSettingsEntry(\n row: DialogRow,\n rowIndex: number\n ): ToolSettingsEntry {\n if (UiLayoutDataProvider.onlyContainButtonGroupEditors(row)) {\n return this.generateEntryWithButtonGroupEditors(row, rowIndex);\n } else {\n return {\n labelNode: this.getLeftLockAndLabel(row.items[0], row.items.length > 1),\n editorNode: this.getDivForRow(row),\n };\n }\n }\n\n /** ToolSettingsEntries are used by the tool settings bar. */\n public getToolSettingsEntries(): ToolSettingsEntry[] {\n return this.uiDataProvider.rows.map((row: DialogRow, index: number) =>\n this.getToolSettingsEntry(row, index)\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ComponentGenerator.js","sourceRoot":"","sources":["../../../../src/appui-react/uiprovider/ComponentGenerator.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,6CAA2C;AAC3C,2CAAoC;AACpC,+BAA+B;AAQ/B,0DAG+B;AAE/B,8DAA0D;AAE1D,sDAAqD;AACrD,wDAA6C;AAE7C,SAAS,WAAW,CAAC,EACnB,cAAc,EACd,IAAI,EACJ,gBAAgB,GAKjB;IACC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtE,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC1D,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,uEAAuE;IACvE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,cAAc,CAAC,2BAA2B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C;YACX,OAAO,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;AACxD,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 UiProvider\n */\n\nimport \"./DefaultDialogGridContainer.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n BaseDialogItem,\n DialogItem,\n DialogItemValue,\n DialogPropertySyncItem,\n DialogRow,\n} from \"@itwin/appui-abstract\";\nimport {\n PropertyValueFormat,\n UiLayoutDataProvider,\n} from \"@itwin/appui-abstract\";\nimport type { PropertyUpdatedArgs } from \"@itwin/components-react\";\nimport { EditorContainer } from \"@itwin/components-react\";\nimport type { ToolSettingsEntry } from \"../widget-panels/ToolSettings\";\nimport { assert, Logger } from \"@itwin/core-bentley\";\nimport { Label } from \"@itwin/itwinui-react\";\n\nfunction EditorLabel({\n uiDataProvider,\n item,\n isLeftmostRecord,\n}: {\n uiDataProvider: UiLayoutDataProvider;\n item: DialogItem;\n isLeftmostRecord?: boolean;\n}) {\n const [isDisabled, setIsDisabled] = React.useState(!!item.isDisabled);\n const displayLabel = React.useMemo(() => {\n return item.property.displayLabel || item.property.name;\n }, [item]);\n\n // listen for tool sync property events and update the isDisabled state\n React.useEffect(() => {\n return uiDataProvider.onSyncPropertiesChangeEvent.addListener((args) => {\n const mySyncItem = args.properties.find(\n (syncItem) => syncItem.propertyName === item.property.name\n );\n if (mySyncItem) {\n setIsDisabled(!!mySyncItem.isDisabled);\n }\n });\n }, [uiDataProvider, item]);\n\n const className = classnames(\n \"uifw-default-label\",\n !!isLeftmostRecord && \"uifw-default-narrow-only-display\"\n );\n return (\n <Label\n className={className}\n htmlFor={item.property.name}\n disabled={isDisabled}\n >\n {displayLabel}:\n </Label>\n );\n}\n\nfunction PropertyEditor({\n uiDataProvider,\n initialItem,\n isLock = false,\n setFocus,\n onCancel,\n}: {\n uiDataProvider: UiLayoutDataProvider;\n initialItem: BaseDialogItem;\n isLock?: boolean;\n setFocus?: boolean;\n onCancel?: () => void;\n}) {\n const getLatestRecordValue = React.useCallback(\n (initial: BaseDialogItem) => {\n let newRecord = UiLayoutDataProvider.getPropertyRecord(initial);\n\n const foundItem = isLock\n ? uiDataProvider.items.find(\n (item) => item.lockProperty?.property.name === initial.property.name\n )\n : uiDataProvider.items.find(\n (item) => item.property.name === initial.property.name\n );\n if (foundItem) {\n if (isLock) {\n newRecord = newRecord.copyWithNewValue({\n value: foundItem.lockProperty!.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n });\n newRecord.isDisabled = foundItem.lockProperty!.isDisabled;\n } else {\n newRecord = newRecord.copyWithNewValue({\n value: foundItem.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n });\n newRecord.isDisabled = foundItem.isDisabled;\n }\n }\n return newRecord;\n },\n [isLock, uiDataProvider.items]\n );\n\n const currentRecord = getLatestRecordValue(initialItem);\n const [propertyRecord, setPropertyRecord] = React.useState(currentRecord);\n\n // monitor tool for sync UI events\n React.useEffect(() => {\n return uiDataProvider.onSyncPropertiesChangeEvent.addListener((args) => {\n const mySyncItem = args.properties.find(\n (syncItem: DialogPropertySyncItem) =>\n syncItem.propertyName === initialItem.property.name\n );\n if (mySyncItem) {\n const newPropertyValue = propertyRecord.copyWithNewValue(\n {\n value: mySyncItem.value.value,\n valueFormat: PropertyValueFormat.Primitive,\n displayValue: mySyncItem.value.displayValue,\n },\n mySyncItem.property\n );\n\n if (mySyncItem.property) {\n if (mySyncItem.property.name === mySyncItem.propertyName) {\n newPropertyValue.isDisabled = mySyncItem.isDisabled;\n setPropertyRecord(newPropertyValue);\n } else {\n Logger.logError(\n \"PropertyEditor\",\n `Error trying to replace propertyName=${mySyncItem.propertyName} with property named ${mySyncItem.property.name}`\n );\n }\n } else {\n newPropertyValue.isDisabled = mySyncItem.isDisabled;\n setPropertyRecord(newPropertyValue);\n }\n }\n });\n }, [uiDataProvider, propertyRecord, initialItem.property.name]);\n\n React.useEffect(() => {\n return uiDataProvider.onItemsReloadedEvent.addListener(() => {\n const newItem = findDialogItem(\n uiDataProvider,\n initialItem.property.name,\n isLock\n );\n if (!newItem) return;\n setPropertyRecord(getLatestRecordValue(newItem));\n });\n }, [uiDataProvider, initialItem.property.name, getLatestRecordValue, isLock]);\n\n const className = React.useMemo(\n () => (isLock ? \"uifw-default-property-lock\" : \"uifw-default-editor\"),\n [isLock]\n );\n const handleCommit = React.useCallback(\n (commit: PropertyUpdatedArgs) => {\n // UiLayoutDataProvider supports only primitive property types\n assert(\n commit.newValue.valueFormat === PropertyValueFormat.Primitive &&\n commit.propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n );\n const newPropertyValue = propertyRecord.copyWithNewValue(commit.newValue);\n const syncItem: DialogPropertySyncItem = {\n value: commit.newValue as DialogItemValue,\n propertyName: initialItem.property.name,\n isDisabled: newPropertyValue.isDisabled,\n };\n uiDataProvider.applyUiPropertyChange(syncItem);\n // Now have the uiDataProvider refetch the latest property values from the tool\n uiDataProvider.reloadDialogItems(true);\n },\n [initialItem.property.name, propertyRecord, uiDataProvider]\n );\n const handleCancel = () => {};\n\n return (\n <div key={initialItem.property.name} className={className}>\n <EditorContainer\n key={initialItem.property.name}\n propertyRecord={propertyRecord}\n setFocus={setFocus}\n onCommit={handleCommit}\n onCancel={onCancel ?? handleCancel}\n />\n </div>\n );\n}\n\n/** Utility methods to generate react ui from DialogRow specs\n * @internal\n */\nexport class ComponentGenerator {\n constructor(\n private _uiDataProvider: UiLayoutDataProvider,\n private _onCancel?: () => void\n ) {}\n\n public get uiDataProvider() {\n return this._uiDataProvider;\n }\n\n private getEditor(\n item: BaseDialogItem,\n isLock = false,\n setFocus = false\n ): React.ReactNode {\n return (\n <PropertyEditor\n key={item.property.name}\n uiDataProvider={this.uiDataProvider}\n initialItem={item}\n isLock={isLock}\n setFocus={setFocus}\n onCancel={this._onCancel}\n />\n );\n }\n\n private generateRowWithButtonGroupEditors(\n row: DialogRow,\n rowIndex: number\n ): React.ReactNode {\n if (1 === row.items.length) {\n return (\n <div\n key={row.items[0].property.name}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n {this.getEditor(row.items[0])}\n </div>\n );\n }\n\n return (\n <div\n key={rowIndex}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item) => this.getEditor(item))}\n </div>\n </div>\n );\n }\n\n private generateEntryWithButtonGroupEditors(\n row: DialogRow,\n rowIndex: number\n ): ToolSettingsEntry {\n if (1 === row.items.length) {\n return {\n labelNode: \"\",\n editorNode: (\n <div\n key={row.items[0].property.name}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n {this.getEditor(row.items[0])}\n </div>\n ),\n };\n }\n\n return {\n labelNode: \"\",\n editorNode: (\n <div\n key={rowIndex}\n className=\"uifw-default-inline-editor-group uifw-default-center-across-width\"\n >\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item) => this.getEditor(item))}\n </div>\n </div>\n ),\n };\n }\n\n private getEditorLabel(\n item: DialogItem,\n isLeftmostRecord = false\n ): React.ReactNode {\n return (\n <EditorLabel\n uiDataProvider={this.uiDataProvider}\n item={item}\n isLeftmostRecord={isLeftmostRecord}\n />\n );\n }\n\n private getLeftLockAndLabel(\n rowItem: DialogItem,\n multiplePropertiesOnRow: boolean\n ): React.ReactNode {\n const record = UiLayoutDataProvider.getPropertyRecord(rowItem);\n const lockEditor = UiLayoutDataProvider.hasAssociatedLockProperty(rowItem)\n ? this.getEditor(rowItem.lockProperty!, true)\n : null;\n const label = UiLayoutDataProvider.editorWantsLabel(rowItem)\n ? this.getEditorLabel(rowItem)\n : null;\n const classNames = multiplePropertiesOnRow\n ? \"uifw-default-lock-and-label uifw-default-wide-only-display\"\n : \"uifw-default-lock-and-label\";\n return (\n <div key={`lock-${record.property.name}`} className={classNames}>\n {lockEditor}\n {label}\n </div>\n );\n }\n\n private getInlineLabelAndEditor(\n item: DialogItem,\n isLeftmostRecord: boolean\n ): React.ReactNode {\n const label = UiLayoutDataProvider.editorWantsLabel(item)\n ? this.getEditorLabel(item, isLeftmostRecord)\n : null;\n return (\n <div\n key={item.property.name}\n className=\"uifw-default-inline-label-and-editor\"\n >\n {label}\n {this.getEditor(item)}\n </div>\n );\n }\n\n private getRowWithMultipleEditors(row: DialogRow): React.ReactNode {\n return (\n <div className=\"uifw-default-inline-editor-group\">\n {row.items.map((item: DialogItem, index: number) =>\n this.getInlineLabelAndEditor(item, index === 0)\n )}\n </div>\n );\n }\n\n private getDivForRow(row: DialogRow): React.ReactNode {\n if (row.items.length === 1) return this.getEditor(row.items[0]);\n return this.getRowWithMultipleEditors(row);\n }\n\n public getRow(row: DialogRow, rowIndex: number): React.ReactNode {\n if (UiLayoutDataProvider.onlyContainButtonGroupEditors(row)) {\n return this.generateRowWithButtonGroupEditors(row, rowIndex);\n } else {\n return (\n <React.Fragment key={rowIndex}>\n {this.getLeftLockAndLabel(row.items[0], row.items.length > 1)}\n {this.getDivForRow(row)}\n </React.Fragment>\n );\n }\n }\n\n public getToolSettingsEntry(\n row: DialogRow,\n rowIndex: number\n ): ToolSettingsEntry {\n if (UiLayoutDataProvider.onlyContainButtonGroupEditors(row)) {\n return this.generateEntryWithButtonGroupEditors(row, rowIndex);\n } else {\n return {\n labelNode: this.getLeftLockAndLabel(row.items[0], row.items.length > 1),\n editorNode: this.getDivForRow(row),\n };\n }\n }\n\n /** ToolSettingsEntries are used by the tool settings bar. */\n public getToolSettingsEntries(): ToolSettingsEntry[] {\n return this.uiDataProvider.rows.map((row: DialogRow, index: number) =>\n this.getToolSettingsEntry(row, index)\n );\n }\n}\n\nfunction findDialogItem(\n uiDataProvider: UiLayoutDataProvider,\n propertyName: string,\n isLock: boolean\n) {\n const dialogItem = uiDataProvider.items.find((item) => {\n if (isLock) {\n return item.lockProperty?.property.name === propertyName;\n }\n return item.property.name === propertyName;\n });\n return isLock ? dialogItem?.lockProperty : dialogItem;\n}\n"]}
|
|
@@ -9,6 +9,7 @@ export declare function useUiStateStorageHandler(): UiStateStorage;
|
|
|
9
9
|
export declare const UiStateStorageContext: React.Context<import("@itwin/core-react").UiStateStorage>;
|
|
10
10
|
/** Properties for the [[UiStateStorageHandler]] component.
|
|
11
11
|
* @public
|
|
12
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof UiStateStorageHandler>`
|
|
12
13
|
*/
|
|
13
14
|
export interface UiSettingsProviderProps {
|
|
14
15
|
children?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUiStateStorage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,cAAc;AACd,wBAAgB,wBAAwB,IAAI,cAAc,CAEzD;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,2DAEjC,CAAC;AAGF
|
|
1
|
+
{"version":3,"file":"useUiStateStorage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,cAAc;AACd,wBAAgB,wBAAwB,IAAI,cAAc,CAEzD;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,2DAEjC,CAAC;AAGF;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,uBAAuB,qBAsBnE"}
|
|
@@ -32,6 +32,7 @@ exports.UiStateStorageContext.displayName = "uifw:UiStateStorageContext";
|
|
|
32
32
|
* ```
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
35
36
|
function UiStateStorageHandler(props) {
|
|
36
37
|
const [stateStorage, setStateStorage] = React.useState(UiFramework_1.UiFramework.getUiStateStorage());
|
|
37
38
|
React.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUiStateStorage.js","sourceRoot":"","sources":["../../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,gDAA6C;AAC7C,2EAGyC;AAEzC,2DAAwD;AAExD,cAAc;AACd,SAAgB,wBAAwB;IACtC,OAAO,KAAK,CAAC,UAAU,CAAC,6BAAqB,CAAC,CAAC;AACjD,CAAC;AAFD,4DAEC;AAED,gBAAgB;AACH,QAAA,qBAAqB,GAAG,KAAK,CAAC,aAAa,CACtD,IAAI,qCAAiB,EAAE,CACxB,CAAC;AACF,6BAAqB,CAAC,WAAW,GAAG,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"useUiStateStorage.js","sourceRoot":"","sources":["../../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,gDAA6C;AAC7C,2EAGyC;AAEzC,2DAAwD;AAExD,cAAc;AACd,SAAgB,wBAAwB;IACtC,OAAO,KAAK,CAAC,UAAU,CAAC,6BAAqB,CAAC,CAAC;AACjD,CAAC;AAFD,4DAEC;AAED,gBAAgB;AACH,QAAA,qBAAqB,GAAG,KAAK,CAAC,aAAa,CACtD,IAAI,qCAAiB,EAAE,CACxB,CAAC;AACF,6BAAqB,CAAC,WAAW,GAAG,4BAA4B,CAAC;AAUjE;;;;;;;;;;;GAWG;AACH,mDAAmD;AACnD,SAAgB,qBAAqB,CAAC,KAA8B;IAClE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CACpD,yBAAW,CAAC,iBAAiB,EAAE,CAChC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,6CAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,qCAAa,CAAC,qBAAqB;aACpC,CAAC;gBAEF,eAAe,CAAC,yBAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,6BAAqB,CAAC,QAAQ,IAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,YAAY,GACnB,CACH,CAAC;AACJ,CAAC;AAtBD,sDAsBC","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 UiStateStorage\n */\n\nimport * as React from \"react\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n SyncUiEventDispatcher,\n SyncUiEventId,\n} from \"../syncui/SyncUiEventDispatcher\";\nimport type { UiStateStorage } from \"./UiStateStorage\";\nimport { LocalStateStorage } from \"./LocalStateStorage\";\n\n/** @public */\nexport function useUiStateStorageHandler(): UiStateStorage {\n return React.useContext(UiStateStorageContext);\n}\n\n/** @internal */\nexport const UiStateStorageContext = React.createContext<UiStateStorage>(\n new LocalStateStorage()\n);\nUiStateStorageContext.displayName = \"uifw:UiStateStorageContext\";\n\n/** Properties for the [[UiStateStorageHandler]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof UiStateStorageHandler>`\n */\nexport interface UiSettingsProviderProps {\n children?: React.ReactNode;\n}\n\n/** Allows to provide a custom [[UiStateStorage]] implementation to persist UI settings\n * through [[UiFramework.setUiStateStorage]].\n *\n * This component should wrap the [[ConfigurableUiContent]].\n *\n * ```tsx\n * <UiStateStorageHandler>\n * <ConfigurableUiContent />\n * </UiStateStorageHandler>\n * ```\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function UiStateStorageHandler(props: UiSettingsProviderProps) {\n const [stateStorage, setStateStorage] = React.useState(\n UiFramework.getUiStateStorage()\n );\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n SyncUiEventId.UiStateStorageChanged,\n ])\n )\n setStateStorage(UiFramework.getUiStateStorage());\n });\n });\n\n return (\n <UiStateStorageContext.Provider\n children={props.children} // eslint-disable-line react/no-children-prop\n value={stateStorage}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Utilities
|
|
3
|
+
*/
|
|
4
|
+
/** A helper function used to get the active viewport in conditional definitions.
|
|
5
|
+
* Uses the deprecated active content control APIs to get the active viewport or the selected view of the view manager as a fallback.
|
|
6
|
+
* @note Might need a better strategy for a use case where selected view fallback behavior is not desired (i.e. a map of active content id to a viewport).
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getActiveViewport(): import("@itwin/core-frontend").ScreenViewport | undefined;
|
|
10
|
+
//# sourceMappingURL=getActiveViewport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActiveViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/utils/getActiveViewport.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH;;;;GAIG;AACH,wBAAgB,iBAAiB,8DAMhC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Utilities
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getActiveViewport = void 0;
|
|
11
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
12
|
+
const UiFramework_1 = require("../UiFramework");
|
|
13
|
+
/** A helper function used to get the active viewport in conditional definitions.
|
|
14
|
+
* Uses the deprecated active content control APIs to get the active viewport or the selected view of the view manager as a fallback.
|
|
15
|
+
* @note Might need a better strategy for a use case where selected view fallback behavior is not desired (i.e. a map of active content id to a viewport).
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
function getActiveViewport() {
|
|
19
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
20
|
+
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
21
|
+
return activeContentControl
|
|
22
|
+
? activeContentControl.viewport
|
|
23
|
+
: core_frontend_1.IModelApp.viewManager.selectedView;
|
|
24
|
+
}
|
|
25
|
+
exports.getActiveViewport = getActiveViewport;
|
|
26
|
+
//# sourceMappingURL=getActiveViewport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActiveViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/utils/getActiveViewport.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAAiD;AACjD,gDAA6C;AAE7C;;;;GAIG;AACH,SAAgB,iBAAiB;IAC/B,mDAAmD;IACnD,MAAM,oBAAoB,GAAG,yBAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAC3E,OAAO,oBAAoB;QACzB,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;AACzC,CAAC;AAND,8CAMC","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 Utilities\n */\n\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** A helper function used to get the active viewport in conditional definitions.\n * Uses the deprecated active content control APIs to get the active viewport or the selected view of the view manager as a fallback.\n * @note Might need a better strategy for a use case where selected view fallback behavior is not desired (i.e. a map of active content id to a viewport).\n * @internal\n */\nexport function getActiveViewport() {\n // eslint-disable-next-line deprecation/deprecation\n const activeContentControl = UiFramework.content.getActiveContentControl();\n return activeContentControl\n ? activeContentControl.viewport\n : IModelApp.viewManager.selectedView;\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { ToolbarItem } from "../toolbar/ToolbarItem";
|
|
6
6
|
/** Properties that can be used to append items to the default set of toolbar items.
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof BasicNavigationWidget>`
|
|
8
9
|
*/
|
|
9
10
|
export interface BasicNavigationWidgetProps {
|
|
10
11
|
/** optional set of additional items to include in horizontal toolbar */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicNavigationWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicNavigationWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D
|
|
1
|
+
{"version":3,"file":"BasicNavigationWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicNavigationWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,wEAAwE;IACxE,yBAAyB,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1C,sEAAsE;IACtE,uBAAuB,CAAC,EAAE,WAAW,EAAE,CAAC;CACzC;AAED;;;GAGG;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAqFtE"}
|
|
@@ -19,6 +19,7 @@ const ToolbarItems_1 = require("../tools/ToolbarItems");
|
|
|
19
19
|
* Supports the specification of additional horizontal and vertical toolbar items through props.
|
|
20
20
|
* @public
|
|
21
21
|
*/
|
|
22
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
22
23
|
function BasicNavigationWidget(props) {
|
|
23
24
|
const getHorizontalToolbarItems = React.useCallback(() => {
|
|
24
25
|
const items = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicNavigationWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicNavigationWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,8DAA2D;AAC3D,yEAAsE;AAEtE,wDAA0E;AAC1E,wDAAqD;
|
|
1
|
+
{"version":3,"file":"BasicNavigationWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicNavigationWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;A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Q,GACxC,GAEJ,CACH,CAAC;AACJ,CAAC;AArFD,sDAqFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ToolbarComposer } from \"../toolbar/ToolbarComposer\";\nimport { useUiVisibility } from \"../hooks/useUiVisibility\";\nimport { NavigationWidgetComposer } from \"./NavigationWidgetComposer\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\nimport { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/** Properties that can be used to append items to the default set of toolbar items.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof BasicNavigationWidget>`\n */\nexport interface BasicNavigationWidgetProps {\n /** optional set of additional items to include in horizontal toolbar */\n additionalHorizontalItems?: ToolbarItem[];\n /** optional set of additional items to include in vertical toolbar */\n additionalVerticalItems?: ToolbarItem[];\n}\n\n/** Basic Navigation Widget that provides standard tools to manipulate views containing element data.\n * Supports the specification of additional horizontal and vertical toolbar items through props.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BasicNavigationWidget(props: BasicNavigationWidgetProps) {\n const getHorizontalToolbarItems = React.useCallback((): ToolbarItem[] => {\n const items: ToolbarItem[] = [\n ToolbarItems.createRotateView({\n itemPriority: 10,\n }),\n ToolbarItems.createPanView({\n itemPriority: 20,\n }),\n ToolbarItems.createFitView({\n itemPriority: 30,\n }),\n ToolbarItems.createWindowArea({\n itemPriority: 40,\n }),\n ToolbarItems.createViewUndo({\n itemPriority: 50,\n }),\n ToolbarItems.createViewRedo({\n itemPriority: 60,\n }),\n ];\n if (props.additionalHorizontalItems)\n items.push(...props.additionalHorizontalItems);\n return items;\n }, [props.additionalHorizontalItems]);\n\n const getVerticalToolbarItems = React.useCallback((): ToolbarItem[] => {\n const items: ToolbarItem[] = [];\n items.push(\n ToolbarItems.createWalkView({\n itemPriority: 10,\n }),\n ToolbarItems.createToggleCameraView({\n itemPriority: 20,\n })\n );\n if (props.additionalVerticalItems)\n items.push(...props.additionalVerticalItems);\n return items;\n }, [props.additionalVerticalItems]);\n\n const [horizontalItems, setHorizontalItems] = React.useState(() =>\n getHorizontalToolbarItems()\n );\n const [verticalItems, setVerticalItems] = React.useState(() =>\n getVerticalToolbarItems()\n );\n\n const isInitialMount = React.useRef(true);\n React.useEffect(() => {\n if (isInitialMount.current) isInitialMount.current = false;\n else {\n setHorizontalItems(getHorizontalToolbarItems());\n setVerticalItems(getVerticalToolbarItems());\n }\n }, [\n props.additionalHorizontalItems,\n props.additionalVerticalItems,\n getHorizontalToolbarItems,\n getVerticalToolbarItems,\n ]);\n\n const uiIsVisible = useUiVisibility();\n const className = classnames(!uiIsVisible && \"nz-hidden\");\n\n return (\n <NavigationWidgetComposer\n className={className}\n horizontalToolbar={\n <ToolbarComposer\n items={horizontalItems}\n usage={ToolbarUsage.ViewNavigation}\n orientation={ToolbarOrientation.Horizontal}\n />\n }\n verticalToolbar={\n <ToolbarComposer\n items={verticalItems}\n usage={ToolbarUsage.ViewNavigation}\n orientation={ToolbarOrientation.Vertical}\n />\n }\n />\n );\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { ToolbarItem } from "../toolbar/ToolbarItem";
|
|
6
6
|
/** Properties that can be used to append items to the default set of toolbar items.
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof BasicToolWidget>`
|
|
8
9
|
*/
|
|
9
10
|
export interface BasicToolWidgetProps {
|
|
10
11
|
/** if true include hide/isolate Models and Categories */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicToolWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicToolWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D
|
|
1
|
+
{"version":3,"file":"BasicToolWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicToolWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C,qHAAqH;IACrH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,yBAAyB,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1C,sEAAsE;IACtE,uBAAuB,CAAC,EAAE,WAAW,EAAE,CAAC;CACzC;AAED;;;GAGG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAgH1D"}
|
|
@@ -20,6 +20,7 @@ const ToolbarItems_1 = require("../tools/ToolbarItems");
|
|
|
20
20
|
* This definition will also show a overflow button if there is not enough room to display all the toolbar buttons.
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
23
24
|
function BasicToolWidget(props) {
|
|
24
25
|
const getHorizontalToolbarItems = React.useCallback((useCategoryAndModelsContextTools) => {
|
|
25
26
|
const items = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicToolWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicToolWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,6DAA0D;AAC1D,6DAA0D;AAC1D,8DAA2D;AAE3D,wDAA0E;AAC1E,wDAAqD;
|
|
1
|
+
{"version":3,"file":"BasicToolWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/BasicToolWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,6DAA0D;AAC1D,6DAA0D;AAC1D,8DAA2D;AAE3D,wDAA0E;AAC1E,wDAAqD;AAiBrD;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,eAAe,CAAC,KAA2B;IACzD,MAAM,yBAAyB,GAAG,KAAK,CAAC,WAAW,CACjD,CAAC,gCAAyC,EAAiB,EAAE;QAC3D,MAAM,KAAK,GAAkB,EAAE,CAAC;QAChC,IAAI,gCAAgC,EAAE,CAAC;YACrC,KAAK,CAAC,IAAI,CACR,2BAAY,CAAC,oBAAoB,CAAC;gBAChC,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,uCAAuC,CAAC;gBACnD,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,sBAAsB,CAAC;gBAClC,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,2BAA2B,CAAC;gBACvC,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,uBAAuB,CAAC;gBACnC,YAAY,EAAE,EAAE;aACjB,CAAC,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CACR,2BAAY,CAAC,oBAAoB,CAAC;gBAChC,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,uCAAuC,CAAC;gBACnD,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,kBAAkB,CAAC;gBAC9B,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CAAC,qBAAqB,CAAC;gBACjC,YAAY,EAAE,EAAE;aACjB,CAAC,EACF,2BAAY,CA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C,OAAO,GAAG,KAAK,CAAC;aACtD,CAAC;YACJ,kBAAkB,CAChB,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CACrE,CAAC;YACF,gBAAgB,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,EAAE;QACD,KAAK,CAAC,iCAAiC;QACvC,KAAK,CAAC,yBAAyB;QAC/B,KAAK,CAAC,uBAAuB;QAC7B,yBAAyB;QACzB,uBAAuB;KACxB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,IAAA,iCAAe,GAAE,CAAC;IACtC,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,CAAC,WAAW,IAAI,WAAW,CAAC,CAAC;IAC1D,OAAO,CACL,oBAAC,uCAAkB,IACjB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,oBAAC,uCAAkB,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,EACpD,iBAAiB,EACf,oBAAC,iCAAe,IACd,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,0BAAY,CAAC,mBAAmB,EACvC,WAAW,EAAE,gCAAkB,CAAC,UAAU,GAC1C,EAEJ,eAAe,EACb,oBAAC,iCAAe,IACd,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,0BAAY,CAAC,mBAAmB,EACvC,WAAW,EAAE,gCAAkB,CAAC,QAAQ,GACxC,GAEJ,CACH,CAAC;AACJ,CAAC;AAhHD,0CAgHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ToolbarComposer } from \"../toolbar/ToolbarComposer\";\nimport { ToolWidgetComposer } from \"./ToolWidgetComposer\";\nimport { BackstageAppButton } from \"./BackstageAppButton\";\nimport { useUiVisibility } from \"../hooks/useUiVisibility\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\nimport { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/** Properties that can be used to append items to the default set of toolbar items.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof BasicToolWidget>`\n */\nexport interface BasicToolWidgetProps {\n /** if true include hide/isolate Models and Categories */\n showCategoryAndModelsContextTools?: boolean;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n icon?: string;\n /** optional set of additional items to include in horizontal toolbar */\n additionalHorizontalItems?: ToolbarItem[];\n /** optional set of additional items to include in vertical toolbar */\n additionalVerticalItems?: ToolbarItem[];\n}\n\n/** Default Tool Widget for standard \"review\" applications. Provides standard tools to review, and measure elements.\n * This definition will also show a overflow button if there is not enough room to display all the toolbar buttons.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BasicToolWidget(props: BasicToolWidgetProps) {\n const getHorizontalToolbarItems = React.useCallback(\n (useCategoryAndModelsContextTools: boolean): ToolbarItem[] => {\n const items: ToolbarItem[] = [];\n if (useCategoryAndModelsContextTools) {\n items.push(\n ToolbarItems.createClearSelection({\n itemPriority: 10,\n }),\n ToolbarItems.createClearHideIsolateEmphasizeElements({\n itemPriority: 20,\n }),\n ToolbarItems.createHideSectionGroup({\n itemPriority: 30,\n }),\n ToolbarItems.createIsolateSelectionGroup({\n itemPriority: 40,\n }),\n ToolbarItems.createEmphasizeElements({\n itemPriority: 50,\n })\n );\n } else {\n items.push(\n ToolbarItems.createClearSelection({\n itemPriority: 10,\n }),\n ToolbarItems.createClearHideIsolateEmphasizeElements({\n itemPriority: 20,\n }),\n ToolbarItems.createHideElements({\n itemPriority: 30,\n }),\n ToolbarItems.createIsolateElements({\n itemPriority: 40,\n }),\n ToolbarItems.createEmphasizeElements({\n itemPriority: 50,\n })\n );\n }\n if (props.additionalHorizontalItems)\n items.push(...props.additionalHorizontalItems);\n return items;\n },\n [props.additionalHorizontalItems]\n );\n\n const getVerticalToolbarItems = React.useCallback((): ToolbarItem[] => {\n const items: ToolbarItem[] = [];\n items.push(\n ToolbarItems.createSelectElement({\n itemPriority: 10,\n }),\n ToolbarItems.createMeasureGroup({\n itemPriority: 20,\n }),\n ToolbarItems.createSectionGroup({\n itemPriority: 30,\n })\n );\n if (props.additionalVerticalItems)\n items.push(...props.additionalVerticalItems);\n return items;\n }, [props.additionalVerticalItems]);\n\n const [horizontalItems, setHorizontalItems] = React.useState(() =>\n getHorizontalToolbarItems(!!props.showCategoryAndModelsContextTools)\n );\n const [verticalItems, setVerticalItems] = React.useState(() =>\n getVerticalToolbarItems()\n );\n\n const isInitialMount = React.useRef(true);\n React.useEffect(() => {\n if (isInitialMount.current) isInitialMount.current = false;\n else {\n setHorizontalItems(\n getHorizontalToolbarItems(!!props.showCategoryAndModelsContextTools)\n );\n setVerticalItems(getVerticalToolbarItems());\n }\n }, [\n props.showCategoryAndModelsContextTools,\n props.additionalHorizontalItems,\n props.additionalVerticalItems,\n getHorizontalToolbarItems,\n getVerticalToolbarItems,\n ]);\n\n const uiIsVisible = useUiVisibility();\n const className = classnames(!uiIsVisible && \"nz-hidden\");\n return (\n <ToolWidgetComposer\n className={className}\n cornerItem={<BackstageAppButton icon={props.icon} />}\n horizontalToolbar={\n <ToolbarComposer\n items={horizontalItems}\n usage={ToolbarUsage.ContentManipulation}\n orientation={ToolbarOrientation.Horizontal}\n />\n }\n verticalToolbar={\n <ToolbarComposer\n items={verticalItems}\n usage={ToolbarUsage.ContentManipulation}\n orientation={ToolbarOrientation.Vertical}\n />\n }\n />\n );\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for [[ContentToolWidgetComposer]].
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof ContentToolWidgetComposer>`
|
|
8
9
|
*/
|
|
9
10
|
export interface ContentToolWidgetComposerProps {
|
|
10
11
|
/** If default backstage button is desired use <BackstageAppButton />. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ContentToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B
|
|
1
|
+
{"version":3,"file":"ContentToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ContentToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,yEAAyE;IACzE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,yBAAyB,CAEvC,KAAK,EAAE,8BAA8B,qBAyBtC"}
|
|
@@ -38,7 +38,9 @@ const ToolbarItem_1 = require("../toolbar/ToolbarItem");
|
|
|
38
38
|
* BackstageCornerButton,
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
function ContentToolWidgetComposer(
|
|
41
|
+
function ContentToolWidgetComposer(
|
|
42
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
43
|
+
props) {
|
|
42
44
|
const { cornerButton } = props;
|
|
43
45
|
const uiIsVisible = (0, useUiVisibility_1.useUiVisibility)();
|
|
44
46
|
const className = (0, classnames_1.default)(!uiIsVisible && "nz-hidden");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ContentToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,6DAA0D;AAC1D,8DAA2D;AAC3D,wDAA0E;
|
|
1
|
+
{"version":3,"file":"ContentToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ContentToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,6DAA0D;AAC1D,8DAA2D;AAC3D,wDAA0E;AAY1E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,yBAAyB;AACvC,sDAAsD;AACtD,KAAqC;IAErC,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,WAAW,GAAG,IAAA,iCAAe,GAAE,CAAC;IACtC,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,CAAC,WAAW,IAAI,WAAW,CAAC,CAAC;IAC1D,OAAO,CACL,oBAAC,uCAAkB,IACjB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,YAAY,EACxB,iBAAiB,EACf,oBAAC,iCAAe,IACd,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,0BAAY,CAAC,mBAAmB,EACvC,WAAW,EAAE,gCAAkB,CAAC,UAAU,GAC1C,EAEJ,eAAe,EACb,oBAAC,iCAAe,IACd,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,0BAAY,CAAC,mBAAmB,EACvC,WAAW,EAAE,gCAAkB,CAAC,QAAQ,GACxC,GAEJ,CACH,CAAC;AACJ,CAAC;AA3BD,8DA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ToolbarComposer } from \"../toolbar/ToolbarComposer\";\nimport { ToolWidgetComposer } from \"./ToolWidgetComposer\";\nimport { useUiVisibility } from \"../hooks/useUiVisibility\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\n\n/**\n * Props for [[ContentToolWidgetComposer]].\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ContentToolWidgetComposer>`\n */\nexport interface ContentToolWidgetComposerProps {\n /** If default backstage button is desired use <BackstageAppButton />. */\n cornerButton?: React.ReactNode;\n}\n\n/**\n * ContentToolWidgetComposer composes a Tool Widget with no tools defined by default. UiItemsProviders\n * are used to populate the toolbars. See [[StandardContentToolsProvider]].\n * @example\n * ToolWidget with no corner button\n * ```\n * <ContentToolWidgetComposer />\n * ```\n * ToolWidget with corner button\n * ```\n * const cornerButton = <BackstageAppButton icon={<SvgBentleySystems />} />;\n * <ContentToolWidgetComposer cornerButton={cornerButton} />\n * ```\n * ToolWidget with custom corner button\n * ```\n * const cornerButton = <BackstageAppButton icon={<SvgBentleySystems />}\n * label=\"Toggle Backstage display\",\n * execute={() => UiFramework.backstage.getBackstageToggleCommand().execute()} />;\n * <ContentToolWidgetComposer cornerButton={cornerButton} />\n * ```\n *\n * BackstageCornerButton,\n * @public\n */\nexport function ContentToolWidgetComposer(\n /* eslint-disable-next-line deprecation/deprecation */\n props: ContentToolWidgetComposerProps\n) {\n const { cornerButton } = props;\n const uiIsVisible = useUiVisibility();\n const className = classnames(!uiIsVisible && \"nz-hidden\");\n return (\n <ToolWidgetComposer\n className={className}\n cornerItem={cornerButton}\n horizontalToolbar={\n <ToolbarComposer\n items={[]}\n usage={ToolbarUsage.ContentManipulation}\n orientation={ToolbarOrientation.Horizontal}\n />\n }\n verticalToolbar={\n <ToolbarComposer\n items={[]}\n usage={ToolbarUsage.ContentManipulation}\n orientation={ToolbarOrientation.Vertical}\n />\n }\n />\n );\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { CommonProps } from "@itwin/core-react";
|
|
6
6
|
/** Properties for the [[NavigationAidHost]] React component
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof NavigationAidHost>`
|
|
8
9
|
*/
|
|
9
10
|
export interface NavigationAidHostProps {
|
|
10
11
|
/** Navigation Aid Host minimum width. Defaults to "64px". */
|
|
@@ -20,6 +21,7 @@ export interface NavigationAidHostProps {
|
|
|
20
21
|
export declare function NavigationAidHost(props: NavigationAidHostProps): React.JSX.Element;
|
|
21
22
|
/** Properties for the [[NavigationWidgetComposer]] React components
|
|
22
23
|
* @public
|
|
24
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof NavigationWidgetComposer>`
|
|
23
25
|
*/
|
|
24
26
|
export interface NavigationWidgetComposerProps extends CommonProps {
|
|
25
27
|
/** Optional horizontal toolbar */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/NavigationWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgDrD
|
|
1
|
+
{"version":3,"file":"NavigationWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/NavigationWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgDrD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AAEH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBA0G9D;AA8BD;;;GAGG;AAEH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,gCAAgC;IAChC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AAEH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qBAwC5E"}
|
|
@@ -41,6 +41,7 @@ activeContentControl, navigationAidId, activeViewport
|
|
|
41
41
|
* If an active content is defined without a content control (`classId` is set to an empty string) renders a default navigation aid based on an active viewport view state.
|
|
42
42
|
* @public
|
|
43
43
|
*/
|
|
44
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
44
45
|
function NavigationAidHost(props) {
|
|
45
46
|
const [activeContentControl, setActiveContentControl] = React.useState(() =>
|
|
46
47
|
// eslint-disable-next-line deprecation/deprecation
|
|
@@ -130,6 +131,7 @@ function DefaultNavigationAid() {
|
|
|
130
131
|
* and typically holds tools to visually navigate, orient, and zoom to specific content.
|
|
131
132
|
* @public
|
|
132
133
|
*/
|
|
134
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
133
135
|
function NavigationWidgetComposer(props) {
|
|
134
136
|
const { navigationAidHost, horizontalToolbar, verticalToolbar, hideNavigationAid, ...otherProps } = props;
|
|
135
137
|
const [elementSet] = React.useState(new core_react_1.WidgetElementSet());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/NavigationWidgetComposer.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,sDAAsD;AACtD,wDAM8B;AAE9B,kDAK2B;AAC3B,4EAIwC;AAExC,oEAAiE;AAEjE,gDAA6C;AAC7C,kEA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EACjC,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAiBD;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,6BAAgB,EAAE,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,UAAoC,EAAE,EAAE;QACvC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IACF,MAAM,cAAc,GAAG,IAAA,gCAAmB,EACxC,UAAU,EACV,yBAAW,CAAC,UAAU,CAAC,iBAAiB,CACzC,CAAC;IAEF,MAAM,aAAa,GAAG,iBAAiB;QACrC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,iBAAiB,IAAI,oBAAC,iBAAiB,OAAG,CAAC;IAE/C,OAAO,CACL,oBAAC,iCAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,YAAY,EAAE,cAAc;YAC5B,cAAc;SACf;QAED,oBAAC,+BAAc,IACb,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,KAC5B,UAAU,EACd,YAAY,EAAE,yBAAW,CAAC,UAAU,CAAC,sBAAsB,GAC3D,CAC4B,CACjC,CAAC;AACJ,CAAC;AAxCD,4DAwCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\nimport * as React from \"react\";\nimport { ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n DrawingViewState,\n OrthographicViewState,\n type ScreenViewport,\n SheetViewState,\n SpatialViewState,\n} from \"@itwin/core-frontend\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport {\n useProximityToMouse,\n useWidgetOpacityContext,\n WidgetElementSet,\n WidgetOpacityContext,\n} from \"@itwin/core-react\";\nimport {\n CubeNavigationAid,\n DrawingNavigationAid,\n ViewportComponentEvents,\n} from \"@itwin/imodel-components-react\";\nimport type { ContentControl } from \"../content/ContentControl\";\nimport { NavigationArea } from \"../layout/widget/NavigationArea\";\nimport type { NavigationAidControl } from \"../navigationaids/NavigationAidControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport { SheetNavigationAid } from \"../navigationaids/SheetNavigationAid\";\n\nfunction createNavigationAidControl(\n // eslint-disable-next-line deprecation/deprecation\n activeContentControl: ContentControl | undefined,\n navigationAidId: string,\n activeViewport: ScreenViewport | undefined\n // eslint-disable-next-line deprecation/deprecation\n): NavigationAidControl | undefined {\n if (\n !activeContentControl ||\n !navigationAidId ||\n activeViewport !== activeContentControl.viewport\n )\n return undefined;\n\n const viewport = activeContentControl.viewport;\n const imodel = viewport ? viewport.iModel : UiFramework.getIModelConnection();\n // eslint-disable-next-line deprecation/deprecation\n const navigationAidControl = UiFramework.controls.create(\n navigationAidId,\n navigationAidId,\n { imodel, viewport }\n // eslint-disable-next-line deprecation/deprecation\n ) as NavigationAidControl;\n\n navigationAidControl.initialize();\n return navigationAidControl;\n}\n\n/** Properties for the [[NavigationAidHost]] React component\n * @public\n */\nexport interface NavigationAidHostProps {\n /** Navigation Aid Host minimum width. Defaults to \"64px\". */\n minWidth?: string;\n /** Navigation Aid Host minimum height. Defaults to \"64px\". */\n minHeight?: string;\n}\n\n/** Component that is used as a default navigation aid.\n * Uses registered navigation aids and the active content control to determine if or which navigation aid to display.\n * If an active content is defined without a content control (`classId` is set to an empty string) renders a default navigation aid based on an active viewport view state.\n * @public\n */\nexport function NavigationAidHost(props: NavigationAidHostProps) {\n const [activeContentControl, setActiveContentControl] = React.useState(() =>\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.getActiveContentControl()\n );\n const [activeContentViewport, setActiveContentViewport] = React.useState(\n () => activeContentControl?.viewport\n );\n const [navigationAidId, setNavigationAidId] = React.useState(() =>\n activeContentControl ? activeContentControl.navigationAidControl : \"\"\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line deprecation/deprecation\n return UiFramework.frontstages.onContentControlActivatedEvent.addListener(\n (args) => {\n setActiveContentControl(args.activeContentControl);\n setActiveContentViewport(args.activeContentControl.viewport);\n setNavigationAidId(args.activeContentControl.navigationAidControl);\n }\n );\n }, []);\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n args.id;\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const contentGroup = frontstageDef.contentGroup;\n if (!contentGroup) return;\n\n const content = contentGroup.contentPropsList.find(\n (contentProps) => contentProps.id === args.id\n );\n if (!content?.content) return;\n\n // Content w/o a control is activated - reset the navigation.\n setActiveContentControl(undefined);\n setActiveContentViewport(undefined);\n setNavigationAidId(\"\");\n }\n );\n }, []);\n\n const [activeViewClass, setActiveViewClass] = React.useState(() => {\n // eslint-disable-next-line deprecation/deprecation\n const content = UiFramework.content.getActiveContentControl();\n if (content && content.viewport) return content.viewport.view.classFullName;\n return \"\";\n });\n\n React.useEffect(() => {\n return ViewportComponentEvents.onViewClassFullNameChangedEvent.addListener(\n (args) => {\n setActiveViewClass(args.newName);\n }\n );\n }, [activeViewClass]);\n\n const navigationAidControl = React.useMemo(\n () =>\n createNavigationAidControl(\n activeContentControl,\n navigationAidId,\n activeContentViewport\n ),\n [activeContentControl, navigationAidId, activeContentViewport]\n );\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n const isInitialMount = React.useRef(true);\n const { onElementRef, proximityScale } = useWidgetOpacityContext();\n\n React.useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n onElementRef(ref);\n }\n }, [onElementRef]);\n\n const divStyle: React.CSSProperties = {\n minWidth: props.minWidth ? props.minWidth : \"64px\",\n minHeight: props.minHeight ? props.minHeight : \"64px\",\n };\n\n if (\n (UiFramework.visibility.useProximityOpacity || // eslint-disable-line deprecation/deprecation\n UiFramework.visibility.snapWidgetOpacity) &&\n !ProcessDetector.isMobileBrowser\n ) {\n const navigationAidOpacity = 0.3 * proximityScale + 0.7;\n divStyle.opacity = `${navigationAidOpacity}`;\n }\n\n const navigationAid = activeContentControl ? (\n navigationAidControl?.reactNode\n ) : (\n <DefaultNavigationAid />\n );\n return (\n <div style={divStyle} ref={ref}>\n {navigationAid}\n </div>\n );\n}\n\nfunction DefaultNavigationAid() {\n const viewport = useActiveViewport();\n if (!viewport) return null;\n\n const className = ViewUtilities.getBisBaseClass(viewport.view.classFullName);\n switch (className) {\n case SheetViewState.className:\n return <SheetNavigationAid iModelConnection={viewport.iModel} />;\n case DrawingViewState.className:\n return (\n <DrawingNavigationAid\n iModelConnection={viewport.iModel}\n viewport={viewport}\n />\n );\n case SpatialViewState.className:\n case OrthographicViewState.className:\n return (\n <CubeNavigationAid\n iModelConnection={viewport.iModel}\n viewport={viewport}\n />\n );\n }\n\n return null;\n}\n\n/** Properties for the [[NavigationWidgetComposer]] React components\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface NavigationWidgetComposerProps extends CommonProps {\n /** Optional horizontal toolbar */\n horizontalToolbar?: React.ReactNode;\n /** Optional vertical toolbar */\n verticalToolbar?: React.ReactNode;\n /** Optional navigation aid to override the default {@link NavigationAidHost}. */\n navigationAidHost?: React.ReactNode;\n /** If true no navigation aid will be shown. Defaults to `false`. */\n hideNavigationAid?: boolean;\n}\n\n/**\n * Component that Composes a NavigationWidget typically using toolbars generated via [[ToolbarComposer]] class. The Navigation widget is shown in the top right of the content area\n * and typically holds tools to visually navigate, orient, and zoom to specific content.\n * @public\n */\nexport function NavigationWidgetComposer(props: NavigationWidgetComposerProps) {\n const {\n navigationAidHost,\n horizontalToolbar,\n verticalToolbar,\n hideNavigationAid,\n ...otherProps\n } = props;\n const [elementSet] = React.useState(new WidgetElementSet());\n const handleChildRef = React.useCallback(\n (elementRef: React.RefObject<Element>) => {\n elementSet.add(elementRef);\n },\n [elementSet]\n );\n const proximityScale = useProximityToMouse(\n elementSet,\n UiFramework.visibility.snapWidgetOpacity\n );\n\n const navigationAid = hideNavigationAid\n ? undefined\n : navigationAidHost ?? <NavigationAidHost />;\n\n return (\n <WidgetOpacityContext.Provider\n value={{\n onElementRef: handleChildRef,\n proximityScale,\n }}\n >\n <NavigationArea\n navigationAid={navigationAid}\n horizontalToolbar={horizontalToolbar}\n verticalToolbar={verticalToolbar}\n {...otherProps}\n onMouseEnter={UiFramework.visibility.handleWidgetMouseEnter}\n />\n </WidgetOpacityContext.Provider>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/NavigationWidgetComposer.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,sDAAsD;AACtD,wDAM8B;AAE9B,kDAK2B;AAC3B,4EAIwC;AAExC,oEAAiE;AAEjE,gDAA6C;AAC7C,kEAA+D;AAC/D,0DAAuD;AACvD,6EAA0E;AAE1E,SAAS,0BAA0B;AACjC,mDAAmD;AACnD,oBAAgD,EAChD,eAAuB,EACvB,cAA0C;AAC1C,mDAAmD;;IAEnD,IACE,CAAC,oBAAoB;QACrB,CAAC,eAAe;QAChB,cAAc,KAAK,oBAAoB,CAAC,QAAQ;QAEhD,OAAO,SAAS,CAAC;IAEnB,MAAM,QAAQ,GAAG,oBAAoB,CAAC,QAAQ,CAAC;IAC/C,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CA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AE,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,UAAoC,EAAE,EAAE;QACvC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IACF,MAAM,cAAc,GAAG,IAAA,gCAAmB,EACxC,UAAU,EACV,yBAAW,CAAC,UAAU,CAAC,iBAAiB,CACzC,CAAC;IAEF,MAAM,aAAa,GAAG,iBAAiB;QACrC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,iBAAiB,IAAI,oBAAC,iBAAiB,OAAG,CAAC;IAE/C,OAAO,CACL,oBAAC,iCAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,YAAY,EAAE,cAAc;YAC5B,cAAc;SACf;QAED,oBAAC,+BAAc,IACb,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,KAC5B,UAAU,EACd,YAAY,EAAE,yBAAW,CAAC,UAAU,CAAC,sBAAsB,GAC3D,CAC4B,CACjC,CAAC;AACJ,CAAC;AAxCD,4DAwCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\nimport * as React from \"react\";\nimport { ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n DrawingViewState,\n OrthographicViewState,\n type ScreenViewport,\n SheetViewState,\n SpatialViewState,\n} from \"@itwin/core-frontend\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport {\n useProximityToMouse,\n useWidgetOpacityContext,\n WidgetElementSet,\n WidgetOpacityContext,\n} from \"@itwin/core-react\";\nimport {\n CubeNavigationAid,\n DrawingNavigationAid,\n ViewportComponentEvents,\n} from \"@itwin/imodel-components-react\";\nimport type { ContentControl } from \"../content/ContentControl\";\nimport { NavigationArea } from \"../layout/widget/NavigationArea\";\nimport type { NavigationAidControl } from \"../navigationaids/NavigationAidControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport { SheetNavigationAid } from \"../navigationaids/SheetNavigationAid\";\n\nfunction createNavigationAidControl(\n // eslint-disable-next-line deprecation/deprecation\n activeContentControl: ContentControl | undefined,\n navigationAidId: string,\n activeViewport: ScreenViewport | undefined\n // eslint-disable-next-line deprecation/deprecation\n): NavigationAidControl | undefined {\n if (\n !activeContentControl ||\n !navigationAidId ||\n activeViewport !== activeContentControl.viewport\n )\n return undefined;\n\n const viewport = activeContentControl.viewport;\n const imodel = viewport ? viewport.iModel : UiFramework.getIModelConnection();\n // eslint-disable-next-line deprecation/deprecation\n const navigationAidControl = UiFramework.controls.create(\n navigationAidId,\n navigationAidId,\n { imodel, viewport }\n // eslint-disable-next-line deprecation/deprecation\n ) as NavigationAidControl;\n\n navigationAidControl.initialize();\n return navigationAidControl;\n}\n\n/** Properties for the [[NavigationAidHost]] React component\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof NavigationAidHost>`\n */\nexport interface NavigationAidHostProps {\n /** Navigation Aid Host minimum width. Defaults to \"64px\". */\n minWidth?: string;\n /** Navigation Aid Host minimum height. Defaults to \"64px\". */\n minHeight?: string;\n}\n\n/** Component that is used as a default navigation aid.\n * Uses registered navigation aids and the active content control to determine if or which navigation aid to display.\n * If an active content is defined without a content control (`classId` is set to an empty string) renders a default navigation aid based on an active viewport view state.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function NavigationAidHost(props: NavigationAidHostProps) {\n const [activeContentControl, setActiveContentControl] = React.useState(() =>\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.getActiveContentControl()\n );\n const [activeContentViewport, setActiveContentViewport] = React.useState(\n () => activeContentControl?.viewport\n );\n const [navigationAidId, setNavigationAidId] = React.useState(() =>\n activeContentControl ? activeContentControl.navigationAidControl : \"\"\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line deprecation/deprecation\n return UiFramework.frontstages.onContentControlActivatedEvent.addListener(\n (args) => {\n setActiveContentControl(args.activeContentControl);\n setActiveContentViewport(args.activeContentControl.viewport);\n setNavigationAidId(args.activeContentControl.navigationAidControl);\n }\n );\n }, []);\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n args.id;\n const frontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontstageDef) return;\n\n const contentGroup = frontstageDef.contentGroup;\n if (!contentGroup) return;\n\n const content = contentGroup.contentPropsList.find(\n (contentProps) => contentProps.id === args.id\n );\n if (!content?.content) return;\n\n // Content w/o a control is activated - reset the navigation.\n setActiveContentControl(undefined);\n setActiveContentViewport(undefined);\n setNavigationAidId(\"\");\n }\n );\n }, []);\n\n const [activeViewClass, setActiveViewClass] = React.useState(() => {\n // eslint-disable-next-line deprecation/deprecation\n const content = UiFramework.content.getActiveContentControl();\n if (content && content.viewport) return content.viewport.view.classFullName;\n return \"\";\n });\n\n React.useEffect(() => {\n return ViewportComponentEvents.onViewClassFullNameChangedEvent.addListener(\n (args) => {\n setActiveViewClass(args.newName);\n }\n );\n }, [activeViewClass]);\n\n const navigationAidControl = React.useMemo(\n () =>\n createNavigationAidControl(\n activeContentControl,\n navigationAidId,\n activeContentViewport\n ),\n [activeContentControl, navigationAidId, activeContentViewport]\n );\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n const isInitialMount = React.useRef(true);\n const { onElementRef, proximityScale } = useWidgetOpacityContext();\n\n React.useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n onElementRef(ref);\n }\n }, [onElementRef]);\n\n const divStyle: React.CSSProperties = {\n minWidth: props.minWidth ? props.minWidth : \"64px\",\n minHeight: props.minHeight ? props.minHeight : \"64px\",\n };\n\n if (\n (UiFramework.visibility.useProximityOpacity || // eslint-disable-line deprecation/deprecation\n UiFramework.visibility.snapWidgetOpacity) &&\n !ProcessDetector.isMobileBrowser\n ) {\n const navigationAidOpacity = 0.3 * proximityScale + 0.7;\n divStyle.opacity = `${navigationAidOpacity}`;\n }\n\n const navigationAid = activeContentControl ? (\n navigationAidControl?.reactNode\n ) : (\n <DefaultNavigationAid />\n );\n return (\n <div style={divStyle} ref={ref}>\n {navigationAid}\n </div>\n );\n}\n\nfunction DefaultNavigationAid() {\n const viewport = useActiveViewport();\n if (!viewport) return null;\n\n const className = ViewUtilities.getBisBaseClass(viewport.view.classFullName);\n switch (className) {\n case SheetViewState.className:\n return <SheetNavigationAid iModelConnection={viewport.iModel} />;\n case DrawingViewState.className:\n return (\n <DrawingNavigationAid\n iModelConnection={viewport.iModel}\n viewport={viewport}\n />\n );\n case SpatialViewState.className:\n case OrthographicViewState.className:\n return (\n <CubeNavigationAid\n iModelConnection={viewport.iModel}\n viewport={viewport}\n />\n );\n }\n\n return null;\n}\n\n/** Properties for the [[NavigationWidgetComposer]] React components\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof NavigationWidgetComposer>`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface NavigationWidgetComposerProps extends CommonProps {\n /** Optional horizontal toolbar */\n horizontalToolbar?: React.ReactNode;\n /** Optional vertical toolbar */\n verticalToolbar?: React.ReactNode;\n /** Optional navigation aid to override the default {@link NavigationAidHost}. */\n navigationAidHost?: React.ReactNode;\n /** If true no navigation aid will be shown. Defaults to `false`. */\n hideNavigationAid?: boolean;\n}\n\n/**\n * Component that Composes a NavigationWidget typically using toolbars generated via [[ToolbarComposer]] class. The Navigation widget is shown in the top right of the content area\n * and typically holds tools to visually navigate, orient, and zoom to specific content.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function NavigationWidgetComposer(props: NavigationWidgetComposerProps) {\n const {\n navigationAidHost,\n horizontalToolbar,\n verticalToolbar,\n hideNavigationAid,\n ...otherProps\n } = props;\n const [elementSet] = React.useState(new WidgetElementSet());\n const handleChildRef = React.useCallback(\n (elementRef: React.RefObject<Element>) => {\n elementSet.add(elementRef);\n },\n [elementSet]\n );\n const proximityScale = useProximityToMouse(\n elementSet,\n UiFramework.visibility.snapWidgetOpacity\n );\n\n const navigationAid = hideNavigationAid\n ? undefined\n : navigationAidHost ?? <NavigationAidHost />;\n\n return (\n <WidgetOpacityContext.Provider\n value={{\n onElementRef: handleChildRef,\n proximityScale,\n }}\n >\n <NavigationArea\n navigationAid={navigationAid}\n horizontalToolbar={horizontalToolbar}\n verticalToolbar={verticalToolbar}\n {...otherProps}\n onMouseEnter={UiFramework.visibility.handleWidgetMouseEnter}\n />\n </WidgetOpacityContext.Provider>\n );\n}\n"]}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { CommonProps } from "@itwin/core-react";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
/** Properties for the [[
|
|
6
|
+
/** Properties for the [[ToolWidgetComposer]] React components
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof ToolWidgetComposer>`
|
|
8
9
|
*/
|
|
9
10
|
export interface ToolWidgetComposerProps extends CommonProps {
|
|
10
11
|
/** Optional Corner Item which for most stages is the [[BackstageAppButton]] used to toggle the display of the backstage menu. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"ToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,iIAAiI;IACjI,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,gCAAgC;IAChC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AAEH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,qBA+BhE"}
|
|
@@ -18,6 +18,7 @@ const UiFramework_1 = require("../UiFramework");
|
|
|
18
18
|
* selected items. The vertical toolbar typically contains a more fixed list of tools.
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
21
22
|
function ToolWidgetComposer(props) {
|
|
22
23
|
const { cornerItem, horizontalToolbar, verticalToolbar, ...otherProps } = props;
|
|
23
24
|
const [elementSet] = React.useState(new core_react_1.WidgetElementSet());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,kDAI2B;AAC3B,+BAA+B;AAC/B,0DAAuD;AACvD,gDAA6C;
|
|
1
|
+
{"version":3,"file":"ToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,kDAI2B;AAC3B,+BAA+B;AAC/B,0DAAuD;AACvD,gDAA6C;AAgB7C;;;;;GAKG;AACH,mDAAmD;AACnD,SAAgB,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,GACrE,KAAK,CAAC;IACR,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,6BAAgB,EAAE,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,UAAoC,EAAE,EAAE;QACvC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IACF,MAAM,cAAc,GAAG,IAAA,gCAAmB,EACxC,UAAU,EACV,yBAAW,CAAC,UAAU,CAAC,iBAAiB,CACzC,CAAC;IAEF,OAAO,CACL,oBAAC,iCAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,YAAY,EAAE,cAAc;YAC5B,cAAc;SACf;QAED,oBAAC,qBAAS,IACR,MAAM,EAAE,UAAU,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,KAC5B,UAAU,EACd,YAAY,EAAE,yBAAW,CAAC,UAAU,CAAC,sBAAsB,GAC3D,CAC4B,CACjC,CAAC;AACJ,CAAC;AA/BD,gDA+BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport type { CommonProps } from \"@itwin/core-react\";\nimport {\n useProximityToMouse,\n WidgetElementSet,\n WidgetOpacityContext,\n} from \"@itwin/core-react\";\nimport * as React from \"react\";\nimport { ToolsArea } from \"../layout/widget/ToolsArea\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for the [[ToolWidgetComposer]] React components\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ToolWidgetComposer>`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ToolWidgetComposerProps extends CommonProps {\n /** Optional Corner Item which for most stages is the [[BackstageAppButton]] used to toggle the display of the backstage menu. */\n cornerItem?: React.ReactNode;\n /** Optional Horizontal Toolbar */\n horizontalToolbar?: React.ReactNode;\n /** Optional Vertical Toolbar */\n verticalToolbar?: React.ReactNode;\n}\n\n/**\n * ToolWidget component that supports use of ToolbarComposer-based Toolbars. The ToolWidget is shown in the top left of the content area\n * and typically holds tools to manipulate or interrogate content. The horizontal toolbar often includes context specific tools based on\n * selected items. The vertical toolbar typically contains a more fixed list of tools.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ToolWidgetComposer(props: ToolWidgetComposerProps) {\n const { cornerItem, horizontalToolbar, verticalToolbar, ...otherProps } =\n props;\n const [elementSet] = React.useState(new WidgetElementSet());\n const handleChildRef = React.useCallback(\n (elementRef: React.RefObject<Element>) => {\n elementSet.add(elementRef);\n },\n [elementSet]\n );\n const proximityScale = useProximityToMouse(\n elementSet,\n UiFramework.visibility.snapWidgetOpacity\n );\n\n return (\n <WidgetOpacityContext.Provider\n value={{\n onElementRef: handleChildRef,\n proximityScale,\n }}\n >\n <ToolsArea\n button={cornerItem}\n horizontalToolbar={horizontalToolbar}\n verticalToolbar={verticalToolbar}\n {...otherProps}\n onMouseEnter={UiFramework.visibility.handleWidgetMouseEnter}\n />\n </WidgetOpacityContext.Provider>\n );\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for [[ViewToolWidgetComposer]].
|
|
7
7
|
* @public
|
|
8
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof ViewToolWidgetComposer>`
|
|
8
9
|
*/
|
|
9
10
|
export interface ViewToolWidgetComposerProps {
|
|
10
11
|
/** If true no navigation aid will be shown. Defaults to `false`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ViewToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B
|
|
1
|
+
{"version":3,"file":"ViewToolWidgetComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ViewToolWidgetComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AAEH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,qBAyBxE"}
|
|
@@ -27,6 +27,7 @@ const ToolbarItem_1 = require("../toolbar/ToolbarItem");
|
|
|
27
27
|
* ```
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
30
31
|
function ViewToolWidgetComposer(props) {
|
|
31
32
|
const uiIsVisible = (0, useUiVisibility_1.useUiVisibility)();
|
|
32
33
|
const className = (0, classnames_1.default)(!uiIsVisible && "nz-hidden");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ViewToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,8DAA2D;AAC3D,yEAAsE;AACtE,wDAA0E;
|
|
1
|
+
{"version":3,"file":"ViewToolWidgetComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/widgets/ViewToolWidgetComposer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAC/B,gEAA6D;AAC7D,8DAA2D;AAC3D,yEAAsE;AACtE,wDAA0E;AAc1E;;;;;;;;;;;;GAYG;AACH,mDAAmD;AACnD,SAAgB,sBAAsB,CAAC,KAAkC;IACvE,MAAM,WAAW,GAAG,IAAA,iCAAe,GAAE,CAAC;IACtC,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,CAAC,WAAW,IAAI,WAAW,CAAC,CAAC;IAE1D,OAAO,CACL,oBAAC,mDAAwB,IACvB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAC1C,iBAAiB,EAAE,KAAK,CAAC,aAAa,EACtC,iBAAiB,EACf,oBAAC,iCAAe,IACd,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,0BAAY,CAAC,cAAc,EAClC,WAAW,EAAE,gCAAkB,CAAC,UAAU,GAC1C,EAEJ,eAAe,EACb,oBAAC,iCAAe,IACd,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,0BAAY,CAAC,cAAc,EAClC,WAAW,EAAE,gCAAkB,CAAC,QAAQ,GACxC,GAEJ,CACH,CAAC;AACJ,CAAC;AAzBD,wDAyBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { ToolbarComposer } from \"../toolbar/ToolbarComposer\";\nimport { useUiVisibility } from \"../hooks/useUiVisibility\";\nimport { NavigationWidgetComposer } from \"./NavigationWidgetComposer\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\n\n/**\n * Props for [[ViewToolWidgetComposer]].\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ViewToolWidgetComposer>`\n */\nexport interface ViewToolWidgetComposerProps {\n /** If true no navigation aid will be shown. Defaults to `false`. */\n hideNavigationAid?: boolean;\n /** Overrides the default navigation aid. */\n navigationAid?: React.ReactNode;\n}\n\n/**\n * ViewToolWidgetComposer composes a Navigation Widget with no tools defined by default. UiItemsProviders\n * must be used to provide tools to populate the toolbars. See [[StandardNavigationToolsProvider]].\n * @example\n * ```\n * <ViewToolWidgetComposer />\n * ```\n * If no NavigationAid control is to be shown set hideNavigationAid.\n * * ```\n * <ViewToolWidgetComposer hideNavigationAid />\n * ```\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ViewToolWidgetComposer(props: ViewToolWidgetComposerProps) {\n const uiIsVisible = useUiVisibility();\n const className = classnames(!uiIsVisible && \"nz-hidden\");\n\n return (\n <NavigationWidgetComposer\n className={className}\n hideNavigationAid={props.hideNavigationAid}\n navigationAidHost={props.navigationAid}\n horizontalToolbar={\n <ToolbarComposer\n items={[]}\n usage={ToolbarUsage.ViewNavigation}\n orientation={ToolbarOrientation.Horizontal}\n />\n }\n verticalToolbar={\n <ToolbarComposer\n items={[]}\n usage={ToolbarUsage.ViewNavigation}\n orientation={ToolbarOrientation.Vertical}\n />\n }\n />\n );\n}\n"]}
|