[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { EventEmitter, TemplateRef, InjectionToken } from '@angular/core';
|
---|
| 9 | import { MenuPositionX, MenuPositionY } from './menu-positions';
|
---|
| 10 | import { Direction } from '@angular/cdk/bidi';
|
---|
| 11 | import { FocusOrigin } from '@angular/cdk/a11y';
|
---|
| 12 | import { MatMenuContent } from './menu-content';
|
---|
| 13 | /**
|
---|
| 14 | * Injection token used to provide the parent menu to menu-specific components.
|
---|
| 15 | * @docs-private
|
---|
| 16 | */
|
---|
| 17 | export declare const MAT_MENU_PANEL: InjectionToken<MatMenuPanel<any>>;
|
---|
| 18 | /**
|
---|
| 19 | * Interface for a custom menu panel that can be used with `matMenuTriggerFor`.
|
---|
| 20 | * @docs-private
|
---|
| 21 | */
|
---|
| 22 | export interface MatMenuPanel<T = any> {
|
---|
| 23 | xPosition: MenuPositionX;
|
---|
| 24 | yPosition: MenuPositionY;
|
---|
| 25 | overlapTrigger: boolean;
|
---|
| 26 | templateRef: TemplateRef<any>;
|
---|
| 27 | readonly close: EventEmitter<void | 'click' | 'keydown' | 'tab'>;
|
---|
| 28 | parentMenu?: MatMenuPanel | undefined;
|
---|
| 29 | direction?: Direction;
|
---|
| 30 | focusFirstItem: (origin?: FocusOrigin) => void;
|
---|
| 31 | resetActiveItem: () => void;
|
---|
| 32 | setPositionClasses?: (x: MenuPositionX, y: MenuPositionY) => void;
|
---|
| 33 | setElevation?(depth: number): void;
|
---|
| 34 | lazyContent?: MatMenuContent;
|
---|
| 35 | backdropClass?: string;
|
---|
| 36 | overlayPanelClass?: string | string[];
|
---|
| 37 | hasBackdrop?: boolean;
|
---|
| 38 | readonly panelId?: string;
|
---|
| 39 | /**
|
---|
| 40 | * @deprecated To be removed.
|
---|
| 41 | * @breaking-change 8.0.0
|
---|
| 42 | */
|
---|
| 43 | addItem?: (item: T) => void;
|
---|
| 44 | /**
|
---|
| 45 | * @deprecated To be removed.
|
---|
| 46 | * @breaking-change 8.0.0
|
---|
| 47 | */
|
---|
| 48 | removeItem?: (item: T) => void;
|
---|
| 49 | }
|
---|