{"version":3,"file":"menu.js","sources":["../../packages/material/menu/menu-animations.js","../../packages/material/menu/menu-errors.js","../../packages/material/menu/menu-item.js","../../packages/material/menu/menu-directive.js","../../packages/material/menu/menu-trigger.js","../../packages/material/menu/menu-module.js","../../packages/material/menu/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. 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 { trigger, state, style, animate, transition, } from '@angular/animations';\n/**\n * Below are all the animations for the mat-menu component.\n * Animation duration and timing values are based on:\n * https://material.io/guidelines/components/menus.html#menus-usage\n */\n/**\n * This animation controls the menu panel's entry and exit from the page.\n *\n * When the menu panel is added to the DOM, it scales in and fades in its border.\n *\n * When the menu panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n// TODO(kara): switch to :enter and :leave once Mobile Safari is sorted out.\nexport const /** @type {?} */ transformMenu = trigger('transformMenu', [\n state('void', style({\n opacity: 0,\n // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations\n // as of 4.2, which causes the animation to be skipped if it starts from 0.\n transform: 'scale(0.01, 0.01)'\n })),\n state('enter-start', style({\n opacity: 1,\n transform: 'scale(1, 0.5)'\n })),\n state('enter', style({\n transform: 'scale(1, 1)'\n })),\n transition('void => enter-start', animate('100ms linear')),\n transition('enter-start => enter', animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)')),\n transition('* => void', animate('150ms 50ms linear', style({ opacity: 0 })))\n]);\n/**\n * This animation fades in the background color and content of the menu panel\n * after its containing element is scaled in.\n */\nexport const fadeInItems = trigger('fadeInItems', [\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n]);\n//# sourceMappingURL=menu-animations.js.map","/**\n * Throws an exception for the case when menu trigger doesn't have a valid mat-menu instance\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuMissingError() {\n throw Error(`mat-menu-trigger: must pass in an mat-menu instance.\n\n Example:\n \n `);\n}\n/**\n * Throws an exception for the case when menu's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuInvalidPositionX() {\n throw Error(`x-position value must be either 'before' or after'.\n Example: `);\n}\n/**\n * Throws an exception for the case when menu's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuInvalidPositionY() {\n throw Error(`y-position value must be either 'above' or below'.\n Example: `);\n}\n//# sourceMappingURL=menu-errors.js.map","/**\n * @license\n * Copyright Google Inc. 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 { ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, } from '@angular/core';\nimport { mixinDisabled } from '@angular/material/core';\nimport { Subject } from 'rxjs/Subject';\n/**\n * \\@docs-private\n */\nexport class MatMenuItemBase {\n}\nexport const /** @type {?} */ _MatMenuItemMixinBase = mixinDisabled(MatMenuItemBase);\n/**\n * This directive is intended to be used inside an mat-menu tag.\n * It exists mostly to set the role attribute.\n */\nexport class MatMenuItem extends _MatMenuItemMixinBase {\n /**\n * @param {?} _elementRef\n */\n constructor(_elementRef) {\n super();\n this._elementRef = _elementRef;\n /**\n * Stream that emits when the menu item is hovered.\n */\n this.hover = new Subject();\n /**\n * Whether the menu item is highlighted.\n */\n this._highlighted = false;\n /**\n * Whether the menu item acts as a trigger for a sub-menu.\n */\n this._triggersSubmenu = false;\n }\n /**\n * Focuses the menu item.\n * @return {?}\n */\n focus() {\n this._getHostElement().focus();\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.hover.complete();\n }\n /**\n * Used to set the `tabindex`.\n * @return {?}\n */\n _getTabIndex() {\n return this.disabled ? '-1' : '0';\n }\n /**\n * Returns the host DOM element.\n * @return {?}\n */\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n /**\n * Prevents the default element actions if it is disabled.\n * @param {?} event\n * @return {?}\n */\n _checkDisabled(event) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n /**\n * Emits to the hover stream.\n * @return {?}\n */\n _emitHoverEvent() {\n if (!this.disabled) {\n this.hover.next(this);\n }\n }\n /**\n * Gets the label to be used when determining whether the option should be focused.\n * @return {?}\n */\n getLabel() {\n const /** @type {?} */ element = this._elementRef.nativeElement;\n let /** @type {?} */ output = '';\n if (element.childNodes) {\n const /** @type {?} */ length = element.childNodes.length;\n // Go through all the top-level text nodes and extract their text.\n // We skip anything that's not a text node to prevent the text from\n // being thrown off by something like an icon.\n for (let /** @type {?} */ i = 0; i < length; i++) {\n if (element.childNodes[i].nodeType === Node.TEXT_NODE) {\n output += element.childNodes[i].textContent;\n }\n }\n }\n return output.trim();\n }\n}\nMatMenuItem.decorators = [\n { type: Component, args: [{selector: '[mat-menu-item]',\n exportAs: 'matMenuItem',\n inputs: ['disabled'],\n host: {\n 'role': 'menuitem',\n 'class': 'mat-menu-item',\n '[class.mat-menu-item-highlighted]': '_highlighted',\n '[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.disabled]': 'disabled || null',\n '(click)': '_checkDisabled($event)',\n '(mouseenter)': '_emitHoverEvent()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n template: \"
\",\n },] },\n];\n/**\n * @nocollapse\n */\nMatMenuItem.ctorParameters = () => [\n { type: ElementRef, },\n];\nfunction MatMenuItem_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuItem.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuItem.ctorParameters;\n /**\n * Stream that emits when the menu item is hovered.\n * @type {?}\n */\n MatMenuItem.prototype.hover;\n /**\n * Whether the menu item is highlighted.\n * @type {?}\n */\n MatMenuItem.prototype._highlighted;\n /**\n * Whether the menu item acts as a trigger for a sub-menu.\n * @type {?}\n */\n MatMenuItem.prototype._triggersSubmenu;\n /** @type {?} */\n MatMenuItem.prototype._elementRef;\n}\n//# sourceMappingURL=menu-item.js.map","/**\n * @license\n * Copyright Google Inc. 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 { FocusKeyManager } from '@angular/cdk/a11y';\nimport { ESCAPE, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { RxChain, startWith, switchMap, first } from '@angular/cdk/rxjs';\nimport { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Inject, InjectionToken, Input, Output, TemplateRef, ViewChild, ViewEncapsulation, NgZone, } from '@angular/core';\nimport { merge } from 'rxjs/observable/merge';\nimport { Subscription } from 'rxjs/Subscription';\nimport { fadeInItems, transformMenu } from './menu-animations';\nimport { throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY } from './menu-errors';\nimport { MatMenuItem } from './menu-item';\n/**\n * Injection token to be used to override the default options for `mat-menu`.\n */\nexport const MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options');\n/**\n * Start elevation for the menu panel.\n * \\@docs-private\n */\nconst MAT_MENU_BASE_ELEVATION = 2;\nexport class MatMenu {\n /**\n * @param {?} _elementRef\n * @param {?} _ngZone\n * @param {?} _defaultOptions\n */\n constructor(_elementRef, _ngZone, _defaultOptions) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n this._xPosition = this._defaultOptions.xPosition;\n this._yPosition = this._defaultOptions.yPosition;\n /**\n * Subscription to tab events on the menu panel\n */\n this._tabSubscription = Subscription.EMPTY;\n /**\n * Config object to be passed into the menu's ngClass\n */\n this._classList = {};\n /**\n * Current state of the panel animation.\n */\n this._panelAnimationState = 'void';\n /**\n * Whether the menu should overlap its trigger.\n */\n this.overlapTrigger = this._defaultOptions.overlapTrigger;\n /**\n * Event emitted when the menu is closed.\n */\n this.close = new EventEmitter();\n }\n /**\n * Position of the menu in the X axis.\n * @return {?}\n */\n get xPosition() { return this._xPosition; }\n /**\n * @param {?} value\n * @return {?}\n */\n set xPosition(value) {\n if (value !== 'before' && value !== 'after') {\n throwMatMenuInvalidPositionX();\n }\n this._xPosition = value;\n this.setPositionClasses();\n }\n /**\n * Position of the menu in the Y axis.\n * @return {?}\n */\n get yPosition() { return this._yPosition; }\n /**\n * @param {?} value\n * @return {?}\n */\n set yPosition(value) {\n if (value !== 'above' && value !== 'below') {\n throwMatMenuInvalidPositionY();\n }\n this._yPosition = value;\n this.setPositionClasses();\n }\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @param {?} classes list of class names\n * @return {?}\n */\n set classList(classes) {\n if (classes && classes.length) {\n this._classList = classes.split(' ').reduce((obj, className) => {\n obj[className] = true;\n return obj;\n }, {});\n this._elementRef.nativeElement.className = '';\n this.setPositionClasses();\n }\n }\n /**\n * @return {?}\n */\n ngAfterContentInit() {\n this._keyManager = new FocusKeyManager(this.items).withWrap().withTypeAhead();\n this._tabSubscription = this._keyManager.tabOut.subscribe(() => this.close.emit('keydown'));\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this._tabSubscription.unsubscribe();\n this.close.emit();\n this.close.complete();\n }\n /**\n * Stream that emits whenever the hovered menu item changes.\n * @return {?}\n */\n hover() {\n if (this.items) {\n return RxChain.from(this.items.changes)\n .call(startWith, this.items)\n .call(switchMap, (items) => merge(...items.map(item => item.hover)))\n .result();\n }\n return RxChain.from(this._ngZone.onStable.asObservable())\n .call(first)\n .call(switchMap, () => this.hover())\n .result();\n }\n /**\n * Handle a keyboard event from the menu, delegating to the appropriate action.\n * @param {?} event\n * @return {?}\n */\n _handleKeydown(event) {\n switch (event.keyCode) {\n case ESCAPE:\n this.close.emit('keydown');\n event.stopPropagation();\n break;\n case LEFT_ARROW:\n if (this.parentMenu && this.direction === 'ltr') {\n this.close.emit('keydown');\n }\n break;\n case RIGHT_ARROW:\n if (this.parentMenu && this.direction === 'rtl') {\n this.close.emit('keydown');\n }\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n }\n /**\n * Focus the first item in the menu. This method is used by the menu trigger\n * to focus the first item when the menu is opened by the ENTER key.\n * @return {?}\n */\n focusFirstItem() {\n this._keyManager.setFirstItemActive();\n }\n /**\n * It's necessary to set position-based classes to ensure the menu panel animation\n * folds out from the correct direction.\n * @param {?=} posX\n * @param {?=} posY\n * @return {?}\n */\n setPositionClasses(posX = this.xPosition, posY = this.yPosition) {\n this._classList['mat-menu-before'] = posX === 'before';\n this._classList['mat-menu-after'] = posX === 'after';\n this._classList['mat-menu-above'] = posY === 'above';\n this._classList['mat-menu-below'] = posY === 'below';\n }\n /**\n * Sets the menu panel elevation.\n * @param {?} depth Number of parent menus that come before the menu.\n * @return {?}\n */\n setElevation(depth) {\n // The elevation starts at the base and increases by one for each level.\n const /** @type {?} */ newElevation = `mat-elevation-z${MAT_MENU_BASE_ELEVATION + depth}`;\n const /** @type {?} */ customElevation = Object.keys(this._classList).find(c => c.startsWith('mat-elevation-z'));\n if (!customElevation || customElevation === this._previousElevation) {\n if (this._previousElevation) {\n this._classList[this._previousElevation] = false;\n }\n this._classList[newElevation] = true;\n this._previousElevation = newElevation;\n }\n }\n /**\n * Starts the enter animation.\n * @return {?}\n */\n _startAnimation() {\n this._panelAnimationState = 'enter-start';\n }\n /**\n * Resets the panel animation to its initial state.\n * @return {?}\n */\n _resetAnimation() {\n this._panelAnimationState = 'void';\n }\n /**\n * Callback that is invoked when the panel animation completes.\n * @param {?} event\n * @return {?}\n */\n _onAnimationDone(event) {\n // After the initial expansion is done, trigger the second phase of the enter animation.\n if (event.toState === 'enter-start') {\n this._panelAnimationState = 'enter';\n }\n }\n}\nMatMenu.decorators = [\n { type: Component, args: [{selector: 'mat-menu',\n template: \"
\",\n styles: [\".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:left top}.mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:right top}.mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:right top}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:left top}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.ng-animating{pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content{padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item .mat-icon{vertical-align:middle}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:8px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute}\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n animations: [\n transformMenu,\n fadeInItems\n ],\n exportAs: 'matMenu'\n },] },\n];\n/**\n * @nocollapse\n */\nMatMenu.ctorParameters = () => [\n { type: ElementRef, },\n { type: NgZone, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] },] },\n];\nMatMenu.propDecorators = {\n 'xPosition': [{ type: Input },],\n 'yPosition': [{ type: Input },],\n 'templateRef': [{ type: ViewChild, args: [TemplateRef,] },],\n 'items': [{ type: ContentChildren, args: [MatMenuItem,] },],\n 'overlapTrigger': [{ type: Input },],\n 'classList': [{ type: Input, args: ['class',] },],\n 'close': [{ type: Output },],\n};\nfunction MatMenu_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenu.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenu.ctorParameters;\n /** @type {?} */\n MatMenu.propDecorators;\n /** @type {?} */\n MatMenu.prototype._keyManager;\n /** @type {?} */\n MatMenu.prototype._xPosition;\n /** @type {?} */\n MatMenu.prototype._yPosition;\n /** @type {?} */\n MatMenu.prototype._previousElevation;\n /**\n * Subscription to tab events on the menu panel\n * @type {?}\n */\n MatMenu.prototype._tabSubscription;\n /**\n * Config object to be passed into the menu's ngClass\n * @type {?}\n */\n MatMenu.prototype._classList;\n /**\n * Current state of the panel animation.\n * @type {?}\n */\n MatMenu.prototype._panelAnimationState;\n /**\n * Parent menu of the current menu panel.\n * @type {?}\n */\n MatMenu.prototype.parentMenu;\n /**\n * Layout direction of the menu.\n * @type {?}\n */\n MatMenu.prototype.direction;\n /** @type {?} */\n MatMenu.prototype.templateRef;\n /**\n * List of the items inside of a menu.\n * @type {?}\n */\n MatMenu.prototype.items;\n /**\n * Whether the menu should overlap its trigger.\n * @type {?}\n */\n MatMenu.prototype.overlapTrigger;\n /**\n * Event emitted when the menu is closed.\n * @type {?}\n */\n MatMenu.prototype.close;\n /** @type {?} */\n MatMenu.prototype._elementRef;\n /** @type {?} */\n MatMenu.prototype._ngZone;\n /** @type {?} */\n MatMenu.prototype._defaultOptions;\n}\n//# sourceMappingURL=menu-directive.js.map","/**\n * @license\n * Copyright Google Inc. 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 { isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayConfig, } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { filter, RxChain } from '@angular/cdk/rxjs';\nimport { Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, Optional, Output, Self, ViewContainerRef, } from '@angular/core';\nimport { merge } from 'rxjs/observable/merge';\nimport { of as observableOf } from 'rxjs/observable/of';\nimport { Subscription } from 'rxjs/Subscription';\nimport { MatMenu } from './menu-directive';\nimport { throwMatMenuMissingError } from './menu-errors';\nimport { MatMenuItem } from './menu-item';\n/**\n * Injection token that determines the scroll handling while the menu is open.\n */\nexport const MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');\n/**\n * \\@docs-private\n * @param {?} overlay\n * @return {?}\n */\nexport function MAT_MENU_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/**\n * \\@docs-private\n */\nexport const MAT_MENU_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_MENU_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_MENU_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/**\n * Default top padding of the menu panel.\n */\nexport const MENU_PANEL_TOP_PADDING = 8;\n/**\n * This directive is intended to be used in conjunction with an mat-menu tag. It is\n * responsible for toggling the display of the provided menu instance.\n */\nexport class MatMenuTrigger {\n /**\n * @param {?} _overlay\n * @param {?} _element\n * @param {?} _viewContainerRef\n * @param {?} _scrollStrategy\n * @param {?} _parentMenu\n * @param {?} _menuItemInstance\n * @param {?} _dir\n */\n constructor(_overlay, _element, _viewContainerRef, _scrollStrategy, _parentMenu, _menuItemInstance, _dir) {\n this._overlay = _overlay;\n this._element = _element;\n this._viewContainerRef = _viewContainerRef;\n this._scrollStrategy = _scrollStrategy;\n this._parentMenu = _parentMenu;\n this._menuItemInstance = _menuItemInstance;\n this._dir = _dir;\n this._overlayRef = null;\n this._menuOpen = false;\n this._closeSubscription = Subscription.EMPTY;\n this._positionSubscription = Subscription.EMPTY;\n this._hoverSubscription = Subscription.EMPTY;\n this._openedByMouse = false;\n /**\n * Event emitted when the associated menu is opened.\n */\n this.onMenuOpen = new EventEmitter();\n /**\n * Event emitted when the associated menu is closed.\n */\n this.onMenuClose = new EventEmitter();\n if (_menuItemInstance) {\n _menuItemInstance._triggersSubmenu = this.triggersSubmenu();\n }\n }\n /**\n * @deprecated\n * @return {?}\n */\n get _deprecatedMatMenuTriggerFor() {\n return this.menu;\n }\n /**\n * @param {?} v\n * @return {?}\n */\n set _deprecatedMatMenuTriggerFor(v) {\n this.menu = v;\n }\n /**\n * @return {?}\n */\n ngAfterContentInit() {\n this._checkMenu();\n this.menu.close.subscribe(reason => {\n this._destroyMenu();\n // If a click closed the menu, we should close the entire chain of nested menus.\n if (reason === 'click' && this._parentMenu) {\n this._parentMenu.close.emit(reason);\n }\n });\n if (this.triggersSubmenu()) {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n this._hoverSubscription = filter\n .call(this._parentMenu.hover(), active => active === this._menuItemInstance)\n .subscribe(() => {\n this._openedByMouse = true;\n this.openMenu();\n });\n }\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._cleanUpSubscriptions();\n }\n /**\n * Whether the menu is open.\n * @return {?}\n */\n get menuOpen() {\n return this._menuOpen;\n }\n /**\n * The text direction of the containing app.\n * @return {?}\n */\n get dir() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /**\n * Whether the menu triggers a sub-menu or a top-level one.\n * @return {?}\n */\n triggersSubmenu() {\n return !!(this._menuItemInstance && this._parentMenu);\n }\n /**\n * Toggles the menu between the open and closed states.\n * @return {?}\n */\n toggleMenu() {\n return this._menuOpen ? this.closeMenu() : this.openMenu();\n }\n /**\n * Opens the menu.\n * @return {?}\n */\n openMenu() {\n if (!this._menuOpen) {\n this._createOverlay().attach(this._portal);\n this._closeSubscription = this._menuClosingActions().subscribe(() => {\n this.menu.close.emit();\n });\n this._initMenu();\n if (this.menu instanceof MatMenu) {\n this.menu._startAnimation();\n }\n }\n }\n /**\n * Closes the menu.\n * @return {?}\n */\n closeMenu() {\n this.menu.close.emit();\n }\n /**\n * Focuses the menu trigger.\n * @return {?}\n */\n focus() {\n this._element.nativeElement.focus();\n }\n /**\n * Closes the menu and does the necessary cleanup.\n * @return {?}\n */\n _destroyMenu() {\n if (this._overlayRef && this.menuOpen) {\n this._resetMenu();\n this._overlayRef.detach();\n this._closeSubscription.unsubscribe();\n if (this.menu instanceof MatMenu) {\n this.menu._resetAnimation();\n }\n }\n }\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 * @return {?}\n */\n _initMenu() {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this._setIsMenuOpen(true);\n // Should only set focus if opened via the keyboard, so keyboard users can\n // can easily navigate menu items. According to spec, mouse users should not\n // see the focus style.\n if (!this._openedByMouse) {\n this.menu.focusFirstItem();\n }\n }\n /**\n * Updates the menu elevation based on the amount of parent menus that it has.\n * @return {?}\n */\n _setMenuElevation() {\n if (this.menu.setElevation) {\n let /** @type {?} */ depth = 0;\n let /** @type {?} */ parentMenu = this.menu.parentMenu;\n while (parentMenu) {\n depth++;\n parentMenu = parentMenu.parentMenu;\n }\n this.menu.setElevation(depth);\n }\n }\n /**\n * This method resets the menu when it's closed, most importantly restoring\n * focus to the menu trigger if the menu was opened via the keyboard.\n * @return {?}\n */\n _resetMenu() {\n this._setIsMenuOpen(false);\n // Focus only needs to be reset to the host element if the menu was opened\n // by the keyboard and manually shifted to the first menu item.\n if (!this._openedByMouse) {\n this.focus();\n }\n this._openedByMouse = false;\n }\n /**\n * @param {?} isOpen\n * @return {?}\n */\n _setIsMenuOpen(isOpen) {\n this._menuOpen = isOpen;\n this._menuOpen ? this.onMenuOpen.emit() : this.onMenuClose.emit();\n if (this.triggersSubmenu()) {\n this._menuItemInstance._highlighted = isOpen;\n }\n }\n /**\n * This method checks that a valid instance of MatMenu has been passed into\n * matMenuTriggerFor. If not, an exception is thrown.\n * @return {?}\n */\n _checkMenu() {\n if (!this.menu) {\n throwMatMenuMissingError();\n }\n }\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 * @return {?}\n */\n _createOverlay() {\n if (!this._overlayRef) {\n this._portal = new TemplatePortal(this.menu.templateRef, this._viewContainerRef);\n const /** @type {?} */ config = this._getOverlayConfig();\n this._subscribeToPositions(/** @type {?} */ (config.positionStrategy));\n this._overlayRef = this._overlay.create(config);\n }\n return this._overlayRef;\n }\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @return {?} OverlayConfig\n */\n _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getPosition(),\n hasBackdrop: !this.triggersSubmenu(),\n backdropClass: 'cdk-overlay-transparent-backdrop',\n direction: this.dir,\n scrollStrategy: this._scrollStrategy()\n });\n }\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 * @param {?} position\n * @return {?}\n */\n _subscribeToPositions(position) {\n this._positionSubscription = position.onPositionChange.subscribe(change => {\n const /** @type {?} */ posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';\n const /** @type {?} */ posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n this.menu.setPositionClasses(posX, posY);\n });\n }\n /**\n * This method builds the position strategy for the overlay, so the menu is properly connected\n * to the trigger.\n * @return {?} ConnectedPositionStrategy\n */\n _getPosition() {\n let [originX, originFallbackX] = this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];\n let [overlayY, overlayFallbackY] = this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];\n let [originY, originFallbackY] = [overlayY, overlayFallbackY];\n let [overlayX, overlayFallbackX] = [originX, originFallbackX];\n let /** @type {?} */ offsetY = 0;\n if (this.triggersSubmenu()) {\n // When the menu is a sub-menu, it should always align itself\n // to the edges of the trigger, instead of overlapping it.\n overlayFallbackX = originX = this.menu.xPosition === 'before' ? 'start' : 'end';\n originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';\n // TODO(crisbeto): this should be a function, once the overlay supports it.\n // Right now it will be wrong for the fallback positions.\n offsetY = overlayY === 'bottom' ? MENU_PANEL_TOP_PADDING : -MENU_PANEL_TOP_PADDING;\n }\n else if (!this.menu.overlapTrigger) {\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n return this._overlay.position()\n .connectedTo(this._element, { originX, originY }, { overlayX, overlayY })\n .withDirection(this.dir)\n .withOffsetY(offsetY)\n .withFallbackPosition({ originX: originFallbackX, originY }, { overlayX: overlayFallbackX, overlayY })\n .withFallbackPosition({ originX, originY: originFallbackY }, { overlayX, overlayY: overlayFallbackY })\n .withFallbackPosition({ originX: originFallbackX, originY: originFallbackY }, { overlayX: overlayFallbackX, overlayY: overlayFallbackY });\n }\n /**\n * Cleans up the active subscriptions.\n * @return {?}\n */\n _cleanUpSubscriptions() {\n this._closeSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n this._hoverSubscription.unsubscribe();\n }\n /**\n * Returns a stream that emits whenever an action that should close the menu occurs.\n * @return {?}\n */\n _menuClosingActions() {\n const /** @type {?} */ backdrop = ((this._overlayRef)).backdropClick();\n const /** @type {?} */ parentClose = this._parentMenu ? this._parentMenu.close : observableOf();\n const /** @type {?} */ hover = this._parentMenu ? RxChain.from(this._parentMenu.hover())\n .call(filter, active => active !== this._menuItemInstance)\n .call(filter, () => this._menuOpen)\n .result() : observableOf();\n return merge(backdrop, parentClose, hover);\n }\n /**\n * Handles mouse presses on the trigger.\n * @param {?} event\n * @return {?}\n */\n _handleMousedown(event) {\n if (!isFakeMousedownFromScreenReader(event)) {\n this._openedByMouse = true;\n // Since clicking on the trigger won't close the menu if it opens a sub-menu,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the menu item.\n if (this.triggersSubmenu()) {\n event.preventDefault();\n }\n }\n }\n /**\n * Handles key presses on the trigger.\n * @param {?} event\n * @return {?}\n */\n _handleKeydown(event) {\n const /** @type {?} */ keyCode = event.keyCode;\n if (this.triggersSubmenu() && ((keyCode === RIGHT_ARROW && this.dir === 'ltr') ||\n (keyCode === LEFT_ARROW && this.dir === 'rtl'))) {\n this.openMenu();\n }\n }\n /**\n * Handles click events on the trigger.\n * @param {?} event\n * @return {?}\n */\n _handleClick(event) {\n if (this.triggersSubmenu()) {\n // Stop event propagation to avoid closing the parent menu.\n event.stopPropagation();\n this.openMenu();\n }\n else {\n this.toggleMenu();\n }\n }\n}\nMatMenuTrigger.decorators = [\n { type: Directive, args: [{\n selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,\n host: {\n 'aria-haspopup': 'true',\n '(mousedown)': '_handleMousedown($event)',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick($event)',\n },\n exportAs: 'matMenuTrigger'\n },] },\n];\n/**\n * @nocollapse\n */\nMatMenuTrigger.ctorParameters = () => [\n { type: Overlay, },\n { type: ElementRef, },\n { type: ViewContainerRef, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_SCROLL_STRATEGY,] },] },\n { type: MatMenu, decorators: [{ type: Optional },] },\n { type: MatMenuItem, decorators: [{ type: Optional }, { type: Self },] },\n { type: Directionality, decorators: [{ type: Optional },] },\n];\nMatMenuTrigger.propDecorators = {\n '_deprecatedMatMenuTriggerFor': [{ type: Input, args: ['mat-menu-trigger-for',] },],\n 'menu': [{ type: Input, args: ['matMenuTriggerFor',] },],\n 'onMenuOpen': [{ type: Output },],\n 'onMenuClose': [{ type: Output },],\n};\nfunction MatMenuTrigger_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuTrigger.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuTrigger.ctorParameters;\n /** @type {?} */\n MatMenuTrigger.propDecorators;\n /** @type {?} */\n MatMenuTrigger.prototype._portal;\n /** @type {?} */\n MatMenuTrigger.prototype._overlayRef;\n /** @type {?} */\n MatMenuTrigger.prototype._menuOpen;\n /** @type {?} */\n MatMenuTrigger.prototype._closeSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._positionSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._hoverSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._openedByMouse;\n /**\n * References the menu instance that the trigger is associated with.\n * @type {?}\n */\n MatMenuTrigger.prototype.menu;\n /**\n * Event emitted when the associated menu is opened.\n * @type {?}\n */\n MatMenuTrigger.prototype.onMenuOpen;\n /**\n * Event emitted when the associated menu is closed.\n * @type {?}\n */\n MatMenuTrigger.prototype.onMenuClose;\n /** @type {?} */\n MatMenuTrigger.prototype._overlay;\n /** @type {?} */\n MatMenuTrigger.prototype._element;\n /** @type {?} */\n MatMenuTrigger.prototype._viewContainerRef;\n /** @type {?} */\n MatMenuTrigger.prototype._scrollStrategy;\n /** @type {?} */\n MatMenuTrigger.prototype._parentMenu;\n /** @type {?} */\n MatMenuTrigger.prototype._menuItemInstance;\n /** @type {?} */\n MatMenuTrigger.prototype._dir;\n}\n//# sourceMappingURL=menu-trigger.js.map","/**\n * @license\n * Copyright Google Inc. 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 { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCommonModule } from '@angular/material/core';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { MatMenu, MAT_MENU_DEFAULT_OPTIONS } from './menu-directive';\nimport { MatMenuItem } from './menu-item';\nimport { MatMenuTrigger, MAT_MENU_SCROLL_STRATEGY_PROVIDER } from './menu-trigger';\nimport { MatRippleModule } from '@angular/material/core';\nexport class MatMenuModule {\n}\nMatMenuModule.decorators = [\n { type: NgModule, args: [{\n imports: [\n OverlayModule,\n CommonModule,\n MatRippleModule,\n MatCommonModule,\n ],\n exports: [MatMenu, MatMenuItem, MatMenuTrigger, MatCommonModule],\n declarations: [MatMenu, MatMenuItem, MatMenuTrigger],\n providers: [\n MAT_MENU_SCROLL_STRATEGY_PROVIDER,\n {\n provide: MAT_MENU_DEFAULT_OPTIONS,\n useValue: {\n overlapTrigger: true,\n xPosition: 'after',\n yPosition: 'below',\n },\n }\n ],\n },] },\n];\n/**\n * @nocollapse\n */\nMatMenuModule.ctorParameters = () => [];\nfunction MatMenuModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuModule.ctorParameters;\n}\n//# sourceMappingURL=menu-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MAT_MENU_SCROLL_STRATEGY, fadeInItems, transformMenu, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger } from './public-api';\nexport { MatMenuItemBase as ɵa22, _MatMenuItemMixinBase as ɵb22 } from './menu-item';\nex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