blob: 21b5e7210144104dc53048a750e1d4fd4b991a46 [file] [log] [blame]
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { EventEmitter, TemplateRef, InjectionToken } from '@angular/core';
import { MenuPositionX, MenuPositionY } from './menu-positions';
import { Direction } from '@angular/cdk/bidi';
import { FocusOrigin } from '@angular/cdk/a11y';
import { MatMenuContent } from './menu-content';
/**
* Injection token used to provide the parent menu to menu-specific components.
* @docs-private
*/
export declare const MAT_MENU_PANEL: InjectionToken<MatMenuPanel<any>>;
/**
* Interface for a custom menu panel that can be used with `matMenuTriggerFor`.
* @docs-private
*/
export interface MatMenuPanel<T = any> {
xPosition: MenuPositionX;
yPosition: MenuPositionY;
overlapTrigger: boolean;
templateRef: TemplateRef<any>;
close: EventEmitter<void | 'click' | 'keydown' | 'tab'>;
parentMenu?: MatMenuPanel | undefined;
direction?: Direction;
focusFirstItem: (origin?: FocusOrigin) => void;
resetActiveItem: () => void;
setPositionClasses?: (x: MenuPositionX, y: MenuPositionY) => void;
setElevation?(depth: number): void;
lazyContent?: MatMenuContent;
backdropClass?: string;
hasBackdrop?: boolean;
/**
* @deprecated To be removed.
* @breaking-change 8.0.0
*/
addItem?: (item: T) => void;
/**
* @deprecated To be removed.
* @breaking-change 8.0.0
*/
removeItem?: (item: T) => void;
}