import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import { OnDestroy, EventEmitter, ElementRef, ChangeDetectorRef, AfterViewInit, AfterContentInit, TemplateRef, QueryList, ViewContainerRef } from '@angular/core'; import { Subject, Observable } from 'rxjs'; import { MenuInteractiveComponent } from '@fundamental-ngx/core/menu'; import { Overlay } from '@angular/cdk/overlay'; import * as i4 from '@fundamental-ngx/core/content-density'; import { ContentDensityObserver } from '@fundamental-ngx/core/content-density'; /** * @deprecated */ declare class MenuItemComponent implements OnDestroy, FocusableOption { private _elementRef; private _cdr; /** Set the Menu Item as disabled/enabled */ disabled: boolean; /** Menu direction */ cascadeDirection: 'right' | 'left'; /** Event emitted when item is selected. */ itemSelect: EventEmitter; /** Sets whether this item is a trigger for sub-menu. */ isTrigger: boolean; /** @hidden */ _fdMenuInteractiveChild: MenuInteractiveComponent; /** Track when menu item is hovered over */ hovered: Subject; /** @hidden */ _isSelected: boolean; /** * @hidden * set CSS class 'is-selected' if menu-item opens a sub-menu. */ set isSelected(selected: boolean); /** @hidden */ get isSelected(): boolean; /** @hidden */ constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef); /** * @hidden * Handle selection of item via keyboard 'Enter' */ protected _onItemKeydown(event: KeyboardEvent): void; /** * @hidden * Handle click of item via mouse click. */ protected _onItemClick(event: MouseEvent): void; /** * @hidden * Handle mouse enter event. */ protected _onMouseEnter(): void; /** @hidden */ ngOnDestroy(): void; /** Focus on option */ focus(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type MenuCloseMethod = void | 'mouse' | 'keyboard' | 'tab' | 'arrow'; /** * @deprecated * Menu component is deprecated. Use `fd-menu` from `@fundamental-ngx/core/menu` instead. */ declare class MenuComponent implements AfterViewInit, AfterContentInit, OnDestroy { /** Menu ID */ set id(id: string); get id(): string; /** * Whether menu can be opened using arrow keys * @default true */ openByArrowKeys: boolean; /** * Horizontal position of menu in relation to trigger element. */ xPosition: 'before' | 'after'; /** * The templateRef needs to be available to the menu trigger for * opening in a CDK overlay. */ templateRef: TemplateRef; /** * Child items of the menu. */ menuItems: QueryList; /** * Emitted event when menu closes */ close: EventEmitter; /** @hidden */ menuId: string; /** @hidden */ readonly contentDensityObserver: ContentDensityObserver; /** Menu direction */ protected readonly direction: i0.Signal<"rtl" | "ltr">; /** @hidden */ private _id; /** @hidden */ private _keyManager; /** @hidden */ private _tabSubscription; /** @hidden */ private readonly _rtlService; /** @hidden */ constructor(); /** @hidden */ ngAfterViewInit(): void; /** @hidden */ ngAfterContentInit(): void; /** @hidden */ ngOnDestroy(): void; /** * Set focus on first item * @param origin FocusOrigin */ focusOnFirstItem(origin?: FocusOrigin): void; /** * Close menu * @param method menu close method */ closeMenu(method: MenuCloseMethod): void; /** * @hidden * Menu keydown handler */ _onKeydown(event: KeyboardEvent): void; /** * @hidden * Menu click handler */ _onClick(): void; /** * @hidden * Get stream of menu items hover change */ _menuItemHoverChange(): Observable; /** @hidden */ _setMenuItemCascadeDirection(): void; /** * @hidden * Check if cascade menu should appear from right */ _cascadesRight(): boolean; /** * @hidden * Check if cascade menu should appear from left */ _cascadesLeft(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MenuTriggerDirective implements OnDestroy, AfterContentInit { private _element; private _overlay; private _viewContainerRef; private _menuItem; private _parentMenu; /** Set Menu Component for which this trigger will be associated. */ set menu(menu: MenuComponent); get menu(): MenuComponent; /** Flag to determine if associated menu is open. */ get isMenuOpen(): boolean; /** @hidden */ private _menu; /** @hidden */ private _overlayRef; /** @hidden */ private _portal; /** @hidden */ private _isMenuOpen; /** @hidden */ private _outsideClickSubscription; /** @hidden */ private _menuCloseSubscription; /** @hidden */ private _parentMenuCloseSubscription; /** @hidden */ private _menuItemHoverChangeSubscription; private _menuButton; /** @hidden */ constructor(_element: ElementRef, _overlay: Overlay, _viewContainerRef: ViewContainerRef, _menuItem: MenuItemComponent, _parentMenu: MenuComponent); /** * @hidden * Handle click on trigger element. */ _onTriggerClick(event: MouseEvent): void; /** * @hidden * Handled keypress which focus is on trigger element. */ _onTriggerKeydown(event: KeyboardEvent): void; /** @hidden */ ngAfterContentInit(): void; /** @hidden */ ngOnDestroy(): void; /** * @hidden * Toggle display of associated menu. */ toggleMenu(): void; /** * @hidden * Open associated menu. */ openMenu(): void; /** * @hidden * Close associated menu. */ closeMenu(): void; /** * @hidden * destroy associated menu. */ private _destroyMenu; /** @hidden */ private _getOverlayConfig; /** @hidden */ private _getPositions; /** @hidden */ private _isMenuItem; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated * Use direct imports of components and directives. */ declare class PlatformMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { MenuComponent, MenuItemComponent, MenuTriggerDirective, PlatformMenuModule }; export type { MenuCloseMethod };