import type { RouteProps } from 'react-router-dom'; import type { LinkProps } from '@teambit/base-react.navigation.link'; import type { CommandBarUI } from '@teambit/command-bar'; import type { SlotRegistry } from '@teambit/harmony'; import type { PubsubUI } from '@teambit/pubsub'; import type { ReactRouterUI } from '@teambit/react-router'; import type { MenuItem, MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown'; import type { NavigationSlot, RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router'; import type { ComponentModel } from './ui'; import type { ComponentPageElement, ComponentPageSlot } from './ui/component'; import type { ComponentResultPlugin } from './ui/component-searcher'; import type { ConsumeMethodSlot, ConsumePlugin, NavPlugin, OrderedNavigationSlot, RightSideMenuItem, RightSideMenuSlot } from './ui/menu'; import type { GetComponentsOptions } from './get-component-opts'; export type ComponentSearchResultSlot = SlotRegistry; export type ComponentUIConfig = { commandBar: boolean; }; export type Server = { env: string; url: string; }; export type ComponentMeta = { id: string; }; export declare class ComponentUI { /** * Pubsub aspects */ private pubsub; private routeSlot; private navSlot; readonly consumeMethodSlot: ConsumeMethodSlot; /** * slot for registering a new widget to the menu. */ private widgetSlot; /** * slot for registering pinned widgets to the menu */ private pinnedWidgetSlot; /** * slot for registering the right section of the menu */ private rightSideMenuSlot; private menuItemSlot; private pageItemSlot; private componentSearchResultSlot; private commandBarUI; readonly routePath = "/*"; private componentSearcher; constructor( /** * Pubsub aspects */ pubsub: PubsubUI, routeSlot: RouteSlot, navSlot: OrderedNavigationSlot, consumeMethodSlot: ConsumeMethodSlot, /** * slot for registering a new widget to the menu. */ widgetSlot: OrderedNavigationSlot, /** * slot for registering pinned widgets to the menu */ pinnedWidgetSlot: OrderedNavigationSlot, /** * slot for registering the right section of the menu */ rightSideMenuSlot: RightSideMenuSlot, menuItemSlot: MenuItemSlot, pageItemSlot: ComponentPageSlot, componentSearchResultSlot: ComponentSearchResultSlot, commandBarUI: CommandBarUI, reactRouterUi: ReactRouterUI); get routes(): [string, RouteProps[]][]; /** * the current visible component */ private activeComponent?; formatToInstallableVersion(version: string): string; private copyNpmId; /** * key bindings used by component aspect */ private keyBindings; private menuItems; private bitMethod; registerPubSub(): void; handleComponentChange: (activeComponent?: ComponentModel) => void; getComponentUI(host: string, options?: GetComponentsOptions): import("react/jsx-runtime").JSX.Element; getMenu(host: string, options?: GetComponentsOptions): import("react/jsx-runtime").JSX.Element; listMenuItems(): import("lodash").Dictionary; registerRoute(routes: RouteProps[] | RouteProps): this; registerNavigation(nav: LinkProps, order?: number): void; registerConsumeMethod(...consumeMethods: ConsumePlugin[]): void; registerWidget(widget: LinkProps, order?: number): void; registerPinnedWidget(widget: LinkProps, order?: number): void; registerRightSideMenuItem(...rightSideMenuItem: RightSideMenuItem[]): void; registerMenuItem: (menuItems: MenuItem[]) => void; registerPageItem: (...items: ComponentPageElement[]) => void; /** register widgets to the components listed in the command bar */ registerSearchResultWidget: (...items: ComponentResultPlugin[]) => void; updateComponents: (components: ComponentModel[]) => void; static dependencies: import("@teambit/harmony").Aspect[]; static runtime: import("@teambit/harmony").RuntimeDefinition; static slots: (((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry) | ((registerFn: () => string) => SlotRegistry))[]; static defaultConfig: ComponentUIConfig; static provider([pubsub, commandBarUI, reactRouterUI]: [PubsubUI, CommandBarUI, ReactRouterUI], config: ComponentUIConfig, [routeSlot, navSlot, consumeMethodSlot, widgetSlot, menuItemSlot, pageSlot, componentSearchResultSlot, rightSideMenuSlot, pinnedWidgetSlot,]: [ RouteSlot, OrderedNavigationSlot, ConsumeMethodSlot, OrderedNavigationSlot, MenuItemSlot, ComponentPageSlot, ComponentSearchResultSlot, RightSideMenuSlot, OrderedNavigationSlot ]): Promise; } export default ComponentUI;