/** Autogenerated by public2business schematic. DO NOT CHANGE! */ import { AnimationEvent } from '@angular/animations'; import { BreakpointObserver } from '@angular/cdk/layout'; import { ConnectedPosition, Overlay, RepositionScrollStrategy, ScrollStrategy, ViewportRuler } from '@angular/cdk/overlay'; import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { TypeRef } from '@sbb-esta/angular-core/common-behaviors'; /** Injection token that determines the scroll handling while a usermenu is open. */ export declare const SBB_USERMENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ export declare function SBB_USERMENU_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => RepositionScrollStrategy; /** @docs-private */ export declare const SBB_USERMENU_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof SBB_USERMENU_SCROLL_STRATEGY_PROVIDER_FACTORY; }; export declare class SbbUsermenu implements OnInit, OnDestroy, AfterContentInit { private _viewportRuler; private _breakpointObserver; private _changeDetectorRef; _elementRef: ElementRef; /** Identifier of the usermenu. */ id: string; /** * This position config ensures that the top "start" corner of the overlay * is aligned with with the top "start" of the origin by default (overlapping * the trigger completely). If the panel cannot fit below the trigger, it * will fall back to a position above the trigger. */ _positions: ConnectedPosition[]; /** The last measured value for the trigger's client bounding rect. */ _triggerRect: ClientRect; /** Desired width of the overlay */ _overlayWidth: number; /** padding of overlay */ _overlayMinWidthPadding: number; /** Min width of overlay when starting animation */ get _overlayMinWidth(): number; /** * The user name is only displayed if the menu is open. * If userName is set, logged in state is active. */ userName: string; /** * The display name is shown on collapsed trigger and on opened state of the menu (except on mobile devices). * If displayName is set, logged in state is active. */ displayName: string; /** Event emitted on log in of a user. */ loginRequest: EventEmitter; private _loginButton; private _triggerOpenButton; private _triggerCloseButton; /** Reference to user provided icon */ _icon?: TemplateRef; /** Panel containing usermenu items. */ private _panel; /** All of the defined usermenu items. */ private _usermenuItems; /** Whether or not the overlay panel is open. */ get panelOpen(): boolean; private _panelOpen; /** Whether the user is logged in or not. */ get _loggedIn(): boolean; /** Initial letters of user's displayName (or userName if no displayName is provided). */ get _initialLetters(): string; get _ariaLabelOpenPanel(): string; get _ariaLabelClosePanel(): string; /** Whether the current component is used in business package or not */ _isBusiness: boolean; /** Strategy that will be used to handle scrolling while the usermenu panel is open. */ _scrollStrategy: ScrollStrategy; /** Factory function used to create a scroll strategy for this usermenu. */ private readonly _scrollStrategyFactory; /** Emits whenever the component is destroyed. */ private readonly _destroy; /** Manages keyboard events for usermenu items in the panel. */ private _keyManager; constructor(_viewportRuler: ViewportRuler, _breakpointObserver: BreakpointObserver, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, scrollStrategyFactory: any); ngOnInit(): void; ngAfterContentInit(): void; /** Sets up a key manager to listen to keyboard events on the overlay panel. */ private _initKeyManager; ngOnDestroy(): void; _emitLogin(): void; /** Opens the overlay panel */ open(): void; /** Closes the overlay panel */ close(): void; /** Toggles the overlay panel visibility */ toggle(): void; /** Forwards focus to the currently matching usermenu button */ focus(): void; /** Closes the overlay panel and focuses the host element */ _closeAndFocus(): void; /** Set focus to close button upon opening the panel */ _handlePanelOpen(event: AnimationEvent): void; /** * Resets the active item in the menu. This is used when the menu is opened, allowing * the user to start from the first usermenu item when pressing the down arrow. */ private _resetActiveItem; /** Handles all keydown events on the usermenu. */ _handleKeydown(event: TypeRef): void; /** Handles keyboard events while the panel is closed. */ private _handleClosedKeydown; /** Handles keyboard events when the panel is open. */ private _handleOpenKeydown; }