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
9.5 KiB
1 lines
9.5 KiB
{"version":3,"file":"menu.d.ts","sources":["menu.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;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 { FocusOrigin } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { AfterContentInit, ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy, TemplateRef, QueryList, OnInit } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { MatMenuContent } from './menu-content';\nimport { MenuPositionX, MenuPositionY } from './menu-positions';\nimport { MatMenuItem } from './menu-item';\nimport { MatMenuPanel } from './menu-panel';\nimport { AnimationEvent } from '@angular/animations';\n/** Default `mat-menu` options that can be overridden. */\nexport interface MatMenuDefaultOptions {\n /** The x-axis position of the menu. */\n xPosition: MenuPositionX;\n /** The y-axis position of the menu. */\n yPosition: MenuPositionY;\n /** Whether the menu should overlap the menu trigger. */\n overlapTrigger: boolean;\n /** Class to be applied to the menu's backdrop. */\n backdropClass: string;\n /** Class or list of classes to be applied to the menu's overlay panel. */\n overlayPanelClass?: string | string[];\n /** Whether the menu has a backdrop. */\n hasBackdrop?: boolean;\n}\n/** Injection token to be used to override the default options for `mat-menu`. */\nexport declare const MAT_MENU_DEFAULT_OPTIONS: InjectionToken<MatMenuDefaultOptions>;\n/** @docs-private */\nexport declare function MAT_MENU_DEFAULT_OPTIONS_FACTORY(): MatMenuDefaultOptions;\n/** Reason why the menu was closed. */\nexport declare type MenuCloseReason = void | 'click' | 'keydown' | 'tab';\n/** Base class with all of the `MatMenu` functionality. */\nexport declare class _MatMenuBase implements AfterContentInit, MatMenuPanel<MatMenuItem>, OnInit, OnDestroy {\n private _elementRef;\n private _ngZone;\n private _defaultOptions;\n private _keyManager;\n private _xPosition;\n private _yPosition;\n private _previousElevation;\n protected _elevationPrefix: string;\n protected _baseElevation: number;\n /** All items inside the menu. Includes items nested inside another menu. */\n _allItems: QueryList<MatMenuItem>;\n /** Only the direct descendant menu items. */\n private _directDescendantItems;\n /** Subscription to tab events on the menu panel */\n private _tabSubscription;\n /** Config object to be passed into the menu's ngClass */\n _classList: {\n [key: string]: boolean;\n };\n /** Current state of the panel animation. */\n _panelAnimationState: 'void' | 'enter';\n /** Emits whenever an animation on the menu completes. */\n readonly _animationDone: Subject<AnimationEvent>;\n /** Whether the menu is animating. */\n _isAnimating: boolean;\n /** Parent menu of the current menu panel. */\n parentMenu: MatMenuPanel | undefined;\n /** Layout direction of the menu. */\n direction: Direction;\n /** Class or list of classes to be added to the overlay panel. */\n overlayPanelClass: string | string[];\n /** Class to be added to the backdrop element. */\n backdropClass: string;\n /** aria-label for the menu panel. */\n ariaLabel: string;\n /** aria-labelledby for the menu panel. */\n ariaLabelledby: string;\n /** aria-describedby for the menu panel. */\n ariaDescribedby: string;\n /** Position of the menu in the X axis. */\n get xPosition(): MenuPositionX;\n set xPosition(value: MenuPositionX);\n /** Position of the menu in the Y axis. */\n get yPosition(): MenuPositionY;\n set yPosition(value: MenuPositionY);\n /** @docs-private */\n templateRef: TemplateRef<any>;\n /**\n * List of the items inside of a menu.\n * @deprecated\n * @breaking-change 8.0.0\n */\n items: QueryList<MatMenuItem>;\n /**\n * Menu content that will be rendered lazily.\n * @docs-private\n */\n lazyContent: MatMenuContent;\n /** Whether the menu should overlap its trigger. */\n get overlapTrigger(): boolean;\n set overlapTrigger(value: boolean);\n private _overlapTrigger;\n /** Whether the menu has a backdrop. */\n get hasBackdrop(): boolean | undefined;\n set hasBackdrop(value: boolean | undefined);\n private _hasBackdrop;\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 */\n set panelClass(classes: string);\n private _previousPanelClass;\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 * @deprecated Use `panelClass` instead.\n * @breaking-change 8.0.0\n */\n get classList(): string;\n set classList(classes: string);\n /** Event emitted when the menu is closed. */\n readonly closed: EventEmitter<MenuCloseReason>;\n /**\n * Event emitted when the menu is closed.\n * @deprecated Switch to `closed` instead\n * @breaking-change 8.0.0\n */\n readonly close: EventEmitter<MenuCloseReason>;\n readonly panelId: string;\n constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _defaultOptions: MatMenuDefaultOptions);\n ngOnInit(): void;\n ngAfterContentInit(): void;\n ngOnDestroy(): void;\n /** Stream that emits whenever the hovered menu item changes. */\n _hovered(): Observable<MatMenuItem>;\n addItem(_item: MatMenuItem): void;\n /**\n * Removes an item from the menu.\n * @docs-private\n * @deprecated No longer being used. To be removed.\n * @breaking-change 9.0.0\n */\n removeItem(_item: MatMenuItem): void;\n /** Handle a keyboard event from the menu, delegating to the appropriate action. */\n _handleKeydown(event: KeyboardEvent): void;\n /**\n * Focus the first item in the menu.\n * @param origin Action from which the focus originated. Used to set the correct styling.\n */\n focusFirstItem(origin?: FocusOrigin): void;\n /**\n * Actual implementation that focuses the first item. Needs to be separated\n * out so we don't repeat the same logic in the public `focusFirstItem` method.\n */\n private _focusFirstItem;\n /**\n * Resets the active item in the menu. This is used when the menu is opened, allowing\n * the user to start from the first option when pressing the down arrow.\n */\n resetActiveItem(): void;\n /**\n * Sets the menu panel elevation.\n * @param depth Number of parent menus that come before the menu.\n */\n setElevation(depth: number): void;\n /**\n * Adds classes to the menu panel based on its position. Can be used by\n * consumers to add specific styling based on the position.\n * @param posX Position of the menu along the x axis.\n * @param posY Position of the menu along the y axis.\n * @docs-private\n */\n setPositionClasses(posX?: MenuPositionX, posY?: MenuPositionY): void;\n /** Starts the enter animation. */\n _startAnimation(): void;\n /** Resets the panel animation to its initial state. */\n _resetAnimation(): void;\n /** Callback that is invoked when the panel animation completes. */\n _onAnimationDone(event: AnimationEvent): void;\n _onAnimationStart(event: AnimationEvent): void;\n /**\n * Sets up a stream that will keep track of any newly-added menu items and will update the list\n * of direct descendants. We collect the descendants this way, because `_allItems` can include\n * items that are part of child menus, and using a custom way of registering items is unreliable\n * when it comes to maintaining the item order.\n */\n private _updateDirectDescendants;\n static ngAcceptInputType_overlapTrigger: BooleanInput;\n static ngAcceptInputType_hasBackdrop: BooleanInput;\n}\n/** @docs-public MatMenu */\nexport declare class MatMenu extends _MatMenuBase {\n protected _elevationPrefix: string;\n protected _baseElevation: number;\n constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone, defaultOptions: MatMenuDefaultOptions);\n}\n"]}
|