/*! * devextreme-angular * Version: 25.2.6 * Build date: Mon Mar 30 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/DevExtreme */ import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core'; import DataSource from 'devextreme/data/data_source'; import { AnimationConfig, PositionConfig } from 'devextreme/common/core/animation'; import { dxContextMenuItem, ContentReadyEvent, DisposingEvent, HiddenEvent, HidingEvent, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemRenderedEvent, OptionChangedEvent, PositioningEvent, SelectionChangedEvent, ShowingEvent, ShownEvent, ContextSubmenuDirection } from 'devextreme/ui/context_menu'; import { DataSourceOptions } from 'devextreme/data/data_source'; import { Store } from 'devextreme/data/store'; import { event } from 'devextreme/events/events.types'; import { SingleOrNone, SubmenuShowMode } from 'devextreme/common'; import DxContextMenu from 'devextreme/ui/context_menu'; import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper, CollectionNestedOption } from 'devextreme-angular/core'; import type * as DxContextMenuTypes from "devextreme/ui/context_menu_types"; import * as i0 from "@angular/core"; import * as i1 from "devextreme-angular/ui/nested"; import * as i2 from "devextreme-angular/ui/context-menu/nested"; import * as i3 from "devextreme-angular/core"; export { ExplicitTypes } from 'devextreme/ui/context_menu'; /** * The ContextMenu UI component displays a single- or multi-level context menu. An end user invokes this menu by a right click or a long press. */ export declare class DxContextMenuComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck { private _watcherHelper; private _idh; set _itemsContentChildren(value: QueryList); instance: DxContextMenu; /** * Specifies the shortcut key that sets focus on the UI component. */ get accessKey(): string | undefined; set accessKey(value: string | undefined); /** * Specifies whether the UI component changes its visual state as a result of user interaction. */ get activeStateEnabled(): boolean; set activeStateEnabled(value: boolean); /** * Configures UI component visibility animations. This object contains two fields: show and hide. */ get animation(): { hide?: AnimationConfig; show?: AnimationConfig; }; set animation(value: { hide?: AnimationConfig; show?: AnimationConfig; }); /** * Specifies the name of the CSS class to be applied to the root menu level and all submenus. */ get cssClass(): string; set cssClass(value: string); /** * Binds the UI component to data. */ get dataSource(): Array | DataSource | DataSourceOptions | null | Store | string; set dataSource(value: Array | DataSource | DataSourceOptions | null | Store | string); /** * Specifies whether the UI component responds to user interaction. */ get disabled(): boolean; set disabled(value: boolean); /** * Specifies the name of the data source item field whose value defines whether or not the corresponding UI component item is disabled. */ get disabledExpr(): Function | string; set disabledExpr(value: Function | string); /** * Specifies the data field whose values should be displayed. */ get displayExpr(): ((item: any) => string) | string; set displayExpr(value: ((item: any) => string) | string); /** * Specifies the global attributes to be attached to the UI component's container element. */ get elementAttr(): Record; set elementAttr(value: Record); /** * Specifies whether the UI component can be focused using keyboard navigation. */ get focusStateEnabled(): boolean; set focusStateEnabled(value: boolean); /** * Specifies the UI component's height. */ get height(): number | string | undefined; set height(value: number | string | undefined); /** * Specifies whether to hide the UI component if a user clicks outside it. */ get hideOnOutsideClick(): boolean | ((event: event) => boolean); set hideOnOutsideClick(value: boolean | ((event: event) => boolean)); /** * Specifies text for a hint that appears when a user pauses on the UI component. */ get hint(): string | undefined; set hint(value: string | undefined); /** * Specifies whether the UI component changes its state when a user pauses on it. */ get hoverStateEnabled(): boolean; set hoverStateEnabled(value: boolean); /** * Holds an array of menu items. */ get items(): Array; set items(value: Array); /** * Specifies which data field contains nested items. */ get itemsExpr(): Function | string; set itemsExpr(value: Function | string); /** * Specifies a custom template for items. */ get itemTemplate(): any; set itemTemplate(value: any); /** * An object defining UI component positioning properties. */ get position(): PositionConfig; set position(value: PositionConfig); /** * Switches the UI component to a right-to-left representation. */ get rtlEnabled(): boolean; set rtlEnabled(value: boolean); /** * Specifies whether an item is selected if a user clicks it. */ get selectByClick(): boolean; set selectByClick(value: boolean); /** * Specifies the name of the data source item field whose value defines whether or not the corresponding UI component items is selected. */ get selectedExpr(): Function | string; set selectedExpr(value: Function | string); /** * The selected item object. */ get selectedItem(): any; set selectedItem(value: any); /** * Specifies the selection mode supported by the menu. */ get selectionMode(): SingleOrNone; set selectionMode(value: SingleOrNone); /** * Specifies properties used to display the UI component. */ get showEvent(): string | { delay?: number | undefined; name?: string | undefined; }; set showEvent(value: string | { delay?: number | undefined; name?: string | undefined; }); /** * Specifies properties of submenu showing and hiding. */ get showSubmenuMode(): SubmenuShowMode | { delay?: number | { hide?: number; show?: number; }; name?: SubmenuShowMode; }; set showSubmenuMode(value: SubmenuShowMode | { delay?: number | { hide?: number; show?: number; }; name?: SubmenuShowMode; }); /** * Specifies the direction at which submenus are displayed. */ get submenuDirection(): ContextSubmenuDirection; set submenuDirection(value: ContextSubmenuDirection); /** * Specifies the number of the element when the Tab key is used for navigating. */ get tabIndex(): number; set tabIndex(value: number); /** * The target element associated with the context menu. */ get target(): any | string | undefined; set target(value: any | string | undefined); /** * A Boolean value specifying whether or not the UI component is visible. */ get visible(): boolean; set visible(value: boolean); /** * Specifies the UI component's width. */ get width(): number | string | undefined; set width(value: number | string | undefined); /** * A function that is executed when the UI component is rendered and each time the component is repainted. */ onContentReady: EventEmitter; /** * A function that is executed before the UI component is disposed of. */ onDisposing: EventEmitter; /** * A function that is executed after the ContextMenu is hidden. */ onHidden: EventEmitter; /** * A function that is executed before the ContextMenu is hidden. */ onHiding: EventEmitter; /** * A function used in JavaScript frameworks to save the UI component instance. */ onInitialized: EventEmitter; /** * A function that is executed when a collection item is clicked or tapped. */ onItemClick: EventEmitter; /** * A function that is executed when a collection item is right-clicked or pressed. */ onItemContextMenu: EventEmitter; /** * A function that is executed after a collection item is rendered. */ onItemRendered: EventEmitter; /** * A function that is executed after a UI component property is changed. */ onOptionChanged: EventEmitter; /** * A function that is executed before the ContextMenu is positioned. */ onPositioning: EventEmitter; /** * A function that is executed when a collection item is selected or selection is canceled. */ onSelectionChanged: EventEmitter; /** * A function that is executed before the ContextMenu is shown. */ onShowing: EventEmitter; /** * A function that is executed after the ContextMenu is shown. */ onShown: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ accessKeyChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ activeStateEnabledChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ animationChange: EventEmitter<{ hide?: AnimationConfig; show?: AnimationConfig; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ cssClassChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataSourceChange: EventEmitter | DataSource | DataSourceOptions | null | Store | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ disabledChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ disabledExprChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ displayExprChange: EventEmitter<((item: any) => string) | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ elementAttrChange: EventEmitter>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ focusStateEnabledChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ heightChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hideOnOutsideClickChange: EventEmitter boolean)>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hintChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hoverStateEnabledChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemsChange: EventEmitter>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemsExprChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemTemplateChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ positionChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ rtlEnabledChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectByClickChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedExprChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedItemChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectionModeChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showEventChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showSubmenuModeChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ submenuDirectionChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ tabIndexChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ targetChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ visibleChange: EventEmitter; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ widthChange: EventEmitter; constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any); protected _createInstance(element: any, options: any): DxContextMenu; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; setupChanges(prop: string, changes: SimpleChanges): void; ngDoCheck(): void; _setOption(name: string, value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "dx-context-menu", never, { "accessKey": { "alias": "accessKey"; "required": false; }; "activeStateEnabled": { "alias": "activeStateEnabled"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disabledExpr": { "alias": "disabledExpr"; "required": false; }; "displayExpr": { "alias": "displayExpr"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "focusStateEnabled": { "alias": "focusStateEnabled"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hideOnOutsideClick": { "alias": "hideOnOutsideClick"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; }; "items": { "alias": "items"; "required": false; }; "itemsExpr": { "alias": "itemsExpr"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "position": { "alias": "position"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "selectByClick": { "alias": "selectByClick"; "required": false; }; "selectedExpr": { "alias": "selectedExpr"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "showEvent": { "alias": "showEvent"; "required": false; }; "showSubmenuMode": { "alias": "showSubmenuMode"; "required": false; }; "submenuDirection": { "alias": "submenuDirection"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "target": { "alias": "target"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "onContentReady": "onContentReady"; "onDisposing": "onDisposing"; "onHidden": "onHidden"; "onHiding": "onHiding"; "onInitialized": "onInitialized"; "onItemClick": "onItemClick"; "onItemContextMenu": "onItemContextMenu"; "onItemRendered": "onItemRendered"; "onOptionChanged": "onOptionChanged"; "onPositioning": "onPositioning"; "onSelectionChanged": "onSelectionChanged"; "onShowing": "onShowing"; "onShown": "onShown"; "accessKeyChange": "accessKeyChange"; "activeStateEnabledChange": "activeStateEnabledChange"; "animationChange": "animationChange"; "cssClassChange": "cssClassChange"; "dataSourceChange": "dataSourceChange"; "disabledChange": "disabledChange"; "disabledExprChange": "disabledExprChange"; "displayExprChange": "displayExprChange"; "elementAttrChange": "elementAttrChange"; "focusStateEnabledChange": "focusStateEnabledChange"; "heightChange": "heightChange"; "hideOnOutsideClickChange": "hideOnOutsideClickChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "itemsChange": "itemsChange"; "itemsExprChange": "itemsExprChange"; "itemTemplateChange": "itemTemplateChange"; "positionChange": "positionChange"; "rtlEnabledChange": "rtlEnabledChange"; "selectByClickChange": "selectByClickChange"; "selectedExprChange": "selectedExprChange"; "selectedItemChange": "selectedItemChange"; "selectionModeChange": "selectionModeChange"; "showEventChange": "showEventChange"; "showSubmenuModeChange": "showSubmenuModeChange"; "submenuDirectionChange": "submenuDirectionChange"; "tabIndexChange": "tabIndexChange"; "targetChange": "targetChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; }, ["_itemsContentChildren"], never, true, never>; } export declare class DxContextMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export * from 'devextreme-angular/ui/context-menu/nested'; export { DxContextMenuTypes };