@itwin/appui-react 4.16.4 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -1
- package/lib/cjs/appui-react/UiFramework.d.ts +5 -0
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +5 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts +1 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.js +2 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
- package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/CopyStyles.js +10 -5
- package/lib/cjs/appui-react/childwindow/CopyStyles.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +7 -2
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
- package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
- package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
- package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
- package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
- package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
- package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
- package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
- package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
- package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +27 -25
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
- package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +10 -6
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
- package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
- package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
- package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +23 -25
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +16 -12
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/cjs/appui-react/utils/getActiveViewport.d.ts +10 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.d.ts.map +1 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.js +26 -0
- package/lib/cjs/appui-react/utils/getActiveViewport.js.map +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +3 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +3 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +5 -0
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +6 -1
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
- package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
- package/lib/esm/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/CopyStyles.js +8 -3
- package/lib/esm/appui-react/childwindow/CopyStyles.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
- package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +45 -11
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
- package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
- package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
- package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
- package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
- package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
- package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
- package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
- package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
- package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
- package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
- package/lib/esm/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js +27 -25
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
- package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js +10 -6
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
- package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
- package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
- package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +23 -25
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +16 -12
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/esm/appui-react/utils/getActiveViewport.d.ts +10 -0
- package/lib/esm/appui-react/utils/getActiveViewport.d.ts.map +1 -0
- package/lib/esm/appui-react/utils/getActiveViewport.js +22 -0
- package/lib/esm/appui-react/utils/getActiveViewport.js.map +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
- package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react.d.ts +3 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +3 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConditionalProp.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalProp.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,uDAAoE;AACpE,2EAAwE;AAYxE,iCAAiC;AACjC,SAAS,kBAAkB,CACzB,eAAmC;IAEnC,OAAO,CACL,OAAO,eAAe,KAAK,QAAQ;QACnC,eAAe;QACf,cAAc,IAAI,eAAe;QACjC,SAAS,IAAI,eAAe;QAC5B,OAAO,IAAI,eAAe,CAC3B,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,SAAgB,kBAAkB,CAAI,eAAmC;IACvE,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CACjC,CAAC,aAAyB,EAAE,EAAE;QAC5B,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE,CAAC;YACxC,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CACpD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;gBACf,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,QAAQ,EACR,eAAe,CAAC,YAAY,CAC7B;oBAED,OAAO;gBACT,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;oBAAE,OAAO;gBAEvC,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,eAAe,CAAC,CAClB,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,IAAI,kBAAkB,CAAC,eAAe,CAAC;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC;QACtE,OAAO,eAAe,CAAC;IACzB,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,OAAO,IAAA,2BAAoB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AA5BD,gDA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/**
|
|
1
|
+
{"version":3,"file":"useConditionalProp.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalProp.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,uDAAoE;AACpE,2EAAwE;AAYxE,iCAAiC;AACjC,SAAS,kBAAkB,CACzB,eAAmC;IAEnC,OAAO,CACL,OAAO,eAAe,KAAK,QAAQ;QACnC,eAAe;QACf,cAAc,IAAI,eAAe;QACjC,SAAS,IAAI,eAAe;QAC5B,OAAO,IAAI,eAAe,CAC3B,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,SAAgB,kBAAkB,CAAI,eAAmC;IACvE,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CACjC,CAAC,aAAyB,EAAE,EAAE;QAC5B,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE,CAAC;YACxC,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CACpD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;gBACf,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,QAAQ,EACR,eAAe,CAAC,YAAY,CAC7B;oBAED,OAAO;gBACT,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;oBAAE,OAAO;gBAEvC,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,eAAe,CAAC,CAClB,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,IAAI,kBAAkB,CAAC,eAAe,CAAC;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC;QACtE,OAAO,eAAe,CAAC;IACzB,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,OAAO,IAAA,2BAAoB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AA5BD,gDA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Defines a common interface for existing conditional value classes: `ConditionalBooleanValue`, `ConditionalStringValue`, `ConditionalIconItem`. */\ninterface CommonConditionalValue<T> {\n syncEventIds: string[];\n refresh: () => boolean;\n value: T;\n}\n\n/** Type that is usually used in a conditional prop. */\ntype ConditionalProp<T> = CommonConditionalValue<T> | T | undefined;\n\n/** Duck type the conditional. */\nfunction isConditionalValue<T>(\n conditionalProp: ConditionalProp<T>\n): conditionalProp is CommonConditionalValue<T> {\n return (\n typeof conditionalProp === \"object\" &&\n conditionalProp &&\n \"syncEventIds\" in conditionalProp &&\n \"refresh\" in conditionalProp &&\n \"value\" in conditionalProp\n );\n}\n\n/** @internal */\nexport function useConditionalProp<T>(conditionalProp: ConditionalProp<T>) {\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n if (isConditionalValue(conditionalProp)) {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(\n ({ eventIds }) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n eventIds,\n conditionalProp.syncEventIds\n )\n )\n return;\n if (!conditionalProp.refresh()) return;\n\n onStoreChange();\n }\n );\n }\n return () => {};\n },\n [conditionalProp]\n );\n const getSnapshot = React.useCallback(() => {\n if (isConditionalValue(conditionalProp)) return conditionalProp.value;\n return conditionalProp;\n }, [conditionalProp]);\n return useSyncExternalStore(subscribe, getSnapshot);\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** Hook that allows to get a value that depends on some sync UI events.
|
|
5
5
|
* @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.
|
|
6
|
-
* @
|
|
6
|
+
* @public
|
|
7
7
|
*/
|
|
8
8
|
export declare function useConditionalValue<T>(getValue: () => T, eventIds: string[]): T;
|
|
9
9
|
//# sourceMappingURL=useConditionalValue.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const SyncUiEventDispatcher_1 = require("../syncui/SyncUiEventDispatcher");
|
|
13
13
|
/** Hook that allows to get a value that depends on some sync UI events.
|
|
14
14
|
* @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.
|
|
15
|
-
* @
|
|
15
|
+
* @public
|
|
16
16
|
*/
|
|
17
17
|
function useConditionalValue(getValue, eventIds) {
|
|
18
18
|
const [value, setValue] = React.useState(() => getValue());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalValue.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,2EAAwE;AAExE;;;GAGG;AACH,SAAgB,mBAAmB,CAAI,QAAiB,EAAE,QAAkB;IAC1E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE3D,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,IAAI,CAAC,QAAQ,EACb,WAAW,CAAC,OAAO,CACpB;gBAED,OAAO;YACT,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAK,CAAC;AACf,CAAC;AA3BD,kDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Hook that allows to get a value that depends on some sync UI events.\n * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.\n * @
|
|
1
|
+
{"version":3,"file":"useConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalValue.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,2EAAwE;AAExE;;;GAGG;AACH,SAAgB,mBAAmB,CAAI,QAAiB,EAAE,QAAkB;IAC1E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE3D,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,IAAI,CAAC,QAAQ,EACb,WAAW,CAAC,OAAO,CACpB;gBAED,OAAO;YACT,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAK,CAAC;AACf,CAAC;AA3BD,kDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Hook that allows to get a value that depends on some sync UI events.\n * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.\n * @public\n */\nexport function useConditionalValue<T>(getValue: () => T, eventIds: string[]) {\n const [value, setValue] = React.useState(() => getValue());\n\n const getValueRef = React.useRef(getValue);\n React.useEffect(() => {\n getValueRef.current = getValue;\n }, [getValue]);\n\n const eventIdsRef = React.useRef(eventIds);\n React.useEffect(() => {\n eventIdsRef.current = eventIds;\n }, [eventIds]);\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n args.eventIds,\n eventIdsRef.current\n )\n )\n return;\n setValue(getValueRef.current());\n });\n }, []);\n\n return value;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUiVisibility.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,gBAAgB;AAChB,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"useUiVisibility.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,gBAAgB;AAChB,wBAAgB,eAAe,YAS9B"}
|
|
@@ -12,6 +12,7 @@ const react_1 = require("react");
|
|
|
12
12
|
const UiFramework_1 = require("../UiFramework");
|
|
13
13
|
/** @internal */
|
|
14
14
|
function useUiVisibility() {
|
|
15
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
15
16
|
const [uiIsVisible, setUiIsVisible] = (0, react_1.useState)(UiFramework_1.UiFramework.getIsUiVisible());
|
|
16
17
|
(0, react_1.useEffect)(() => {
|
|
17
18
|
return UiFramework_1.UiFramework.onUiVisibilityChanged.addListener((args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUiVisibility.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAA4C;AAC5C,gDAA6C;AAE7C,gBAAgB;AAChB,SAAgB,eAAe;IAC7B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,yBAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,yBAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5D,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"useUiVisibility.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAA4C;AAC5C,gDAA6C;AAE7C,gBAAgB;AAChB,SAAgB,eAAe;IAC7B,mDAAmD;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,yBAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,yBAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5D,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC;AATD,0CASC","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 Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** @internal */\nexport function useUiVisibility() {\n // eslint-disable-next-line deprecation/deprecation\n const [uiIsVisible, setUiIsVisible] = useState(UiFramework.getIsUiVisible());\n useEffect(() => {\n return UiFramework.onUiVisibilityChanged.addListener((args) => {\n setUiIsVisible(args.visible);\n });\n }, []);\n return uiIsVisible;\n}\n"]}
|
|
@@ -7,7 +7,7 @@ import type { NineZoneState } from "../state/NineZoneState";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export type LayoutState = NineZoneState;
|
|
9
9
|
/** @internal */
|
|
10
|
-
export type LayoutStore = StoreApi<
|
|
10
|
+
export type LayoutStore = StoreApi<LayoutState>;
|
|
11
11
|
/** @internal */
|
|
12
12
|
export declare const LayoutStoreContext: React.Context<LayoutStore | undefined>;
|
|
13
13
|
/** @internal */
|
|
@@ -16,4 +16,6 @@ export declare function createLayoutStore(args?: Partial<LayoutState>): LayoutSt
|
|
|
16
16
|
export declare function useLayoutStore(): LayoutStore;
|
|
17
17
|
/** @internal */
|
|
18
18
|
export declare function useLayout<SelectorOutput>(selector: (state: LayoutState) => SelectorOutput, multipleSlices?: boolean): SelectorOutput;
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare function useOptionalLayout<SelectorOutput>(selector: (state: LayoutState | undefined) => SelectorOutput, multipleSlices?: boolean): SelectorOutput;
|
|
19
21
|
//# sourceMappingURL=LayoutStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStore.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AAExC,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"LayoutStore.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AAExC,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAEhD,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,wCAE9B,CAAC;AAGF,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAE1E;AAED,gBAAgB;AAChB,wBAAgB,cAAc,gBAI7B;AAED,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,cAAc,EACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,cAAc,EAChD,cAAc,UAAQ,kBAQvB;AAMD,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,cAAc,EAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,KAAK,cAAc,EAC5D,cAAc,UAAQ,kBASvB"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Base
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.useLayout = exports.useLayoutStore = exports.createLayoutStore = exports.LayoutStoreContext = void 0;
|
|
10
|
+
exports.useOptionalLayout = exports.useLayout = exports.useLayoutStore = exports.createLayoutStore = exports.LayoutStoreContext = void 0;
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const zustand_1 = require("zustand");
|
|
13
13
|
const traditional_1 = require("zustand/traditional");
|
|
@@ -35,4 +35,12 @@ function useLayout(selector, multipleSlices = false) {
|
|
|
35
35
|
return (0, traditional_1.useStoreWithEqualityFn)(store, selector, multipleSlices ? shallow_1.shallow : undefined);
|
|
36
36
|
}
|
|
37
37
|
exports.useLayout = useLayout;
|
|
38
|
+
const optionalLayoutStore = (0, zustand_1.createStore)(() => undefined);
|
|
39
|
+
/** @internal */
|
|
40
|
+
function useOptionalLayout(selector, multipleSlices = false) {
|
|
41
|
+
const store = React.useContext(exports.LayoutStoreContext);
|
|
42
|
+
const slice = (0, traditional_1.useStoreWithEqualityFn)(store ?? optionalLayoutStore, selector, multipleSlices ? shallow_1.shallow : undefined);
|
|
43
|
+
return slice;
|
|
44
|
+
}
|
|
45
|
+
exports.useOptionalLayout = useOptionalLayout;
|
|
38
46
|
//# sourceMappingURL=LayoutStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStore.js","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,qCAAsC;AACtC,qDAA6D;AAC7D,6CAA0C;AAC1C,sDAA6C;AAE7C,0DAA6D;AAQ7D,gBAAgB;AACH,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CACnD,SAAS,CACV,CAAC;AACF,0BAAkB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAE5D,gBAAgB;AAChB,SAAgB,iBAAiB,CAAC,IAA2B;IAC3D,OAAO,IAAA,qBAAW,EAAc,GAAG,EAAE,CAAC,IAAA,mCAAmB,EAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,8CAEC;AAED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,IAAA,qBAAM,EAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACf,CAAC;AAJD,wCAIC;AAED,gBAAgB;AAChB,SAAgB,SAAS,CACvB,QAAgD,EAChD,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,IAAA,oCAAsB,EAC3B,KAAK,EACL,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;AACJ,CAAC;AAVD,8BAUC","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 Base\n */\n\nimport * as React from \"react\";\nimport type { StoreApi } from \"zustand\";\nimport { createStore } from \"zustand\";\nimport { useStoreWithEqualityFn } from \"zustand/traditional\";\nimport { shallow } from \"zustand/shallow\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { NineZoneState } from \"../state/NineZoneState\";\nimport { createNineZoneState } from \"../state/NineZoneState\";\n\n/** @internal */\nexport type LayoutState = NineZoneState;\n\n/** @internal */\nexport type LayoutStore = StoreApi<
|
|
1
|
+
{"version":3,"file":"LayoutStore.js","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,qCAAsC;AACtC,qDAA6D;AAC7D,6CAA0C;AAC1C,sDAA6C;AAE7C,0DAA6D;AAQ7D,gBAAgB;AACH,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CACnD,SAAS,CACV,CAAC;AACF,0BAAkB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAE5D,gBAAgB;AAChB,SAAgB,iBAAiB,CAAC,IAA2B;IAC3D,OAAO,IAAA,qBAAW,EAAc,GAAG,EAAE,CAAC,IAAA,mCAAmB,EAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,8CAEC;AAED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,IAAA,qBAAM,EAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACf,CAAC;AAJD,wCAIC;AAED,gBAAgB;AAChB,SAAgB,SAAS,CACvB,QAAgD,EAChD,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,IAAA,oCAAsB,EAC3B,KAAK,EACL,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;AACJ,CAAC;AAVD,8BAUC;AAED,MAAM,mBAAmB,GAAG,IAAA,qBAAW,EACrC,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;AAEF,gBAAgB;AAChB,SAAgB,iBAAiB,CAC/B,QAA4D,EAC5D,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,IAAA,oCAAsB,EAClC,KAAK,IAAI,mBAAmB,EAC5B,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAXD,8CAWC","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 Base\n */\n\nimport * as React from \"react\";\nimport type { StoreApi } from \"zustand\";\nimport { createStore } from \"zustand\";\nimport { useStoreWithEqualityFn } from \"zustand/traditional\";\nimport { shallow } from \"zustand/shallow\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { NineZoneState } from \"../state/NineZoneState\";\nimport { createNineZoneState } from \"../state/NineZoneState\";\n\n/** @internal */\nexport type LayoutState = NineZoneState;\n\n/** @internal */\nexport type LayoutStore = StoreApi<LayoutState>;\n\n/** @internal */\nexport const LayoutStoreContext = React.createContext<LayoutStore | undefined>(\n undefined\n);\nLayoutStoreContext.displayName = \"appui:LayoutStoreContext\";\n\n/** @internal */\nexport function createLayoutStore(args?: Partial<LayoutState>): LayoutStore {\n return createStore<LayoutState>(() => createNineZoneState(args));\n}\n\n/** @internal */\nexport function useLayoutStore() {\n const store = React.useContext(LayoutStoreContext);\n assert(!!store, \"LayoutStoreContext is not defined\");\n return store;\n}\n\n/** @internal */\nexport function useLayout<SelectorOutput>(\n selector: (state: LayoutState) => SelectorOutput,\n multipleSlices = false\n) {\n const store = useLayoutStore();\n return useStoreWithEqualityFn(\n store,\n selector,\n multipleSlices ? shallow : undefined\n );\n}\n\nconst optionalLayoutStore = createStore<LayoutState | undefined>(\n () => undefined\n);\n\n/** @internal */\nexport function useOptionalLayout<SelectorOutput>(\n selector: (state: LayoutState | undefined) => SelectorOutput,\n multipleSlices = false\n) {\n const store = React.useContext(LayoutStoreContext);\n const slice = useStoreWithEqualityFn(\n store ?? optionalLayoutStore,\n selector,\n multipleSlices ? shallow : undefined\n );\n return slice;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionContextItemDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectionContextItemDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAiBpD;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,EAAE,CAOzD;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,EAAE,CAU1D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CASrD;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,uBAAuB,CAK7E;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,uBAAuB,CAKzE;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAWf;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAUf;AAED;;;GAGG;AACH,qBAAa,+BAA+B;IAC1C,WAAkB,+BAA+B,mBAQhD;IAED,WAAkB,mCAAmC,mBAQpD;IAED,WAAkB,sBAAsB,mBASvC;IAED,WAAkB,yBAAyB,iBAa1C;IAED,WAAkB,4BAA4B,mBAQ7C;IAED,WAAkB,gCAAgC,mBAQjD;IAED,WAAkB,mBAAmB,mBASpC;IAED,WAAkB,oBAAoB,iBAarC;IAED,WAAkB,wBAAwB,mBASzC;IAED,WAAkB,wCAAwC,mBAYzD;CACF"}
|
|
@@ -24,6 +24,7 @@ const asset_classification_hide_svg_1 = require("@bentley/icons-generic/icons/as
|
|
|
24
24
|
const visibility_semi_transparent_svg_1 = require("@bentley/icons-generic/icons/visibility-semi-transparent.svg");
|
|
25
25
|
const visibility_hide_2_svg_1 = require("@bentley/icons-generic/icons/visibility-hide_2.svg");
|
|
26
26
|
const visibility_svg_1 = require("@bentley/icons-generic/icons/visibility.svg");
|
|
27
|
+
const getActiveViewport_1 = require("../utils/getActiveViewport");
|
|
27
28
|
/* eslint-disable deprecation/deprecation */
|
|
28
29
|
/** Return SyncEventIds that trigger selection state function refresh.
|
|
29
30
|
* @beta
|
|
@@ -59,16 +60,18 @@ exports.getSelectionContextSyncEventIds = getSelectionContextSyncEventIds;
|
|
|
59
60
|
* @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
|
|
60
61
|
*/
|
|
61
62
|
function isNoSelectionActive() {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const hiddenElementsSet = activeContentControl.viewport.neverDrawn;
|
|
66
|
-
const selectedElementsSet = activeContentControl.viewport.view.iModel.selectionSet.elements;
|
|
67
|
-
// TODO: add check for categories, subcategories and models
|
|
68
|
-
if (selectionCount > 0 ||
|
|
69
|
-
![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))
|
|
70
|
-
return false;
|
|
63
|
+
const viewport = (0, getActiveViewport_1.getActiveViewport)();
|
|
64
|
+
if (!viewport) {
|
|
65
|
+
return true;
|
|
71
66
|
}
|
|
67
|
+
const selectionCount = UiFramework_1.UiFramework.getNumItemsSelected();
|
|
68
|
+
if (selectionCount > 0)
|
|
69
|
+
return false;
|
|
70
|
+
// TODO: add check for categories, subcategories and models
|
|
71
|
+
const hiddenElementsSet = viewport.neverDrawn;
|
|
72
|
+
const selectedElementsSet = viewport.view.iModel.selectionSet.elements;
|
|
73
|
+
if (![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))
|
|
74
|
+
return false;
|
|
72
75
|
return true;
|
|
73
76
|
}
|
|
74
77
|
exports.isNoSelectionActive = isNoSelectionActive;
|
|
@@ -77,10 +80,11 @@ exports.isNoSelectionActive = isNoSelectionActive;
|
|
|
77
80
|
* @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
|
|
78
81
|
*/
|
|
79
82
|
function areNoFeatureOverridesActive() {
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
|
|
83
|
+
const viewport = (0, getActiveViewport_1.getActiveViewport)();
|
|
84
|
+
if (!viewport) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return !UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(viewport);
|
|
84
88
|
}
|
|
85
89
|
exports.areNoFeatureOverridesActive = areNoFeatureOverridesActive;
|
|
86
90
|
/** Return ConditionalBooleanValue object used to show item if feature overrides are active.
|
|
@@ -104,11 +108,11 @@ exports.getIsHiddenIfSelectionNotActive = getIsHiddenIfSelectionNotActive;
|
|
|
104
108
|
* @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
|
|
105
109
|
*/
|
|
106
110
|
function featureOverridesActiveStateFunc(state) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
const viewport = (0, getActiveViewport_1.getActiveViewport)();
|
|
112
|
+
if (!viewport) {
|
|
113
|
+
return { ...state, isVisible: false };
|
|
114
|
+
}
|
|
115
|
+
const isVisible = UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(viewport);
|
|
112
116
|
return { ...state, isVisible };
|
|
113
117
|
}
|
|
114
118
|
exports.featureOverridesActiveStateFunc = featureOverridesActiveStateFunc;
|
|
@@ -117,14 +121,12 @@ exports.featureOverridesActiveStateFunc = featureOverridesActiveStateFunc;
|
|
|
117
121
|
* @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
|
|
118
122
|
*/
|
|
119
123
|
function selectionContextStateFunc(state) {
|
|
120
|
-
const
|
|
121
|
-
|
|
124
|
+
const viewport = (0, getActiveViewport_1.getActiveViewport)();
|
|
125
|
+
if (!viewport) {
|
|
126
|
+
return { ...state, isVisible: false };
|
|
127
|
+
}
|
|
122
128
|
const selectionCount = UiFramework_1.UiFramework.getNumItemsSelected();
|
|
123
|
-
|
|
124
|
-
activeContentControl.viewport &&
|
|
125
|
-
(activeContentControl.viewport.view.iModel.selectionSet.size > 0 ||
|
|
126
|
-
selectionCount > 0))
|
|
127
|
-
isVisible = true;
|
|
129
|
+
const isVisible = viewport.view.iModel.selectionSet.size > 0 || selectionCount > 0;
|
|
128
130
|
return { ...state, isVisible };
|
|
129
131
|
}
|
|
130
132
|
exports.selectionContextStateFunc = selectionContextStateFunc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionContextItemDef.js","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgE;AAChE,wDAA6D;AAC7D,6DAA0D;AAE1D,2EAAgE;AAChE,oDAAoD;AACpD,gDAA6C;AAC7C,sFAA6E;AAC7E,wFAA+E;AAC/E,sFAA6E;AAC7E,0EAAkE;AAClE,gFAAuE;AACvE,kFAAyE;AACzE,8GAAoG;AACpG,kHAAwG;AACxG,8FAAmF;AACnF,gFAAwE;AAGxE,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,8BAA8B;IAC5C,OAAO;QACL,qCAAa,CAAC,oBAAoB;QAClC,qCAAa,CAAC,qBAAqB;QACnC,qCAAa,CAAC,uBAAuB;QACrC,qCAAa,CAAC,mBAAmB;KAClC,CAAC;AACJ,CAAC;AAPD,wEAOC;AAED;;;GAGG;AACH,SAAgB,+BAA+B;IAC7C,OAAO;QACL,qCAAa,CAAC,mBAAmB;QACjC,qCAAa,CAAC,oBAAoB;QAClC,qCAAa,CAAC,qBAAqB;QACnC,mDAAmD;QACnD,mCAAoB,CAAC,mBAAmB;QACxC,qCAAa,CAAC,uBAAuB;QACrC,qCAAa,CAAC,mBAAmB;KAClC,CAAC;AACJ,CAAC;AAVD,0EAUC;AAED;;;GAGG;AACH,SAAgB,mBAAmB;IACjC,MAAM,oBAAoB,GAAG,yBAAW,CAAC,OAAO,CA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,MAAM,yBAAW,CAAC,iCAAiC,CAAC,8BAA8B,EAAE,CAAC;YACvF,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AArHD,0EAqHC","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 Tools\n */\n\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport type { BaseItemState } from \"../shared/ItemDefBase\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { UiFramework } from \"../UiFramework\";\nimport svgModelIsolate from \"@bentley/icons-generic/icons/model-isolate.svg\";\nimport svgLayersIsolate from \"@bentley/icons-generic/icons/layers-isolate.svg\";\nimport svgAssetIsolate from \"@bentley/icons-generic/icons/asset-isolate.svg\";\nimport svgIsolate from \"@bentley/icons-generic/icons/isolate.svg\";\nimport svgModelHide from \"@bentley/icons-generic/icons/model-hide.svg\";\nimport svgLayersHide from \"@bentley/icons-generic/icons/layers-hide.svg\";\nimport svgAssetClassificationHide from \"@bentley/icons-generic/icons/asset-classification-hide.svg\";\nimport svgVisibilitySemiTransparent from \"@bentley/icons-generic/icons/visibility-semi-transparent.svg\";\nimport svgVisibilityHide from \"@bentley/icons-generic/icons/visibility-hide_2.svg\";\nimport svgVisibility from \"@bentley/icons-generic/icons/visibility.svg\";\nimport type { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getFeatureOverrideSyncEventIds(): string[] {\n return [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getSelectionContextSyncEventIds(): string[] {\n return [\n SyncUiEventId.SelectionSetChanged,\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n // eslint-disable-next-line deprecation/deprecation\n SessionStateActionId.SetNumItemsSelected,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function isNoSelectionActive(): boolean {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n const selectionCount = UiFramework.getNumItemsSelected();\n\n if (activeContentControl?.viewport) {\n const hiddenElementsSet = activeContentControl.viewport.neverDrawn;\n const selectedElementsSet =\n activeContentControl.viewport.view.iModel.selectionSet.elements;\n // TODO: add check for categories, subcategories and models\n if (\n selectionCount > 0 ||\n ![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value))\n )\n return false;\n }\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function areNoFeatureOverridesActive(): boolean {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n activeContentControl.viewport\n );\n\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show item if feature overrides are active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfFeatureOverridesActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n areNoFeatureOverridesActive,\n getFeatureOverrideSyncEventIds()\n );\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfSelectionNotActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n isNoSelectionActive,\n getSelectionContextSyncEventIds()\n );\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function featureOverridesActiveStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n let isVisible = false;\n\n if (activeContentControl && activeContentControl.viewport)\n isVisible =\n UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n activeContentControl.viewport\n );\n\n return { ...state, isVisible };\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function selectionContextStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n let isVisible = false;\n\n const selectionCount = UiFramework.getNumItemsSelected();\n if (\n activeContentControl &&\n activeContentControl.viewport &&\n (activeContentControl.viewport.view.iModel.selectionSet.size > 0 ||\n selectionCount > 0)\n )\n isVisible = true;\n return { ...state, isVisible };\n}\n\n/** Utility Class that provides definitions for tools dependent on current selection. These definitions can be used to populate toolbars.\n * @public\n * @deprecated in 4.15.0. Use {@link ToolbarItems} instead.\n */\nexport class SelectionContextToolDefinitions {\n public static get isolateModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateModel\",\n iconSpec: svgModelIsolate,\n labelKey: \"UiFramework:tools.isolateModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsModel(),\n });\n }\n\n public static get isolateCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateCategory\",\n iconSpec: svgLayersIsolate,\n labelKey: \"UiFramework:tools.isolateCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsCategory(),\n });\n }\n\n public static get isolateElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateSelected\",\n iconSpec: svgAssetIsolate,\n labelKey: \"UiFramework:tools.isolateSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelected(),\n });\n }\n\n public static get isolateSelectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.IsolateSelectionGroup\",\n labelKey: \"UiFramework:tools.isolate\",\n iconSpec: svgIsolate,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.isolateElementsItemDef,\n this.isolateCategoriesInSelectionItemDef,\n this.isolateModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get hideModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideModel\",\n iconSpec: svgModelHide,\n labelKey: \"UiFramework:tools.hideModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsModel(),\n });\n }\n\n public static get hideCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideCategory\",\n iconSpec: svgLayersHide,\n labelKey: \"UiFramework:tools.hideCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsCategory(),\n });\n }\n\n public static get hideElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideSelected\",\n iconSpec: svgAssetClassificationHide,\n labelKey: \"UiFramework:tools.hideSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelected(),\n });\n }\n\n public static get hideSectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.HideSelectionGroup\",\n labelKey: \"UiFramework:tools.hide\",\n iconSpec: svgVisibilityHide,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.hideElementsItemDef,\n this.hideCategoriesInSelectionItemDef,\n this.hideModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get emphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.EmphasizeSelected\",\n iconSpec: svgVisibilitySemiTransparent,\n labelKey: \"UiFramework:tools.emphasizeSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processEmphasizeSelected(),\n });\n }\n\n public static get clearHideIsolateEmphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearHideIsolateEmphasize\",\n iconSpec: svgVisibility,\n labelKey: \"UiFramework:tools.clearVisibility\",\n isHidden: getIsHiddenIfFeatureOverridesActive(),\n execute: async () => {\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearEmphasize();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideModels();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideCategories();\n },\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SelectionContextItemDef.js","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgE;AAChE,wDAA6D;AAC7D,6DAA0D;AAE1D,2EAAgE;AAChE,oDAAoD;AACpD,gDAA6C;AAC7C,sFAA6E;AAC7E,wFAA+E;AAC/E,sFAA6E;AAC7E,0EAAkE;AAClE,gFAAuE;AACvE,kFAAyE;AACzE,8GAAoG;AACpG,kHAAwG;AACxG,8FAAmF;AACnF,gFAAwE;AAExE,kEAA+D;AAE/D,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,8BAA8B;IAC5C,OAAO;QACL,qCAAa,C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CAAiC,CAAC,wBAAwB,EAAE;SAC3E,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,KAAK,wCAAwC;QACxD,OAAO,IAAI,+BAAc,CAAC;YACxB,SAAS,EAAE,uCAAuC;YAClD,QAAQ,EAAE,wBAAa;YACvB,QAAQ,EAAE,mCAAmC;YAC7C,QAAQ,EAAE,mCAAmC,EAAE;YAC/C,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,yBAAW,CAAC,iCAAiC,CAAC,qBAAqB,EAAE,CAAC;gBAC5E,MAAM,yBAAW,CAAC,iCAAiC,CAAC,0BAA0B,EAAE,CAAC;gBACjF,MAAM,yBAAW,CAAC,iCAAiC,CAAC,8BAA8B,EAAE,CAAC;YACvF,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AArHD,0EAqHC","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 Tools\n */\n\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport type { BaseItemState } from \"../shared/ItemDefBase\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { UiFramework } from \"../UiFramework\";\nimport svgModelIsolate from \"@bentley/icons-generic/icons/model-isolate.svg\";\nimport svgLayersIsolate from \"@bentley/icons-generic/icons/layers-isolate.svg\";\nimport svgAssetIsolate from \"@bentley/icons-generic/icons/asset-isolate.svg\";\nimport svgIsolate from \"@bentley/icons-generic/icons/isolate.svg\";\nimport svgModelHide from \"@bentley/icons-generic/icons/model-hide.svg\";\nimport svgLayersHide from \"@bentley/icons-generic/icons/layers-hide.svg\";\nimport svgAssetClassificationHide from \"@bentley/icons-generic/icons/asset-classification-hide.svg\";\nimport svgVisibilitySemiTransparent from \"@bentley/icons-generic/icons/visibility-semi-transparent.svg\";\nimport svgVisibilityHide from \"@bentley/icons-generic/icons/visibility-hide_2.svg\";\nimport svgVisibility from \"@bentley/icons-generic/icons/visibility.svg\";\nimport type { ToolbarItems } from \"../tools/ToolbarItems\";\nimport { getActiveViewport } from \"../utils/getActiveViewport\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getFeatureOverrideSyncEventIds(): string[] {\n return [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getSelectionContextSyncEventIds(): string[] {\n return [\n SyncUiEventId.SelectionSetChanged,\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n // eslint-disable-next-line deprecation/deprecation\n SessionStateActionId.SetNumItemsSelected,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function isNoSelectionActive(): boolean {\n const viewport = getActiveViewport();\n if (!viewport) {\n return true;\n }\n\n const selectionCount = UiFramework.getNumItemsSelected();\n if (selectionCount > 0) return false;\n\n // TODO: add check for categories, subcategories and models\n const hiddenElementsSet = viewport.neverDrawn;\n const selectedElementsSet = viewport.view.iModel.selectionSet.elements;\n if (![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))\n return false;\n\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function areNoFeatureOverridesActive(): boolean {\n const viewport = getActiveViewport();\n if (!viewport) {\n return true;\n }\n\n return !UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n viewport\n );\n}\n\n/** Return ConditionalBooleanValue object used to show item if feature overrides are active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfFeatureOverridesActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n areNoFeatureOverridesActive,\n getFeatureOverrideSyncEventIds()\n );\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfSelectionNotActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n isNoSelectionActive,\n getSelectionContextSyncEventIds()\n );\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function featureOverridesActiveStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const viewport = getActiveViewport();\n if (!viewport) {\n return { ...state, isVisible: false };\n }\n\n const isVisible =\n UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n viewport\n );\n return { ...state, isVisible };\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function selectionContextStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const viewport = getActiveViewport();\n if (!viewport) {\n return { ...state, isVisible: false };\n }\n\n const selectionCount = UiFramework.getNumItemsSelected();\n const isVisible =\n viewport.view.iModel.selectionSet.size > 0 || selectionCount > 0;\n return { ...state, isVisible };\n}\n\n/** Utility Class that provides definitions for tools dependent on current selection. These definitions can be used to populate toolbars.\n * @public\n * @deprecated in 4.15.0. Use {@link ToolbarItems} instead.\n */\nexport class SelectionContextToolDefinitions {\n public static get isolateModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateModel\",\n iconSpec: svgModelIsolate,\n labelKey: \"UiFramework:tools.isolateModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsModel(),\n });\n }\n\n public static get isolateCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateCategory\",\n iconSpec: svgLayersIsolate,\n labelKey: \"UiFramework:tools.isolateCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsCategory(),\n });\n }\n\n public static get isolateElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateSelected\",\n iconSpec: svgAssetIsolate,\n labelKey: \"UiFramework:tools.isolateSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelected(),\n });\n }\n\n public static get isolateSelectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.IsolateSelectionGroup\",\n labelKey: \"UiFramework:tools.isolate\",\n iconSpec: svgIsolate,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.isolateElementsItemDef,\n this.isolateCategoriesInSelectionItemDef,\n this.isolateModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get hideModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideModel\",\n iconSpec: svgModelHide,\n labelKey: \"UiFramework:tools.hideModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsModel(),\n });\n }\n\n public static get hideCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideCategory\",\n iconSpec: svgLayersHide,\n labelKey: \"UiFramework:tools.hideCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsCategory(),\n });\n }\n\n public static get hideElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideSelected\",\n iconSpec: svgAssetClassificationHide,\n labelKey: \"UiFramework:tools.hideSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelected(),\n });\n }\n\n public static get hideSectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.HideSelectionGroup\",\n labelKey: \"UiFramework:tools.hide\",\n iconSpec: svgVisibilityHide,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.hideElementsItemDef,\n this.hideCategoriesInSelectionItemDef,\n this.hideModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get emphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.EmphasizeSelected\",\n iconSpec: svgVisibilitySemiTransparent,\n labelKey: \"UiFramework:tools.emphasizeSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processEmphasizeSelected(),\n });\n }\n\n public static get clearHideIsolateEmphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearHideIsolateEmphasize\",\n iconSpec: svgVisibility,\n labelKey: \"UiFramework:tools.clearVisibility\",\n isHidden: getIsHiddenIfFeatureOverridesActive(),\n execute: async () => {\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearEmphasize();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideModels();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideCategories();\n },\n });\n }\n}\n"]}
|
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
* @module Item
|
|
3
3
|
*/
|
|
4
4
|
import { ConditionalBooleanValue as _ConditionalBooleanValue, ConditionalStringValue as _ConditionalStringValue } from "@itwin/appui-abstract";
|
|
5
|
-
|
|
5
|
+
/** Interface used to track the conditional value of a generic type `T`. The `getValue` function should be called when sync event is emitted that matches one of specified `eventIds` values.
|
|
6
|
+
* @note Use {@link useConditionalValue} hook to get the value.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface ConditionalValue<T> {
|
|
10
|
+
eventIds: string[];
|
|
11
|
+
getValue: () => T;
|
|
12
|
+
}
|
|
6
13
|
/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The `syncEventIds` define
|
|
7
14
|
* events that would require the `testFunc` function to be rerun.
|
|
8
15
|
* @public
|
|
9
16
|
*/
|
|
10
17
|
export type ConditionalBooleanValue = _ConditionalBooleanValue;
|
|
18
|
+
/** @public */
|
|
11
19
|
export declare const ConditionalBooleanValue: typeof _ConditionalBooleanValue;
|
|
12
20
|
/** Class used to return a string value. The string value is refreshed by using the specified function. The `syncEventIds` define
|
|
13
21
|
* events that would require the `stringGetter` function to be rerun.
|
|
14
22
|
* @public
|
|
15
23
|
*/
|
|
16
24
|
export type ConditionalStringValue = _ConditionalStringValue;
|
|
25
|
+
/** @public */
|
|
17
26
|
export declare const ConditionalStringValue: typeof _ConditionalStringValue;
|
|
18
|
-
/** Class used to return an icon value. The value is refreshed by using the specified function. The `syncEventIds` define
|
|
19
|
-
* events that would require the `iconGetter` function to be rerun.
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export type ConditionalIconValue = _ConditionalIconItem;
|
|
23
|
-
export declare const ConditionalIconValue: typeof _ConditionalIconItem;
|
|
24
27
|
//# sourceMappingURL=ConditionalValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalValue.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EACL,uBAAuB,IAAI,wBAAwB,EACnD,sBAAsB,IAAI,uBAAuB,EAClD,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConditionalValue.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EACL,uBAAuB,IAAI,wBAAwB,EACnD,sBAAsB,IAAI,uBAAuB,EAClD,MAAM,uBAAuB,CAAC;AAI/B;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAC/D,cAAc;AAEd,eAAO,MAAM,uBAAuB,iCAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC7D,cAAc;AAEd,eAAO,MAAM,sBAAsB,gCAA0B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ConditionalStringValue = exports.ConditionalBooleanValue = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
5
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
6
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -9,11 +9,10 @@ exports.ConditionalIconValue = exports.ConditionalStringValue = exports.Conditio
|
|
|
9
9
|
* @module Item
|
|
10
10
|
*/
|
|
11
11
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
12
|
-
|
|
12
|
+
/** @public */
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
14
14
|
exports.ConditionalBooleanValue = appui_abstract_1.ConditionalBooleanValue;
|
|
15
|
+
/** @public */
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
16
17
|
exports.ConditionalStringValue = appui_abstract_1.ConditionalStringValue;
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation
|
|
18
|
-
exports.ConditionalIconValue = core_react_1.ConditionalIconItem;
|
|
19
18
|
//# sourceMappingURL=ConditionalValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAG+B;
|
|
1
|
+
{"version":3,"file":"ConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAG+B;AAkB/B,cAAc;AACd,2DAA2D;AAC9C,QAAA,uBAAuB,GAAG,wCAAwB,CAAC;AAOhE,cAAc;AACd,2DAA2D;AAC9C,QAAA,sBAAsB,GAAG,uCAAuB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Item\n */\nimport {\n ConditionalBooleanValue as _ConditionalBooleanValue,\n ConditionalStringValue as _ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalIconItem as _ConditionalIconItem } from \"@itwin/core-react\";\nimport type { useConditionalValue } from \"../hooks/useConditionalValue\";\n\n/** Interface used to track the conditional value of a generic type `T`. The `getValue` function should be called when sync event is emitted that matches one of specified `eventIds` values.\n * @note Use {@link useConditionalValue} hook to get the value.\n * @public\n */\nexport interface ConditionalValue<T> {\n eventIds: string[];\n getValue: () => T;\n}\n\n/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `testFunc` function to be rerun.\n * @public\n */\nexport type ConditionalBooleanValue = _ConditionalBooleanValue;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalBooleanValue = _ConditionalBooleanValue;\n\n/** Class used to return a string value. The string value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `stringGetter` function to be rerun.\n * @public\n */\nexport type ConditionalStringValue = _ConditionalStringValue;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalStringValue = _ConditionalStringValue;\n"]}
|
|
@@ -26,6 +26,7 @@ export interface StatusBarItemProps extends CommonProps {
|
|
|
26
26
|
export declare function DockedStatusBarItem(props: StatusBarItemProps): React.JSX.Element;
|
|
27
27
|
/** Properties for the [[StatusBarComposer]] React components
|
|
28
28
|
* @public
|
|
29
|
+
* @deprecated in 4.17.0. Use `React.ComponentProps<typeof StatusBarComposer>`
|
|
29
30
|
*/
|
|
30
31
|
export interface StatusBarComposerProps extends CommonProps {
|
|
31
32
|
/** Status Bar items */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBarComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,iBAAiB,CAAC;AAqBzB,UAAU,8BAA8B;IACtC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAMD,gBAAgB;AAChB,wBAAgB,iBAAiB,mCAEhC;AAED;;GAEG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAA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sBAAsB,qBAsR9D"}
|
|
@@ -176,6 +176,7 @@ function isItemInOverflow(id, overflowItemIds) {
|
|
|
176
176
|
/** Component to load components into the [[StatusBar]].
|
|
177
177
|
* @public
|
|
178
178
|
*/
|
|
179
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
179
180
|
function StatusBarComposer(props) {
|
|
180
181
|
const { className, style, items, mainClassName, leftClassName, centerClassName, rightClassName, } = props;
|
|
181
182
|
const [defaultItemsManager, setDefaultItemsManager] = React.useState(() => new StatusBarItemsManager_1.StatusBarItemsManager(items));
|
|
@@ -188,10 +189,12 @@ function StatusBarComposer(props) {
|
|
|
188
189
|
setDefaultItemsManager(new StatusBarItemsManager_1.StatusBarItemsManager(items));
|
|
189
190
|
}
|
|
190
191
|
}, [items]);
|
|
192
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
191
193
|
const defaultItems = (0, useDefaultStatusBarItems_1.useDefaultStatusBarItems)(defaultItemsManager);
|
|
192
194
|
const syncIdsOfInterest = React.useMemo(() => StatusBarItemsManager_1.StatusBarItemsManager.getSyncIdsOfInterest(defaultItems), [defaultItems]);
|
|
193
195
|
useStatusBarItemSyncEffect(defaultItemsManager, syncIdsOfInterest);
|
|
194
196
|
const [addonItemsManager] = React.useState(() => new StatusBarItemsManager_1.StatusBarItemsManager());
|
|
197
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
195
198
|
const addonItems = (0, useUiItemsProviderStatusBarItems_1.useUiItemsProviderStatusBarItems)(addonItemsManager);
|
|
196
199
|
const addonSyncIdsOfInterest = React.useMemo(() => StatusBarItemsManager_1.StatusBarItemsManager.getSyncIdsOfInterest(addonItems), [addonItems]);
|
|
197
200
|
useStatusBarItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);
|
|
@@ -202,8 +205,10 @@ function StatusBarComposer(props) {
|
|
|
202
205
|
const combinedItems = combineItems(defaultItems, addonItems);
|
|
203
206
|
return sortItems(combinedItems);
|
|
204
207
|
}, [defaultItems, addonItems]);
|
|
205
|
-
const
|
|
206
|
-
return statusBarItems
|
|
208
|
+
const notOverflown = React.useMemo(() => {
|
|
209
|
+
return statusBarItems
|
|
210
|
+
.filter((item) => !isItemInOverflow(item.id, overflown))
|
|
211
|
+
.map((item) => item.id);
|
|
207
212
|
}, [overflown, statusBarItems]);
|
|
208
213
|
const calculateOverflow = React.useCallback(() => {
|
|
209
214
|
const widths = verifiedMapEntries(entryWidths.current);
|
|
@@ -256,10 +261,9 @@ function StatusBarComposer(props) {
|
|
|
256
261
|
const providerId = (0, isProviderItem_1.isProviderItem)(item) ? item.providerId : undefined;
|
|
257
262
|
return (React.createElement(DockedStatusBarEntry, { key: key, entryKey: key, getOnResize: handleEntryResize },
|
|
258
263
|
React.createElement(DockedStatusBarItem, { key: key, itemId: item.id, itemPriority: itemPriority, providerId: providerId, section: getSectionName(section) },
|
|
259
|
-
React.createElement(StatusBarCornerComponentContext_1.StatusBarCornerComponentContext.Provider, { value: key ===
|
|
264
|
+
React.createElement(StatusBarCornerComponentContext_1.StatusBarCornerComponentContext.Provider, { value: key === notOverflown[0]
|
|
260
265
|
? "left-corner"
|
|
261
|
-
: (key ===
|
|
262
|
-
itemsNotInOverflow[itemsNotInOverflow.length - 1].id &&
|
|
266
|
+
: (key === notOverflown[notOverflown.length - 1] &&
|
|
263
267
|
overflown?.length === 0) ||
|
|
264
268
|
isItemInOverflow(key, overflown)
|
|
265
269
|
? "right-corner"
|
|
@@ -267,7 +271,7 @@ function StatusBarComposer(props) {
|
|
|
267
271
|
(0, StatusBarItem_1.isStatusBarCustomItem)(item) && item.content,
|
|
268
272
|
(0, StatusBarItem_1.isStatusBarActionItem)(item) && (React.createElement(StatusBarActionItemComponent, { ...item })),
|
|
269
273
|
(0, StatusBarItem_1.isStatusBarLabelItem)(item) && (React.createElement(StatusBarLabelItemComponent, { ...item }))))));
|
|
270
|
-
}, [handleEntryResize,
|
|
274
|
+
}, [handleEntryResize, notOverflown, overflown]);
|
|
271
275
|
const getSectionItems = React.useCallback((section) => {
|
|
272
276
|
const sectionItems = statusBarItems
|
|
273
277
|
.filter((item) => item.section.valueOf() === section.valueOf() &&
|