You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.7 KiB
1 lines
7.7 KiB
{"version":3,"file":"menu-trigger.d.ts","sources":["menu-trigger.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;;;AACA","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport { Overlay, ScrollStrategy } from '@angular/cdk/overlay';\nimport { AfterContentInit, ElementRef, EventEmitter, InjectionToken, OnDestroy, ViewContainerRef } from '@angular/core';\nimport { MatMenuItem } from './menu-item';\nimport { MatMenuPanel } from './menu-panel';\n/** Injection token that determines the scroll handling while the menu is open. */\nexport declare const MAT_MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;\n/** @docs-private */\nexport declare function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;\n/** @docs-private */\nexport declare const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: {\n provide: InjectionToken<() => ScrollStrategy>;\n deps: (typeof Overlay)[];\n useFactory: typeof MAT_MENU_SCROLL_STRATEGY_FACTORY;\n};\n/** Default top padding of the menu panel. */\nexport declare const MENU_PANEL_TOP_PADDING = 8;\nexport declare abstract class _MatMenuTriggerBase implements AfterContentInit, OnDestroy {\n private _overlay;\n private _element;\n private _viewContainerRef;\n private _menuItemInstance;\n private _dir;\n private _focusMonitor?;\n private _portal;\n private _overlayRef;\n private _menuOpen;\n private _closingActionsSubscription;\n private _hoverSubscription;\n private _menuCloseSubscription;\n private _scrollStrategy;\n /**\n * We're specifically looking for a `MatMenu` here since the generic `MatMenuPanel`\n * interface lacks some functionality around nested menus and animations.\n */\n private _parentMaterialMenu;\n /**\n * Handles touch start events on the trigger.\n * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.\n */\n private _handleTouchStart;\n _openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;\n get _ariaExpanded(): true | null;\n get _ariaControl(): string | null | undefined;\n _ariaHaspopup: boolean;\n /**\n * @deprecated\n * @breaking-change 8.0.0\n */\n get _deprecatedMatMenuTriggerFor(): MatMenuPanel;\n set _deprecatedMatMenuTriggerFor(v: MatMenuPanel);\n /** References the menu instance that the trigger is associated with. */\n get menu(): MatMenuPanel;\n set menu(menu: MatMenuPanel);\n private _menu;\n /** Data to be passed along to any lazily-rendered content. */\n menuData: any;\n /**\n * Whether focus should be restored when the menu is closed.\n * Note that disabling this option can have accessibility implications\n * and it's up to you to manage focus, if you decide to turn it off.\n */\n restoreFocus: boolean;\n /** Event emitted when the associated menu is opened. */\n readonly menuOpened: EventEmitter<void>;\n /**\n * Event emitted when the associated menu is opened.\n * @deprecated Switch to `menuOpened` instead\n * @breaking-change 8.0.0\n */\n readonly onMenuOpen: EventEmitter<void>;\n /** Event emitted when the associated menu is closed. */\n readonly menuClosed: EventEmitter<void>;\n /**\n * Event emitted when the associated menu is closed.\n * @deprecated Switch to `menuClosed` instead\n * @breaking-change 8.0.0\n */\n readonly onMenuClose: EventEmitter<void>;\n constructor(_overlay: Overlay, _element: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, scrollStrategy: any, parentMenu: MatMenuPanel, _menuItemInstance: MatMenuItem, _dir: Directionality, _focusMonitor?: FocusMonitor | undefined);\n ngAfterContentInit(): void;\n ngOnDestroy(): void;\n /** Whether the menu is open. */\n get menuOpen(): boolean;\n /** The text direction of the containing app. */\n get dir(): Direction;\n /** Whether the menu triggers a sub-menu or a top-level one. */\n triggersSubmenu(): boolean;\n /** Toggles the menu between the open and closed states. */\n toggleMenu(): void;\n /** Opens the menu. */\n openMenu(): void;\n /** Closes the menu. */\n closeMenu(): void;\n /**\n * Focuses the menu trigger.\n * @param origin Source of the menu trigger's focus.\n */\n focus(origin?: FocusOrigin, options?: FocusOptions): void;\n /**\n * Updates the position of the menu to ensure that it fits all options within the viewport.\n */\n updatePosition(): void;\n /** Closes the menu and does the necessary cleanup. */\n private _destroyMenu;\n /**\n * This method sets the menu state to open and focuses the first item if\n * the menu was opened via the keyboard.\n */\n private _initMenu;\n /** Updates the menu elevation based on the amount of parent menus that it has. */\n private _setMenuElevation;\n private _setIsMenuOpen;\n /**\n * This method checks that a valid instance of MatMenu has been passed into\n * matMenuTriggerFor. If not, an exception is thrown.\n */\n private _checkMenu;\n /**\n * This method creates the overlay from the provided menu's template and saves its\n * OverlayRef so that it can be attached to the DOM when openMenu is called.\n */\n private _createOverlay;\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @returns OverlayConfig\n */\n private _getOverlayConfig;\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the menu based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n */\n private _subscribeToPositions;\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n private _setPosition;\n /** Returns a stream that emits whenever an action that should close the menu occurs. */\n private _menuClosingActions;\n /** Handles mouse presses on the trigger. */\n _handleMousedown(event: MouseEvent): void;\n /** Handles key presses on the trigger. */\n _handleKeydown(event: KeyboardEvent): void;\n /** Handles click events on the trigger. */\n _handleClick(event: MouseEvent): void;\n /** Handles the cases where the user hovers over the trigger. */\n private _handleHover;\n /** Gets the portal that should be attached to the overlay. */\n private _getPortal;\n}\n/** Directive applied to an element that should trigger a `mat-menu`. */\nexport declare class MatMenuTrigger extends _MatMenuTriggerBase {\n}\n"]}
|