@itwin/appui-react 4.16.5 → 4.17.1
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 +29 -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/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/configurableui/ConfigurableUiContent.scss +1 -0
- 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.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/layout/widget/FloatingTab.scss +1 -0
- package/lib/cjs/appui-react/layout/widget/FloatingWidget.scss +1 -0
- package/lib/cjs/appui-react/layout/widget/MenuTab.scss +1 -0
- package/lib/cjs/appui-react/layout/widget/Overflow.scss +1 -0
- package/lib/cjs/appui-react/layout/widget/Tab.scss +1 -0
- package/lib/cjs/appui-react/layout/widget/TabBar.scss +1 -0
- package/lib/cjs/appui-react/layout/widget-panels/CursorOverlay.scss +1 -0
- package/lib/cjs/appui-react/layout/widget-panels/Grip.scss +2 -0
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.scss +1 -0
- 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 +3 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.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/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/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/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/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/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/configurableui/ConfigurableUiContent.scss +1 -0
- 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.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/layout/widget/FloatingTab.scss +1 -0
- package/lib/esm/appui-react/layout/widget/FloatingWidget.scss +1 -0
- package/lib/esm/appui-react/layout/widget/MenuTab.scss +1 -0
- package/lib/esm/appui-react/layout/widget/Overflow.scss +1 -0
- package/lib/esm/appui-react/layout/widget/Tab.scss +1 -0
- package/lib/esm/appui-react/layout/widget/TabBar.scss +1 -0
- package/lib/esm/appui-react/layout/widget-panels/CursorOverlay.scss +1 -0
- package/lib/esm/appui-react/layout/widget-panels/Grip.scss +2 -0
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.scss +1 -0
- 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 +3 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.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/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/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/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/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":"ToolbarItemsManager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AM,CAAC;YACjD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAAE,OAAO;QAExD,MAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAE9B,IAAI,IAAA,gCAAkB,EAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,mDAAmD;oBACnD,KAAK,EAAE,mBAAmB,CAAC,+BAA+B,CACxD,WAAW,EACX,MAAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC;CACF;AAvTD,kDAuTC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarGroupItem } from \"./ToolbarItem\";\nimport { ConditionalIconValue } from \"../shared/ConditionalValue\";\n\nfunction isInstance<T>(args: T | ReadonlyArray<T>): args is T {\n return !Array.isArray(args);\n}\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<ToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n * @deprecated in 4.4.0. This is no longer used internally, left because of an erroneous public dependency that is also deprecated.\n */\nexport class ToolbarItemsManager {\n // This class should be removed once `useDefaultToolbarItems` and `useUiItemsProviderToolbarItems` (public version) get removed.\n // If you are attempting to fix/clean this class, it is probably an error as it is no longer used and should not be reintroduced, use Hooks instead.\n protected _items: ReadonlyArray<ToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<ToolbarItem>) {\n if (items) this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<\n (args: ToolbarItemsChangedArgs) => void\n >();\n\n private loadItemsInternal(\n items: ReadonlyArray<ToolbarItem>,\n processConditions: boolean,\n sendItemChanged: boolean\n ) {\n if (processConditions && items) {\n // eslint-disable-next-line deprecation/deprecation\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } =\n this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n if (itemsUpdated) items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged) this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<ToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<ToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<ToolbarItem>) {\n if (items !== this._items) this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: ToolbarItem | ReadonlyArray<ToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems)) itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter(\n (itemToAdd, index) =>\n itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index\n );\n }\n itemsToAdd = itemsToAdd.filter(\n (itemToAdd) =>\n this._items.find((item) => item.id === itemToAdd.id) === undefined\n );\n if (itemsToAdd.length === 0) return;\n const items = [...this._items, ...itemsToAdd];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(\n itemIdOrItemIds: ToolbarItem[\"id\"] | ReadonlyArray<ToolbarItem[\"id\"]>\n ) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds)\n ? item.id !== itemIdOrItemIds\n : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(\n eventIds: Set<string>,\n items: readonly ToolbarItem[]\n ) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalIconValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n }\n }\n if (isToolbarGroupItem(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly ToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(\n parentItem: ToolbarGroupItem,\n eventIds: Set<string>\n ): {\n childrenUpdated: boolean;\n childItems: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>;\n } {\n const updatedItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n let updatedItem;\n if (isToolbarGroupItem(item)) {\n updatedItem = { ...item };\n const { childrenUpdated, childItems } = this.refreshChildItems(\n updatedItem,\n eventIds\n );\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n } else {\n updatedItem = { ...item };\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalIconValue) {\n if (ConditionalIconValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(\n items: readonly ToolbarItem[],\n eventIds: Set<string>\n ): { itemsUpdated: boolean; updatedItems: ToolbarItem[] } {\n if (0 === eventIds.size) return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: ToolbarItem[] = [];\n for (const item of items) {\n let updatedItem = { ...item };\n if (isToolbarGroupItem(updatedItem)) {\n const { childrenUpdated, childItems } =\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n if (childrenUpdated) {\n updatedItem = {\n ...updatedItem,\n items: childItems,\n };\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalIconValue) {\n if (ConditionalIconValue.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n if (0 === eventIds.size) return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(\n this.items,\n eventIds\n );\n\n if (itemsUpdated) this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(\n children: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>,\n toolId: string\n ): boolean {\n for (const item of children) {\n if (isToolbarGroupItem(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (isToolbarGroupItem(item)) {\n if (\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(\n item.items,\n toolId\n )\n )\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(\n parentItem: ToolbarGroupItem,\n toolId: string\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n const newChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n for (const item of parentItem.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId)) return;\n\n const newItems: ToolbarItem[] = [];\n for (const item of this.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarItemsManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAG+B;AAC/B,sDAA8C;AAC9C,kDAAwD;AAMxD,+CAAmD;AAEnD,SAAS,UAAU,CAAI,IAA0B;IAC/C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AASD;;;;GAIG;AACH,MAAa,mBAAmB;IAK9B,YAAY,KAAkC;QAJ9C,gIAAgI;QAChI,oJAAoJ;QAC1I,WAAM,GAA+B,EAAE,CAAC;QAMlD;;WAEG;QACa,mBAAc,GAAG,IAAI,sBAAO,EAEzC,CAAC;QARF,IAAI,KAAK;YAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IASO,iBAAiB,CACvB,KAAiC,EACjC,iBAA0B,EAC1B,eAAwB;QAExB,IAAI,iBAAiB,IAAI,KAAK,EAAE,CAAC;YAC/B,mDAAmD;YACnD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACjE,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC1B,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAClC,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAE9D,IAAI,YAAY;oBAAE,KAAK,GAAG,YAAY,CAAC;YACzC,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,eAAe;YAAE,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,gCAAkB,EAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,mDAAmD;oBACnD,KAAK,EAAE,mBAAmB,CAAC,+BAA+B,CACxD,WAAW,EACX,MAAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAAE,OAAO;QAExD,MAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAE9B,IAAI,IAAA,gCAAkB,EAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,mDAAmD;oBACnD,KAAK,EAAE,mBAAmB,CAAC,+BAA+B,CACxD,WAAW,EACX,MAAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC;CACF;AA5TD,kDA4TC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { ConditionalIconItem } from \"@itwin/core-react\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarGroupItem } from \"./ToolbarItem\";\n\nfunction isInstance<T>(args: T | ReadonlyArray<T>): args is T {\n return !Array.isArray(args);\n}\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<ToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n * @deprecated in 4.4.0. This is no longer used internally, left because of an erroneous public dependency that is also deprecated.\n */\nexport class ToolbarItemsManager {\n // This class should be removed once `useDefaultToolbarItems` and `useUiItemsProviderToolbarItems` (public version) get removed.\n // If you are attempting to fix/clean this class, it is probably an error as it is no longer used and should not be reintroduced, use Hooks instead.\n protected _items: ReadonlyArray<ToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<ToolbarItem>) {\n if (items) this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<\n (args: ToolbarItemsChangedArgs) => void\n >();\n\n private loadItemsInternal(\n items: ReadonlyArray<ToolbarItem>,\n processConditions: boolean,\n sendItemChanged: boolean\n ) {\n if (processConditions && items) {\n // eslint-disable-next-line deprecation/deprecation\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } =\n this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n if (itemsUpdated) items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged) this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<ToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<ToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<ToolbarItem>) {\n if (items !== this._items) this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: ToolbarItem | ReadonlyArray<ToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems)) itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter(\n (itemToAdd, index) =>\n itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index\n );\n }\n itemsToAdd = itemsToAdd.filter(\n (itemToAdd) =>\n this._items.find((item) => item.id === itemToAdd.id) === undefined\n );\n if (itemsToAdd.length === 0) return;\n const items = [...this._items, ...itemsToAdd];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(\n itemIdOrItemIds: ToolbarItem[\"id\"] | ReadonlyArray<ToolbarItem[\"id\"]>\n ) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds)\n ? item.id !== itemIdOrItemIds\n : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(\n eventIds: Set<string>,\n items: readonly ToolbarItem[]\n ) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n }\n }\n if (isToolbarGroupItem(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly ToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(\n parentItem: ToolbarGroupItem,\n eventIds: Set<string>\n ): {\n childrenUpdated: boolean;\n childItems: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>;\n } {\n const updatedItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n let updatedItem;\n if (isToolbarGroupItem(item)) {\n updatedItem = { ...item };\n const { childrenUpdated, childItems } = this.refreshChildItems(\n updatedItem,\n eventIds\n );\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n } else {\n updatedItem = { ...item };\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n // eslint-disable-next-line deprecation/deprecation\n if (ConditionalIconItem.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(\n items: readonly ToolbarItem[],\n eventIds: Set<string>\n ): { itemsUpdated: boolean; updatedItems: ToolbarItem[] } {\n if (0 === eventIds.size) return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: ToolbarItem[] = [];\n for (const item of items) {\n let updatedItem = { ...item };\n if (isToolbarGroupItem(updatedItem)) {\n const { childrenUpdated, childItems } =\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n if (childrenUpdated) {\n updatedItem = {\n ...updatedItem,\n items: childItems,\n };\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n // eslint-disable-next-line deprecation/deprecation\n if (ConditionalIconItem.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n if (0 === eventIds.size) return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(\n this.items,\n eventIds\n );\n\n if (itemsUpdated) this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(\n children: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>,\n toolId: string\n ): boolean {\n for (const item of children) {\n if (isToolbarGroupItem(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (isToolbarGroupItem(item)) {\n if (\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(\n item.items,\n toolId\n )\n )\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(\n parentItem: ToolbarGroupItem,\n toolId: string\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n const newChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n for (const item of parentItem.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId)) return;\n\n const newItems: ToolbarItem[] = [];\n for (const item of this.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n}\n"]}
|
|
@@ -10,6 +10,7 @@ import type { UiItemsProvider } from "./UiItemsProvider";
|
|
|
10
10
|
/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
|
|
11
11
|
* active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
|
|
12
12
|
* @public
|
|
13
|
+
* @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.
|
|
13
14
|
*/
|
|
14
15
|
export declare class BaseUiItemsProvider implements UiItemsProvider {
|
|
15
16
|
protected _providerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"BaseUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAQvD,SAAS,CAAC,WAAW,EAAE,MAAM;IACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO;gBANF,WAAW,EAAE,MAAM,EACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO,aAAA;IAGd,IAAW,EAAE,IAAI,MAAM,CAEtB;IACM,YAAY,IAAI,IAAI;IAEpB,UAAU;IAIV,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,YAAY,EAC3B,mBAAmB,EAAE,kBAAkB,EACvC,aAAa,CAAC,EAAE,GAAG,GAClB,WAAW,EAAE;IAIT,mBAAmB,CACxB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAyBT,6BAA6B,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;IAIX,qBAAqB,CAC1B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,EAAE;IAmBX,sBAAsB,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,aAAa,CAAC,EAAE,GAAG,GAClB,MAAM,EAAE;IAIJ,cAAc,CACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,CAAC,MAAM,CAAC;CAwBzB"}
|
|
@@ -13,6 +13,7 @@ const UiItemsManager_1 = require("./UiItemsManager");
|
|
|
13
13
|
/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
|
|
14
14
|
* active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
|
|
15
15
|
* @public
|
|
16
|
+
* @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.
|
|
16
17
|
*/
|
|
17
18
|
class BaseUiItemsProvider {
|
|
18
19
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,yDAAsD;AAUtD,
|
|
1
|
+
{"version":3,"file":"BaseUiItemsProvider.js","sourceRoot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e,EACf,UAAkB,EAClB,YAAkB;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACpC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,UAAU,KAAK,uBAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/D,CAAC;QAED,OAAO,cAAc;YACnB,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC;YACvE,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAEM,sBAAsB,CAC3B,QAAgB,EAChB,WAAmB,EACnB,SAA6B,EAC7B,QAA4B,EAC5B,aAAmB;QAEnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,cAAc,CACnB,OAAe,EACf,UAAkB,EAClB,QAA4B,EAC5B,OAA2B,EAC3B,YAAkB;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACpC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,UAAU,KAAK,uBAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/D,CAAC;QAED,OAAO,cAAc;YACnB,CAAC,CAAC,IAAI,CAAC,sBAAsB,CACzB,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAY,CACb;YACH,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;CACF;AA1ID,kDA0IC","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 { StageUsage } from \"../frontstage/StageUsage\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { Widget } from \"../widgets/Widget\";\nimport { UiItemsManager, UiItemsProviderOverrides } from \"./UiItemsManager\";\nimport type { UiItemsProvider } from \"./UiItemsProvider\";\n\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\n * @public\n * @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.\n */\nexport class BaseUiItemsProvider implements UiItemsProvider {\n /*\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n constructor(\n protected _providerId: string,\n public isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any,\n provider?: UiItemsProvider\n ) => boolean\n ) {}\n\n public get id(): string {\n return this._providerId;\n }\n public onUnregister(): void {}\n\n public unregister() {\n UiItemsManager.unregister(this._providerId);\n }\n\n public provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _toolbarUsage: ToolbarUsage,\n _toolbarOrientation: ToolbarOrientation,\n _stageAppData?: any\n ): ToolbarItem[] {\n return [];\n }\n\n public provideToolbarItems(\n stageId: string,\n stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideToolbarItemsInternal(\n stageId,\n stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n )\n : [];\n }\n\n public provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n return [];\n }\n\n public provideStatusBarItems(\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ): StatusBarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData)\n : [];\n }\n\n public provideWidgetsInternal(\n _stageId: string,\n _stageUsage: string,\n _location: StagePanelLocation,\n _section?: StagePanelSection,\n _stageAppData?: any\n ): Widget[] {\n return [];\n }\n\n public provideWidgets(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection,\n stageAppData?: any\n ): ReadonlyArray<Widget> {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideWidgetsInternal(\n stageId,\n stageUsage,\n location,\n section,\n stageAppData\n )\n : [];\n }\n}\n"]}
|
|
@@ -28,6 +28,7 @@ import type { StatusBarItem } from "../statusbar/StatusBarItem";
|
|
|
28
28
|
*
|
|
29
29
|
* ```
|
|
30
30
|
* @public
|
|
31
|
+
* @deprecated in 4.17.0. Application data is not supported in frontstages. Instead configure the {@link UiItemsProvider} before registering for a specific frontstage.
|
|
31
32
|
*/
|
|
32
33
|
export interface DefaultContentToolsAppData {
|
|
33
34
|
defaultContentTools?: {
|
|
@@ -42,9 +43,9 @@ export interface DefaultContentToolsAppData {
|
|
|
42
43
|
};
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Provide standard tools for the ContentManipulationWidgetComposer.
|
|
46
|
+
/** Provide standard tools for the ContentManipulationWidgetComposer.
|
|
47
47
|
* @public
|
|
48
|
+
* @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
|
|
48
49
|
*/
|
|
49
50
|
export declare class StandardContentToolsProvider extends BaseUiItemsProvider {
|
|
50
51
|
private uiItemsProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardContentToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"StandardContentToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,CAAC,EAAE;QACpB,QAAQ,CAAC,EAAE;YACT,0BAA0B,CAAC,EAAE,MAAM,CAAC;YACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;YAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;QACF,UAAU,CAAC,EAAE;YACX,2BAA2B,CAAC,EAAE,MAAM,CAAC;YACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AAEH,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE,OAAO,CAAC,eAAe,CAAsC;IAC7D;;;;;;;;OAQG;WACW,QAAQ,CACpB,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,EACzC,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;gBAgBZ,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,EACrD,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;IAQE,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAWA,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;CAQnB"}
|
|
@@ -12,10 +12,11 @@ const core_frontend_1 = require("@itwin/core-frontend");
|
|
|
12
12
|
const StandardContentToolsUiItemsProvider_1 = require("./StandardContentToolsUiItemsProvider");
|
|
13
13
|
const UiItemsManager_1 = require("./UiItemsManager");
|
|
14
14
|
const BaseUiItemsProvider_1 = require("./BaseUiItemsProvider");
|
|
15
|
-
/**
|
|
16
|
-
* Provide standard tools for the ContentManipulationWidgetComposer.
|
|
15
|
+
/** Provide standard tools for the ContentManipulationWidgetComposer.
|
|
17
16
|
* @public
|
|
17
|
+
* @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
|
|
18
18
|
*/
|
|
19
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
19
20
|
class StandardContentToolsProvider extends BaseUiItemsProvider_1.BaseUiItemsProvider {
|
|
20
21
|
/**
|
|
21
22
|
* static function to register the StandardContentToolsProvider
|
|
@@ -27,6 +28,7 @@ class StandardContentToolsProvider extends BaseUiItemsProvider_1.BaseUiItemsProv
|
|
|
27
28
|
* the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
|
|
28
29
|
*/
|
|
29
30
|
static register(providerId, defaultContentTools, isSupportedStage) {
|
|
31
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
30
32
|
const provider = new StandardContentToolsProvider(providerId, defaultContentTools, isSupportedStage);
|
|
31
33
|
UiItemsManager_1.UiItemsManager.register(provider);
|
|
32
34
|
// register core commands not automatically registered
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardContentToolsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAA2D;AAE3D,+FAA4F;AAC5F,qDAAkD;AAClD,+DAA4D;
|
|
1
|
+
{"version":3,"file":"StandardContentToolsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAA2D;AAE3D,+FAA4F;AAC5F,qDAAkD;AAClD,+DAA4D;AAgD5D;;;GAGG;AACH,mDAAmD;AACnD,MAAa,4BAA6B,SAAQ,yCAAmB;IAEnE;;;;;;;;OAQG;IACI,MAAM,CAAC,QAAQ,CACpB,UAAkB,EAClB,mBAAyC,EACzC,gBAIY;QAEZ,mDAAmD;QACnD,MAAM,QAAQ,GAAG,IAAI,4BAA4B,CAC/C,UAAU,EACV,mBAAmB,EACnB,gBAAgB,CACjB,CAAC;QACF,+BAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAElC,sDAAsD;QACtD,mCAAmB,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YACE,UAAkB,EAClB,mBAAqD,EACrD,gBAIY;QAEZ,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,IAAI,yEAAmC,CAC5D,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAEe,2BAA2B,CACzC,QAAgB,EAChB,WAAmB,EACnB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC7C,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,YAAY,CACb,CAAC;IACJ,CAAC;IAEe,6BAA6B,CAC3C,QAAgB,EAChB,WAAmB,EACnB,aAAmB;QAEnB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAC/C,QAAQ,EACR,WAAW,EACX,aAAa,CACd,CAAC;IACJ,CAAC;CACF;AA7ED,oEA6EC","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 StandardUiItemsProvider\n */\n\nimport { ViewClipByPlaneTool } from \"@itwin/core-frontend\";\nimport type { DefaultContentTools } from \"./StandardContentToolsUiItemsProvider\";\nimport { StandardContentToolsUiItemsProvider } from \"./StandardContentToolsUiItemsProvider\";\nimport { UiItemsManager } from \"./UiItemsManager\";\nimport { BaseUiItemsProvider } from \"./BaseUiItemsProvider\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\n\n/**\n * Defines options that may be set in frontstage app data to control what group priorities\n * to use for each tool button that can be added by this extension. Defining groupIds is optional\n * and only required if use wants to override the default grouping. This application data is statically\n * set in the FrontstageProvider.\n * @example\n * ```\n * const applicationData = {\n * defaultContentTools: {\n * vertical: {\n * selectElementGroupPriority: 100,\n * measureGroupPriority: 200,\n * selectionGroupPriority: 300,\n * },\n * horizontal: {\n * clearSelectionGroupPriority: 100,\n * overridesGroupPriority: 200,\n * },\n * },\n * }\n *\n * ```\n * @public\n * @deprecated in 4.17.0. Application data is not supported in frontstages. Instead configure the {@link UiItemsProvider} before registering for a specific frontstage.\n */\nexport interface DefaultContentToolsAppData {\n defaultContentTools?: {\n vertical?: {\n selectElementGroupPriority?: number;\n measureGroupPriority?: number;\n selectionGroupPriority?: number;\n };\n horizontal?: {\n clearSelectionGroupPriority?: number;\n overridesGroupPriority?: number;\n };\n };\n}\n\n/** Provide standard tools for the ContentManipulationWidgetComposer.\n * @public\n * @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class StandardContentToolsProvider extends BaseUiItemsProvider {\n private uiItemsProvider: StandardContentToolsUiItemsProvider;\n /**\n * static function to register the StandardContentToolsProvider\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param defaultContentTools - if undefined all available tools are provided to stage. If defined only those\n * specific tool buttons are shown.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n public static register(\n providerId: string,\n defaultContentTools?: DefaultContentTools,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const provider = new StandardContentToolsProvider(\n providerId,\n defaultContentTools,\n isSupportedStage\n );\n UiItemsManager.register(provider);\n\n // register core commands not automatically registered\n ViewClipByPlaneTool.register();\n return provider;\n }\n\n constructor(\n providerId: string,\n defaultContentTools?: DefaultContentTools | undefined,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n super(providerId, isSupportedStage);\n this.uiItemsProvider = new StandardContentToolsUiItemsProvider(\n defaultContentTools\n );\n }\n\n public override provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideToolbarItems(\n _stageId,\n _stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n );\n }\n\n public override provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideStatusBarItems(\n _stageId,\n _stageUsage,\n _stageAppData\n );\n }\n}\n"]}
|
|
@@ -27,14 +27,18 @@ export interface DefaultContentTools {
|
|
|
27
27
|
sectionGroup?: boolean;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* @
|
|
30
|
+
/** Provides standard content manipulation items.
|
|
31
|
+
* @public
|
|
32
32
|
*/
|
|
33
33
|
export declare class StandardContentToolsUiItemsProvider implements UiItemsProvider {
|
|
34
34
|
private defaultContextTools?;
|
|
35
35
|
get id(): string;
|
|
36
36
|
constructor(defaultContextTools?: DefaultContentTools | undefined);
|
|
37
|
+
/** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideToolbarItems}. */
|
|
37
38
|
provideToolbarItems(_stageId: string, _stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): ToolbarItem[];
|
|
39
|
+
getToolbarItems(): readonly ToolbarItem[];
|
|
40
|
+
/** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideStatusBarItems}. */
|
|
38
41
|
provideStatusBarItems(_stageId: string, _stageUsage: string, _stageAppData?: any): StatusBarItem[];
|
|
42
|
+
getStatusBarItems(): readonly StatusBarItem[];
|
|
39
43
|
}
|
|
40
44
|
//# sourceMappingURL=StandardContentToolsUiItemsProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardContentToolsUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,4FAA4F;QAC5F,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,+FAA+F;QAC/F,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC9B,sDAAsD;QACtD,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACH;AAYD;;GAEG;AACH,qBAAa,mCAAoC,YAAW,eAAe;IAK7D,OAAO,CAAC,mBAAmB,CAAC;IAJxC,IAAW,EAAE,IAAI,MAAM,CAEtB;gBAEmB,mBAAmB,CAAC,iCAAqB;
|
|
1
|
+
{"version":3,"file":"StandardContentToolsUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,4FAA4F;QAC5F,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,+FAA+F;QAC/F,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC9B,sDAAsD;QACtD,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACH;AAYD;;GAEG;AACH,qBAAa,mCAAoC,YAAW,eAAe;IAK7D,OAAO,CAAC,mBAAmB,CAAC;IAJxC,IAAW,EAAE,IAAI,MAAM,CAEtB;gBAEmB,mBAAmB,CAAC,iCAAqB;IAE7D,6GAA6G;IACtG,mBAAmB,CACxB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAST,eAAe,IAAI,SAAS,WAAW,EAAE;IAIhD,+GAA+G;IACxG,qBAAqB,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;IAIX,iBAAiB,IAAI,SAAS,aAAa,EAAE;CAiBrD"}
|
|
@@ -22,8 +22,8 @@ function getGroupPriority(potentialId, defaultValue) {
|
|
|
22
22
|
}
|
|
23
23
|
return defaultValue;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* @
|
|
25
|
+
/** Provides standard content manipulation items.
|
|
26
|
+
* @public
|
|
27
27
|
*/
|
|
28
28
|
class StandardContentToolsUiItemsProvider {
|
|
29
29
|
get id() {
|
|
@@ -32,95 +32,20 @@ class StandardContentToolsUiItemsProvider {
|
|
|
32
32
|
constructor(defaultContextTools) {
|
|
33
33
|
this.defaultContextTools = defaultContextTools;
|
|
34
34
|
}
|
|
35
|
+
/** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideToolbarItems}. */
|
|
35
36
|
provideToolbarItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, stageAppData) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const clearSelectionGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.horizontal
|
|
40
|
-
?.clearSelectionGroupPriority, 10);
|
|
41
|
-
const overridesGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.horizontal?.overridesGroupPriority, 20);
|
|
42
|
-
if (!this.defaultContextTools ||
|
|
43
|
-
!this.defaultContextTools.horizontal ||
|
|
44
|
-
this.defaultContextTools.horizontal.clearSelection)
|
|
45
|
-
items.push(ToolbarItems_1.ToolbarItems.createClearSelection({
|
|
46
|
-
itemPriority: 10,
|
|
47
|
-
groupPriority: clearSelectionGroupPriority,
|
|
48
|
-
}));
|
|
49
|
-
if (!this.defaultContextTools ||
|
|
50
|
-
!this.defaultContextTools.horizontal ||
|
|
51
|
-
this.defaultContextTools.horizontal.clearDisplayOverrides)
|
|
52
|
-
items.push(ToolbarItems_1.ToolbarItems.createClearHideIsolateEmphasizeElements({
|
|
53
|
-
itemPriority: 20,
|
|
54
|
-
groupPriority: overridesGroupPriority,
|
|
55
|
-
}));
|
|
56
|
-
if (!this.defaultContextTools ||
|
|
57
|
-
!this.defaultContextTools.horizontal ||
|
|
58
|
-
this.defaultContextTools.horizontal.hide) {
|
|
59
|
-
if (this.defaultContextTools?.horizontal?.hide === "group")
|
|
60
|
-
items.push(ToolbarItems_1.ToolbarItems.createHideSectionGroup({
|
|
61
|
-
itemPriority: 30,
|
|
62
|
-
groupPriority: overridesGroupPriority,
|
|
63
|
-
}));
|
|
64
|
-
else
|
|
65
|
-
items.push(ToolbarItems_1.ToolbarItems.createHideElements({
|
|
66
|
-
itemPriority: 30,
|
|
67
|
-
groupPriority: overridesGroupPriority,
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
if (!this.defaultContextTools ||
|
|
71
|
-
!this.defaultContextTools.horizontal ||
|
|
72
|
-
this.defaultContextTools.horizontal.isolate) {
|
|
73
|
-
if (this.defaultContextTools?.horizontal?.isolate === "group")
|
|
74
|
-
items.push(ToolbarItems_1.ToolbarItems.createIsolateSelectionGroup({
|
|
75
|
-
itemPriority: 40,
|
|
76
|
-
groupPriority: overridesGroupPriority,
|
|
77
|
-
}));
|
|
78
|
-
else
|
|
79
|
-
items.push(ToolbarItems_1.ToolbarItems.createIsolateElements({
|
|
80
|
-
itemPriority: 40,
|
|
81
|
-
groupPriority: overridesGroupPriority,
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
if (!this.defaultContextTools ||
|
|
85
|
-
!this.defaultContextTools.horizontal ||
|
|
86
|
-
this.defaultContextTools.horizontal.emphasize) {
|
|
87
|
-
items.push(ToolbarItems_1.ToolbarItems.createEmphasizeElements({
|
|
88
|
-
itemPriority: 50,
|
|
89
|
-
groupPriority: overridesGroupPriority,
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else if (toolbarUsage === ToolbarItem_1.ToolbarUsage.ContentManipulation &&
|
|
94
|
-
toolbarOrientation === ToolbarItem_1.ToolbarOrientation.Vertical) {
|
|
95
|
-
const selectElementGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.selectElementGroupPriority, 10);
|
|
96
|
-
const measureGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.measureGroupPriority, 10);
|
|
97
|
-
const selectionGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.selectionGroupPriority, 10);
|
|
98
|
-
if (!this.defaultContextTools ||
|
|
99
|
-
!this.defaultContextTools.vertical ||
|
|
100
|
-
this.defaultContextTools.vertical.selectElement)
|
|
101
|
-
items.push(ToolbarItems_1.ToolbarItems.createSelectElement({
|
|
102
|
-
itemPriority: 10,
|
|
103
|
-
groupPriority: selectElementGroupPriority,
|
|
104
|
-
}));
|
|
105
|
-
if (!this.defaultContextTools ||
|
|
106
|
-
!this.defaultContextTools.vertical ||
|
|
107
|
-
this.defaultContextTools.vertical.measureGroup)
|
|
108
|
-
items.push(ToolbarItems_1.ToolbarItems.createMeasureGroup({
|
|
109
|
-
itemPriority: 20,
|
|
110
|
-
groupPriority: measureGroupPriority,
|
|
111
|
-
}));
|
|
112
|
-
if (!this.defaultContextTools ||
|
|
113
|
-
!this.defaultContextTools.vertical ||
|
|
114
|
-
this.defaultContextTools.vertical.sectionGroup) {
|
|
115
|
-
items.push(ToolbarItems_1.ToolbarItems.createSectionGroup({
|
|
116
|
-
itemPriority: 30,
|
|
117
|
-
groupPriority: selectionGroupPriority,
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return items;
|
|
37
|
+
const allItems = getAllToolbarItems(this.defaultContextTools, stageAppData);
|
|
38
|
+
return allItems.filter((item) => item.layouts?.standard?.usage === toolbarUsage &&
|
|
39
|
+
item.layouts?.standard?.orientation === toolbarOrientation);
|
|
122
40
|
}
|
|
41
|
+
getToolbarItems() {
|
|
42
|
+
return getAllToolbarItems(this.defaultContextTools, undefined);
|
|
43
|
+
}
|
|
44
|
+
/** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideStatusBarItems}. */
|
|
123
45
|
provideStatusBarItems(_stageId, _stageUsage, _stageAppData) {
|
|
46
|
+
return this.getStatusBarItems();
|
|
47
|
+
}
|
|
48
|
+
getStatusBarItems() {
|
|
124
49
|
const statusBarItems = [];
|
|
125
50
|
// if the sectionGroup tools are to be shown then we want the status field added to allow clearing or manipulation the section
|
|
126
51
|
if (this.defaultContextTools?.vertical?.sectionGroup) {
|
|
@@ -135,4 +60,108 @@ class StandardContentToolsUiItemsProvider {
|
|
|
135
60
|
}
|
|
136
61
|
}
|
|
137
62
|
exports.StandardContentToolsUiItemsProvider = StandardContentToolsUiItemsProvider;
|
|
63
|
+
// Extracted due to discontinued `stageAppData` usage, until `provideToolbarItems` is removed.
|
|
64
|
+
function getAllToolbarItems(defaultContextTools, stageAppData) {
|
|
65
|
+
const items = [];
|
|
66
|
+
const clearSelectionGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.horizontal?.clearSelectionGroupPriority, 10);
|
|
67
|
+
const overridesGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.horizontal?.overridesGroupPriority, 20);
|
|
68
|
+
const horizontal = {
|
|
69
|
+
standard: {
|
|
70
|
+
usage: ToolbarItem_1.ToolbarUsage.ContentManipulation,
|
|
71
|
+
orientation: ToolbarItem_1.ToolbarOrientation.Horizontal,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
if (!defaultContextTools ||
|
|
75
|
+
!defaultContextTools.horizontal ||
|
|
76
|
+
defaultContextTools.horizontal.clearSelection)
|
|
77
|
+
items.push(ToolbarItems_1.ToolbarItems.createClearSelection({
|
|
78
|
+
itemPriority: 10,
|
|
79
|
+
groupPriority: clearSelectionGroupPriority,
|
|
80
|
+
layouts: horizontal,
|
|
81
|
+
}));
|
|
82
|
+
if (!defaultContextTools ||
|
|
83
|
+
!defaultContextTools.horizontal ||
|
|
84
|
+
defaultContextTools.horizontal.clearDisplayOverrides)
|
|
85
|
+
items.push(ToolbarItems_1.ToolbarItems.createClearHideIsolateEmphasizeElements({
|
|
86
|
+
itemPriority: 20,
|
|
87
|
+
groupPriority: overridesGroupPriority,
|
|
88
|
+
layouts: horizontal,
|
|
89
|
+
}));
|
|
90
|
+
if (!defaultContextTools ||
|
|
91
|
+
!defaultContextTools.horizontal ||
|
|
92
|
+
defaultContextTools.horizontal.hide) {
|
|
93
|
+
if (defaultContextTools?.horizontal?.hide === "group")
|
|
94
|
+
items.push(ToolbarItems_1.ToolbarItems.createHideSectionGroup({
|
|
95
|
+
itemPriority: 30,
|
|
96
|
+
groupPriority: overridesGroupPriority,
|
|
97
|
+
layouts: horizontal,
|
|
98
|
+
}));
|
|
99
|
+
else
|
|
100
|
+
items.push(ToolbarItems_1.ToolbarItems.createHideElements({
|
|
101
|
+
itemPriority: 30,
|
|
102
|
+
groupPriority: overridesGroupPriority,
|
|
103
|
+
layouts: horizontal,
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
if (!defaultContextTools ||
|
|
107
|
+
!defaultContextTools.horizontal ||
|
|
108
|
+
defaultContextTools.horizontal.isolate) {
|
|
109
|
+
if (defaultContextTools?.horizontal?.isolate === "group")
|
|
110
|
+
items.push(ToolbarItems_1.ToolbarItems.createIsolateSelectionGroup({
|
|
111
|
+
itemPriority: 40,
|
|
112
|
+
groupPriority: overridesGroupPriority,
|
|
113
|
+
layouts: horizontal,
|
|
114
|
+
}));
|
|
115
|
+
else
|
|
116
|
+
items.push(ToolbarItems_1.ToolbarItems.createIsolateElements({
|
|
117
|
+
itemPriority: 40,
|
|
118
|
+
groupPriority: overridesGroupPriority,
|
|
119
|
+
layouts: horizontal,
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
if (!defaultContextTools ||
|
|
123
|
+
!defaultContextTools.horizontal ||
|
|
124
|
+
defaultContextTools.horizontal.emphasize) {
|
|
125
|
+
items.push(ToolbarItems_1.ToolbarItems.createEmphasizeElements({
|
|
126
|
+
itemPriority: 50,
|
|
127
|
+
groupPriority: overridesGroupPriority,
|
|
128
|
+
layouts: horizontal,
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
const vertical = {
|
|
132
|
+
standard: {
|
|
133
|
+
usage: ToolbarItem_1.ToolbarUsage.ContentManipulation,
|
|
134
|
+
orientation: ToolbarItem_1.ToolbarOrientation.Vertical,
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
const selectElementGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.selectElementGroupPriority, 10);
|
|
138
|
+
const measureGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.measureGroupPriority, 10);
|
|
139
|
+
const selectionGroupPriority = getGroupPriority(stageAppData?.defaultContentTools?.vertical?.selectionGroupPriority, 10);
|
|
140
|
+
if (!defaultContextTools ||
|
|
141
|
+
!defaultContextTools.vertical ||
|
|
142
|
+
defaultContextTools.vertical.selectElement)
|
|
143
|
+
items.push(ToolbarItems_1.ToolbarItems.createSelectElement({
|
|
144
|
+
itemPriority: 10,
|
|
145
|
+
groupPriority: selectElementGroupPriority,
|
|
146
|
+
layouts: vertical,
|
|
147
|
+
}));
|
|
148
|
+
if (!defaultContextTools ||
|
|
149
|
+
!defaultContextTools.vertical ||
|
|
150
|
+
defaultContextTools.vertical.measureGroup)
|
|
151
|
+
items.push(ToolbarItems_1.ToolbarItems.createMeasureGroup({
|
|
152
|
+
itemPriority: 20,
|
|
153
|
+
groupPriority: measureGroupPriority,
|
|
154
|
+
layouts: vertical,
|
|
155
|
+
}));
|
|
156
|
+
if (!defaultContextTools ||
|
|
157
|
+
!defaultContextTools.vertical ||
|
|
158
|
+
defaultContextTools.vertical.sectionGroup) {
|
|
159
|
+
items.push(ToolbarItems_1.ToolbarItems.createSectionGroup({
|
|
160
|
+
itemPriority: 30,
|
|
161
|
+
groupPriority: selectionGroupPriority,
|
|
162
|
+
layouts: vertical,
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
return items;
|
|
166
|
+
}
|
|
138
167
|
//# sourceMappingURL=StandardContentToolsUiItemsProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardContentToolsUiItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,8DAA8D;AAC9D,gFAA6E;AAC7E,iEAAoE;AAEpE,wDAA0E;AAE1E,wDAAqD;AAyBrD,SAAS,gBAAgB,CAAC,WAAgB,EAAE,YAAoB;IAC9D,IAAI,SAAS,KAAK,WAAW;QAAE,OAAO,YAAY,CAAC;IAEnD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAa,mCAAmC;IAC9C,IAAW,EAAE;QACX,OAAO,iDAAiD,CAAC;IAC3D,CAAC;IAED,YAAoB,mBAAyC;QAAzC,wBAAmB,GAAnB,mBAAmB,CAAsB;IAAG,CAAC;IAE1D,mBAAmB,CACxB,QAAgB,EAChB,WAAmB,EACnB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,MAAM,KAAK,GAAkB,EAAE,CAAC;QAEhC,IACE,YAAY,KAAK,0BAAY,CA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AgB,CAAC;gBACtC,EAAE,EAAE,eAAe;gBACnB,OAAO,EAAE,gCAAgB,CAAC,MAAM;gBAChC,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE,oBAAC,mCAAmB,IAAC,cAAc,SAAG;aAChD,CAAC,CACH,CAAC;QACJ,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA1LD,kFA0LC","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 StandardUiItemsProvider\n */\n\nimport * as React from \"react\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport { StatusBarSection } from \"../statusbar/StatusBarItem\";\nimport { StatusBarItemUtilities } from \"../statusbar/StatusBarItemUtilities\";\nimport { SectionsStatusField } from \"../statusfields/SectionsField\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\nimport type { UiItemsProvider } from \"./UiItemsProvider\";\nimport { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/**\n * Defines what tools to include from the provider. If any tools in the horizontal or vertical group are\n * specified then only those tools will be provided to stage.\n * @public\n */\nexport interface DefaultContentTools {\n horizontal?: {\n clearSelection?: boolean;\n clearDisplayOverrides?: boolean;\n /** if group then group button is shown to allow user to hide by element, category, model */\n hide?: \"group\" | \"element\";\n /** if group then group button is shown to allow user to isolate by element, category, model */\n isolate?: \"group\" | \"element\";\n /** only element is currently support for emphasize */\n emphasize?: \"element\";\n };\n vertical?: {\n selectElement?: boolean;\n measureGroup?: boolean;\n sectionGroup?: boolean;\n };\n}\n\nfunction getGroupPriority(potentialId: any, defaultValue: number) {\n if (undefined === potentialId) return defaultValue;\n\n if (typeof potentialId === \"number\") {\n return potentialId;\n }\n\n return defaultValue;\n}\n\n/**\n * @beta\n */\nexport class StandardContentToolsUiItemsProvider implements UiItemsProvider {\n public get id(): string {\n return \"appui-react:StandardContentToolsUiItemsProvider\";\n }\n\n constructor(private defaultContextTools?: DefaultContentTools) {}\n\n public provideToolbarItems(\n _stageId: string,\n _stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n const items: ToolbarItem[] = [];\n\n if (\n toolbarUsage === ToolbarUsage.ContentManipulation &&\n toolbarOrientation === ToolbarOrientation.Horizontal\n ) {\n const clearSelectionGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.horizontal\n ?.clearSelectionGroupPriority,\n 10\n );\n const overridesGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.horizontal?.overridesGroupPriority,\n 20\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.horizontal ||\n this.defaultContextTools.horizontal.clearSelection\n )\n items.push(\n ToolbarItems.createClearSelection({\n itemPriority: 10,\n groupPriority: clearSelectionGroupPriority,\n })\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.horizontal ||\n this.defaultContextTools.horizontal.clearDisplayOverrides\n )\n items.push(\n ToolbarItems.createClearHideIsolateEmphasizeElements({\n itemPriority: 20,\n groupPriority: overridesGroupPriority,\n })\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.horizontal ||\n this.defaultContextTools.horizontal.hide\n ) {\n if (this.defaultContextTools?.horizontal?.hide === \"group\")\n items.push(\n ToolbarItems.createHideSectionGroup({\n itemPriority: 30,\n groupPriority: overridesGroupPriority,\n })\n );\n else\n items.push(\n ToolbarItems.createHideElements({\n itemPriority: 30,\n groupPriority: overridesGroupPriority,\n })\n );\n }\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.horizontal ||\n this.defaultContextTools.horizontal.isolate\n ) {\n if (this.defaultContextTools?.horizontal?.isolate === \"group\")\n items.push(\n ToolbarItems.createIsolateSelectionGroup({\n itemPriority: 40,\n groupPriority: overridesGroupPriority,\n })\n );\n else\n items.push(\n ToolbarItems.createIsolateElements({\n itemPriority: 40,\n groupPriority: overridesGroupPriority,\n })\n );\n }\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.horizontal ||\n this.defaultContextTools.horizontal.emphasize\n ) {\n items.push(\n ToolbarItems.createEmphasizeElements({\n itemPriority: 50,\n groupPriority: overridesGroupPriority,\n })\n );\n }\n } else if (\n toolbarUsage === ToolbarUsage.ContentManipulation &&\n toolbarOrientation === ToolbarOrientation.Vertical\n ) {\n const selectElementGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.selectElementGroupPriority,\n 10\n );\n const measureGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.measureGroupPriority,\n 10\n );\n const selectionGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.selectionGroupPriority,\n 10\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.vertical ||\n this.defaultContextTools.vertical.selectElement\n )\n items.push(\n ToolbarItems.createSelectElement({\n itemPriority: 10,\n groupPriority: selectElementGroupPriority,\n })\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.vertical ||\n this.defaultContextTools.vertical.measureGroup\n )\n items.push(\n ToolbarItems.createMeasureGroup({\n itemPriority: 20,\n groupPriority: measureGroupPriority,\n })\n );\n\n if (\n !this.defaultContextTools ||\n !this.defaultContextTools.vertical ||\n this.defaultContextTools.vertical.sectionGroup\n ) {\n items.push(\n ToolbarItems.createSectionGroup({\n itemPriority: 30,\n groupPriority: selectionGroupPriority,\n })\n );\n }\n }\n return items;\n }\n\n public provideStatusBarItems(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n const statusBarItems: StatusBarItem[] = [];\n\n // if the sectionGroup tools are to be shown then we want the status field added to allow clearing or manipulation the section\n if (this.defaultContextTools?.vertical?.sectionGroup) {\n statusBarItems.push(\n StatusBarItemUtilities.createCustomItem({\n id: \"uifw.Sections\",\n section: StatusBarSection.Center,\n itemPriority: 20,\n content: <SectionsStatusField hideWhenUnused />,\n })\n );\n }\n\n return statusBarItems;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StandardContentToolsUiItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,8DAA8D;AAC9D,gFAA6E;AAC7E,iEAAoE;AAEpE,wDAA0E;AAE1E,wDAAqD;AAyBrD,SAAS,gBAAgB,CAAC,WAAgB,EAAE,YAAoB;IAC9D,IAAI,SAAS,KAAK,WAAW;QAAE,OAAO,YAAY,CAAC;IAEnD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAa,mCAAmC;IAC9C,IAAW,EAAE;QACX,OAAO,iDAAiD,CAAC;IAC3D,CAAC;IAED,YAAoB,mBAAyC;QAAzC,wBAAmB,GAAnB,mBAAmB,CAAsB;IAAG,CAAC;IAEjE,6GAA6G;IACtG,mBAAmB,CACxB,QAAgB,EAChB,WAAmB,EACnB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;QAC5E,OAAO,QAAQ,CAAC,MAAM,CACpB,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,YAAY;YAC9C,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,KAAK,kBAAkB,CAC7D,CAAC;IACJ,CAAC;IAEM,eAAe;QACpB,OAAO,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAA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AAY,EAAE,EAAE;YAChB,aAAa,EAAE,oBAAoB;YACnC,OAAO,EAAE,QAAQ;SAClB,CAAC,CACH,CAAC;IAEJ,IACE,CAAC,mBAAmB;QACpB,CAAC,mBAAmB,CAAC,QAAQ;QAC7B,mBAAmB,CAAC,QAAQ,CAAC,YAAY,EACzC,CAAC;QACD,KAAK,CAAC,IAAI,CACR,2BAAY,CAAC,kBAAkB,CAAC;YAC9B,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,sBAAsB;YACrC,OAAO,EAAE,QAAQ;SAClB,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StandardUiItemsProvider\n */\n\nimport * as React from \"react\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport { StatusBarSection } from \"../statusbar/StatusBarItem\";\nimport { StatusBarItemUtilities } from \"../statusbar/StatusBarItemUtilities\";\nimport { SectionsStatusField } from \"../statusfields/SectionsField\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem\";\nimport { ToolbarOrientation, ToolbarUsage } from \"../toolbar/ToolbarItem\";\nimport type { UiItemsProvider } from \"./UiItemsProvider\";\nimport { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/**\n * Defines what tools to include from the provider. If any tools in the horizontal or vertical group are\n * specified then only those tools will be provided to stage.\n * @public\n */\nexport interface DefaultContentTools {\n horizontal?: {\n clearSelection?: boolean;\n clearDisplayOverrides?: boolean;\n /** if group then group button is shown to allow user to hide by element, category, model */\n hide?: \"group\" | \"element\";\n /** if group then group button is shown to allow user to isolate by element, category, model */\n isolate?: \"group\" | \"element\";\n /** only element is currently support for emphasize */\n emphasize?: \"element\";\n };\n vertical?: {\n selectElement?: boolean;\n measureGroup?: boolean;\n sectionGroup?: boolean;\n };\n}\n\nfunction getGroupPriority(potentialId: any, defaultValue: number) {\n if (undefined === potentialId) return defaultValue;\n\n if (typeof potentialId === \"number\") {\n return potentialId;\n }\n\n return defaultValue;\n}\n\n/** Provides standard content manipulation items.\n * @public\n */\nexport class StandardContentToolsUiItemsProvider implements UiItemsProvider {\n public get id(): string {\n return \"appui-react:StandardContentToolsUiItemsProvider\";\n }\n\n constructor(private defaultContextTools?: DefaultContentTools) {}\n\n /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideToolbarItems}. */\n public provideToolbarItems(\n _stageId: string,\n _stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n const allItems = getAllToolbarItems(this.defaultContextTools, stageAppData);\n return allItems.filter(\n (item) =>\n item.layouts?.standard?.usage === toolbarUsage &&\n item.layouts?.standard?.orientation === toolbarOrientation\n );\n }\n\n public getToolbarItems(): readonly ToolbarItem[] {\n return getAllToolbarItems(this.defaultContextTools, undefined);\n }\n\n /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideStatusBarItems}. */\n public provideStatusBarItems(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n return this.getStatusBarItems() as StatusBarItem[];\n }\n\n public getStatusBarItems(): readonly StatusBarItem[] {\n const statusBarItems: StatusBarItem[] = [];\n\n // if the sectionGroup tools are to be shown then we want the status field added to allow clearing or manipulation the section\n if (this.defaultContextTools?.vertical?.sectionGroup) {\n statusBarItems.push(\n StatusBarItemUtilities.createCustomItem({\n id: \"uifw.Sections\",\n section: StatusBarSection.Center,\n itemPriority: 20,\n content: <SectionsStatusField hideWhenUnused />,\n })\n );\n }\n\n return statusBarItems;\n }\n}\n\n// Extracted due to discontinued `stageAppData` usage, until `provideToolbarItems` is removed.\nfunction getAllToolbarItems(\n defaultContextTools?: DefaultContentTools,\n stageAppData?: any\n): ToolbarItem[] {\n const items: ToolbarItem[] = [];\n const clearSelectionGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.horizontal?.clearSelectionGroupPriority,\n 10\n );\n const overridesGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.horizontal?.overridesGroupPriority,\n 20\n );\n\n const horizontal = {\n standard: {\n usage: ToolbarUsage.ContentManipulation,\n orientation: ToolbarOrientation.Horizontal,\n },\n };\n if (\n !defaultContextTools ||\n !defaultContextTools.horizontal ||\n defaultContextTools.horizontal.clearSelection\n )\n items.push(\n ToolbarItems.createClearSelection({\n itemPriority: 10,\n groupPriority: clearSelectionGroupPriority,\n layouts: horizontal,\n })\n );\n\n if (\n !defaultContextTools ||\n !defaultContextTools.horizontal ||\n defaultContextTools.horizontal.clearDisplayOverrides\n )\n items.push(\n ToolbarItems.createClearHideIsolateEmphasizeElements({\n itemPriority: 20,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n\n if (\n !defaultContextTools ||\n !defaultContextTools.horizontal ||\n defaultContextTools.horizontal.hide\n ) {\n if (defaultContextTools?.horizontal?.hide === \"group\")\n items.push(\n ToolbarItems.createHideSectionGroup({\n itemPriority: 30,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n else\n items.push(\n ToolbarItems.createHideElements({\n itemPriority: 30,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n }\n\n if (\n !defaultContextTools ||\n !defaultContextTools.horizontal ||\n defaultContextTools.horizontal.isolate\n ) {\n if (defaultContextTools?.horizontal?.isolate === \"group\")\n items.push(\n ToolbarItems.createIsolateSelectionGroup({\n itemPriority: 40,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n else\n items.push(\n ToolbarItems.createIsolateElements({\n itemPriority: 40,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n }\n\n if (\n !defaultContextTools ||\n !defaultContextTools.horizontal ||\n defaultContextTools.horizontal.emphasize\n ) {\n items.push(\n ToolbarItems.createEmphasizeElements({\n itemPriority: 50,\n groupPriority: overridesGroupPriority,\n layouts: horizontal,\n })\n );\n }\n\n const vertical = {\n standard: {\n usage: ToolbarUsage.ContentManipulation,\n orientation: ToolbarOrientation.Vertical,\n },\n };\n const selectElementGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.selectElementGroupPriority,\n 10\n );\n const measureGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.measureGroupPriority,\n 10\n );\n const selectionGroupPriority = getGroupPriority(\n stageAppData?.defaultContentTools?.vertical?.selectionGroupPriority,\n 10\n );\n\n if (\n !defaultContextTools ||\n !defaultContextTools.vertical ||\n defaultContextTools.vertical.selectElement\n )\n items.push(\n ToolbarItems.createSelectElement({\n itemPriority: 10,\n groupPriority: selectElementGroupPriority,\n layouts: vertical,\n })\n );\n\n if (\n !defaultContextTools ||\n !defaultContextTools.vertical ||\n defaultContextTools.vertical.measureGroup\n )\n items.push(\n ToolbarItems.createMeasureGroup({\n itemPriority: 20,\n groupPriority: measureGroupPriority,\n layouts: vertical,\n })\n );\n\n if (\n !defaultContextTools ||\n !defaultContextTools.vertical ||\n defaultContextTools.vertical.sectionGroup\n ) {\n items.push(\n ToolbarItems.createSectionGroup({\n itemPriority: 30,\n groupPriority: selectionGroupPriority,\n layouts: vertical,\n })\n );\n }\n return items;\n}\n"]}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import type { ToolbarItem, ToolbarOrientation, ToolbarUsage } from "../toolbar/ToolbarItem";
|
|
5
5
|
import { BaseUiItemsProvider } from "./BaseUiItemsProvider";
|
|
6
6
|
import type { DefaultNavigationTools } from "./StandardNavigationToolsUiItemsProvider";
|
|
7
|
-
/**
|
|
8
|
-
* Provide standard tools for the ViewNavigationWidgetComposer.
|
|
7
|
+
/** Provide standard tools for the ViewNavigationWidgetComposer.
|
|
9
8
|
* @public
|
|
9
|
+
* @deprecated in 4.17.0. Use {@link StandardNavigationToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
|
|
10
10
|
*/
|
|
11
11
|
export declare class StandardNavigationToolsProvider extends BaseUiItemsProvider {
|
|
12
12
|
private uiItemsProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardNavigationToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardNavigationToolsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAIvF;;;GAGG;
|
|
1
|
+
{"version":3,"file":"StandardNavigationToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardNavigationToolsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAIvF;;;GAGG;AAEH,qBAAa,+BAAgC,SAAQ,mBAAmB;IACtE,OAAO,CAAC,eAAe,CAAyC;IAChE;;;;;;;;OAQG;WACW,QAAQ,CACpB,UAAU,EAAE,MAAM,EAClB,sBAAsB,CAAC,EAAE,sBAAsB,EAC/C,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;gBAaZ,UAAU,EAAE,MAAM,EAClB,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,SAAS,EAC3D,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;IAQE,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,GAAG,GAClB,WAAW,EAAE;CAUjB"}
|
|
@@ -11,10 +11,11 @@ exports.StandardNavigationToolsProvider = void 0;
|
|
|
11
11
|
const BaseUiItemsProvider_1 = require("./BaseUiItemsProvider");
|
|
12
12
|
const StandardNavigationToolsUiItemsProvider_1 = require("./StandardNavigationToolsUiItemsProvider");
|
|
13
13
|
const UiItemsManager_1 = require("./UiItemsManager");
|
|
14
|
-
/**
|
|
15
|
-
* Provide standard tools for the ViewNavigationWidgetComposer.
|
|
14
|
+
/** Provide standard tools for the ViewNavigationWidgetComposer.
|
|
16
15
|
* @public
|
|
16
|
+
* @deprecated in 4.17.0. Use {@link StandardNavigationToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
|
|
17
17
|
*/
|
|
18
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
18
19
|
class StandardNavigationToolsProvider extends BaseUiItemsProvider_1.BaseUiItemsProvider {
|
|
19
20
|
/**
|
|
20
21
|
* static function to register the StandardContentToolsProvider
|
|
@@ -26,6 +27,7 @@ class StandardNavigationToolsProvider extends BaseUiItemsProvider_1.BaseUiItemsP
|
|
|
26
27
|
* the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
|
|
27
28
|
*/
|
|
28
29
|
static register(providerId, defaultNavigationTools, isSupportedStage) {
|
|
30
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
29
31
|
const provider = new StandardNavigationToolsProvider(providerId, defaultNavigationTools, isSupportedStage);
|
|
30
32
|
UiItemsManager_1.UiItemsManager.register(provider);
|
|
31
33
|
return provider;
|