/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { OnInit, OnChanges, OnDestroy, EventEmitter, NgZone, Renderer2, TemplateRef, ElementRef, ViewContainerRef } from '@angular/core'; import { PopupService, Offset, Align, Collision, PopupAnimation } from '@progress/kendo-angular-popup'; import { MenuBase } from '../menu-base'; import { ContextMenuEvent } from './context-menu-event'; import { ContextMenuSelectEvent } from './context-menu-select-event'; import { ContextMenuPopupEvent } from './context-menu-popup-event'; import { ContextMenuService } from './context-menu.service'; import { ContextMenuTemplateDirective } from './context-menu-template.directive'; import { ContextMenuTargetContainerDirective } from './context-menu-target-container.directive'; import * as i0 from "@angular/core"; /** * Represents the [Kendo UI ContextMenu component for Angular](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu). * * @example * ```ts * _@Component({ * selector: 'my-app', * template: ` *
* Right-click to open Context menu

*
* * ` * }) * class AppComponent { * public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }]; * } * ``` */ export declare class ContextMenuComponent extends MenuBase implements OnInit, OnChanges, OnDestroy { private popupService; private service; private ngZone; private renderer; /** * Specifies the event on which the ContextMenu will open ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/opening)). * Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc. * * @default 'contextmenu' */ showOn: string; /** * Specifies the element for which the ContextMenu will open ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#configuration)). */ target: HTMLElement | ElementRef | ContextMenuTargetContainerDirective | string; /** * Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open * ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#changing-items-for-specific-targets)). */ filter: string; /** * Specifies if the ContextMenu will be aligned to the target or to the `filter` element (if specified). * * @default false */ alignToAnchor: boolean; /** * Specifies if the Menu will be vertically rendered ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/orientation)). * * @default true */ vertical: boolean; /** * Specifies the popup animation. * * @default true */ popupAnimate: boolean | PopupAnimation; /** * Specifies the pivot point of the popup. * * @default { horizontal: 'left', vertical: 'top' } */ popupAlign: Align; /** * Specifies the pivot point of the anchor. Applicable if `alignToAnchor` is `true`. * * @default { horizontal: 'left', vertical: 'bottom' } */ anchorAlign: Align; /** * Configures the collision behavior of the popup. * * @default { horizontal: 'fit', vertical: 'flip' } */ collision: Collision; /** * Defines the container to which the popups will be appended. */ appendTo: ViewContainerRef; /** * Sets the value for the [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) attribute of the ContextMenu. * * @remarks * This property is related to accessibility. */ ariaLabel: string; /** * Fires when the Menu is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)). */ popupOpen: EventEmitter; /** * Fires when the Menu is closed ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)). */ popupClose: EventEmitter; /** * Fires when a Menu item is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)). */ select: EventEmitter; /** * Fires when a Menu item is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)). */ open: EventEmitter; /** * Fires when a Menu item is closed ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)). */ close: EventEmitter; /** * @hidden */ contentTemplate: ContextMenuTemplateDirective; /** * @hidden */ defaultContentTemplate: TemplateRef; private closeSubscription; private showSubscription; private keydownSubscription; private popupSubscriptions; private popupRef; private currentTarget; private directiveTarget; private activeTarget; constructor(popupService: PopupService, service: ContextMenuService, ngZone: NgZone, renderer: Renderer2); /** * Hides the ContextMenu. */ hide(): void; /** * Shows the ContextMenu for the specified target. * * @param target - The offset or the target element for which the ContextMenu will open. */ show(target: Offset | HTMLElement | ElementRef): void; ngOnChanges(changes: any): void; ngOnInit(): void; ngOnDestroy(): void; /** * @hidden */ emitMenuEvent(name: string, args: any): void; private bindShowHandler; private showContextMenu; private unbindShowHandler; private targetElement; private targetFilter; private closePopup; private removePopup; private openPopup; private createPopup; private closeAndFocus; private popupKeyDownHandler; private popupAction; private get currentTargetElement(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }