import { ContextMenuPassThrough, ContextMenuItemTemplateContext, ContextMenuSubmenuIconTemplateContext } from 'primeng/types/contextmenu'; export * from 'primeng/types/contextmenu'; import * as _angular_core from '@angular/core'; import { AfterViewChecked, ElementRef, Renderer2, EventEmitter, TemplateRef, QueryList } from '@angular/core'; import { MotionOptions, MotionEvent } from '@primeuix/motion'; import * as i1 from 'primeng/api'; import { OverlayService, MenuItem, PrimeTemplate } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { VoidListener } from 'primeng/ts-helpers'; import * as _primeuix_styled from '@primeuix/styled'; import { BaseStyle } from 'primeng/base'; /** * * ContextMenu displays an overlay menu on right click of its target. Note that components like DataTable has special integration with ContextMenu. * Refer to documentation of the individual documentation of the with context menu support. * * [Live Demo](https://www.primeng.org/contextmenu/) * * @module contextmenustyle * */ declare enum ContextMenuClasses { /** * Class name of the root element */ root = "p-contextmenu", /** * Class name of the root list element */ rootList = "p-contextmenu-root-list", /** * Class name of the item element */ item = "p-contextmenu-item", /** * Class name of the item content element */ itemContent = "p-contextmenu-item-content", /** * Class name of the item link element */ itemLink = "p-contextmenu-item-link", /** * Class name of the item icon element */ itemIcon = "p-contextmenu-item-icon", /** * Class name of the item label element */ itemLabel = "p-contextmenu-item-label", /** * Class name of the submenu icon element */ submenuIcon = "p-contextmenu-submenu-icon", /** * Class name of the submenu element */ submenu = "p-contextmenu-submenu", /** * Class name of the separator element */ separator = "p-contextmenu-separator" } declare class ContextMenuStyle extends BaseStyle { name: string; style: _primeuix_styled.StyleType; classes: { root: () => string[]; rootList: string; item: ({ instance, processedItem }: { instance: any; processedItem: any; }) => (string | { 'p-contextmenu-item-active': any; 'p-focus': any; 'p-disabled': any; 'p-contextmenu-mobile': any; })[]; itemContent: string; itemLink: string; itemIcon: string; itemLabel: string; submenuIcon: string; submenu: string; separator: string; }; inlineStyles: { root: { position: string; }; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } interface ContextMenuStyle extends BaseStyle { } declare class ContextMenuSub extends BaseComponent implements AfterViewChecked { el: ElementRef; renderer: Renderer2; contextMenu: ContextMenu; get visible(): boolean; set visible(value: boolean); items: any[]; itemTemplate: TemplateRef | undefined; root: boolean | undefined; autoZIndex: boolean; baseZIndex: number; popup: boolean | undefined; menuId: string | undefined; ariaLabel: string | undefined; ariaLabelledBy: string | undefined; level: number; focusedItemId: string | undefined; activeItemPath: any[]; motionOptions: MotionOptions[] | undefined; tabindex: number; itemClick: EventEmitter; itemMouseEnter: EventEmitter; menuFocus: EventEmitter; menuBlur: EventEmitter; menuKeydown: EventEmitter; sublistViewChild: ElementRef; render: _angular_core.WritableSignal; hostName: string; _componentStyle: ContextMenuStyle; $pcContextMenu: ContextMenu | undefined; $pcContextMenuSub: ContextMenuSub | undefined; _visible: boolean; constructor(el: ElementRef, renderer: Renderer2, contextMenu: ContextMenu); getItemProp(processedItem: any, name: string, params?: any | null): any; getItemId(processedItem: any): string; getItemKey(processedItem: any): string; getItemLabel(processedItem: any): string; getAriaSetSize(): number; getAriaPosInset(index: number): number; isItemVisible(processedItem: any): boolean; isItemActive(processedItem: any): boolean | undefined; isItemDisabled(processedItem: any): boolean | undefined; isItemFocused(processedItem: any): boolean; isItemGroup(processedItem: any): boolean; onItemMouseEnter(param: any): void; onItemClick(event: any, processedItem: any): void; onBeforeEnter(event: MotionEvent): void; onAfterLeave(): void; _ptm(section: string, options?: any): any; getPTOptions(processedItem: any, index: number, key: string): any; position(sublist: any): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; static ngAcceptInputType_root: unknown; static ngAcceptInputType_autoZIndex: unknown; static ngAcceptInputType_baseZIndex: unknown; static ngAcceptInputType_popup: unknown; static ngAcceptInputType_level: unknown; static ngAcceptInputType_tabindex: unknown; } /** * ContextMenu displays an overlay menu on right click of its target. Note that components like Table has special integration with ContextMenu. * @group Components */ declare class ContextMenu extends BaseComponent { overlayService: OverlayService; /** * An array of menuitems. * @group Props */ set model(value: MenuItem[] | undefined); get model(): MenuItem[] | undefined; /** * Event for which the menu must be displayed. * @group Props */ triggerEvent: string; /** * Local template variable name of the element to attach the context menu. * @group Props */ target: HTMLElement | string | null | undefined; /** * Attaches the menu to document instead of a particular item. * @group Props */ global: boolean; /** * Inline style of the component. * @group Props */ style: { [klass: string]: any; } | null | undefined; /** * Style class of the component. * @group Props */ styleClass: string | undefined; /** * Whether to automatically manage layering. * @group Props */ autoZIndex: boolean; /** * Base zIndex value to use in layering. * @group Props */ baseZIndex: number; /** * Current id state as a string. * @group Props */ id: string | undefined; /** * The breakpoint to define the maximum width boundary. * @group Props */ breakpoint: string; /** * Defines a string value that labels an interactive element. * @group Props */ ariaLabel: string | undefined; /** * Identifier of the underlying input element. * @group Props */ ariaLabelledBy: string | undefined; /** * Press delay in touch devices as miliseconds. * @group Props */ pressDelay: number | undefined; /** * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). * @defaultValue 'self' * @group Props */ appendTo: _angular_core.InputSignal; /** * The motion options. * @group Props */ motionOptions: _angular_core.InputSignal; computedMotionOptions: _angular_core.Signal; /** * Callback to invoke when overlay menu is shown. * @group Emits */ onShow: EventEmitter; /** * Callback to invoke when overlay menu is hidden. * @group Emits */ onHide: EventEmitter; rootmenu: ContextMenuSub | undefined; container: HTMLElement | null | undefined; handleSubmenuAfterLeave: (() => void) | null; outsideClickListener: VoidListener; resizeListener: VoidListener; triggerEventListener: VoidListener; documentClickListener: VoidListener; documentTriggerListener: VoidListener; touchEndListener: VoidListener; pageX: number; pageY: number; visible: _angular_core.WritableSignal; render: _angular_core.WritableSignal; focused: boolean; activeItemPath: _angular_core.WritableSignal; focusedItemInfo: _angular_core.WritableSignal; submenuVisible: _angular_core.WritableSignal; $appendTo: _angular_core.Signal; searchValue: string; searchTimeout: any; _processedItems: any[]; _model: MenuItem[] | undefined; pressTimer: any; hideCallback: any; private matchMediaListener; private query; queryMatches: _angular_core.WritableSignal; _componentStyle: ContextMenuStyle; get visibleItems(): any; get processedItems(): any[]; get focusedItemId(): any; constructor(overlayService: OverlayService); onInit(): void; isMobile(): boolean; bindTriggerEventListener(): void; bindGlobalListeners(): void; /** * Custom item template. * @group Templates */ itemTemplate: TemplateRef | undefined; /** * Custom submenu icon template. * @group Templates */ submenuIconTemplate: TemplateRef | undefined; templates: QueryList | undefined; _submenuIconTemplate: TemplateRef | undefined; _itemTemplate: TemplateRef | undefined; onAfterContentInit(): void; getPTOptions(key: string, item: any, index: number, id: string): any; isItemFocused(itemInfo: any): boolean; createProcessedItems(items: any, level?: number, parent?: any, parentKey?: any): any[]; bindMatchMediaListener(): void; unbindMatchMediaListener(): void; getItemProp(item: any, name: string): any; getProccessedItemLabel(processedItem: any): any; getItemLabel(item: any): any; isProcessedItemGroup(processedItem: any): boolean; isSelected(processedItem: any): boolean; isValidSelectedItem(processedItem: any): boolean; isValidItem(processedItem: any): boolean; isItemDisabled(item: any): boolean; isItemSeparator(item: any): boolean; isItemMatched(processedItem: any): boolean; isProccessedItemGroup(processedItem: any): boolean; onItemClick(event: any): void; onItemMouseEnter(event: any): void; onKeyDown(event: KeyboardEvent): void; onArrowDownKey(event: KeyboardEvent): void; onArrowRightKey(event: KeyboardEvent): void; onArrowUpKey(event: KeyboardEvent): void; onArrowLeftKey(event: KeyboardEvent): void; onHomeKey(event: KeyboardEvent): void; onEndKey(event: KeyboardEvent): void; onSpaceKey(event: KeyboardEvent): void; onEscapeKey(event: KeyboardEvent): void; onTabKey(event: KeyboardEvent): void; onEnterKey(event: KeyboardEvent): void; onItemChange(event: any, type?: string | undefined): void; onMenuFocus(event: any): void; onMenuBlur(event: any): void; onBeforeEnter(event: MotionEvent): void; onAfterEnter(): void; onAfterLeave(): void; appendOverlay(): void; restoreOverlayAppend(): void; moveOnTop(): void; onOverlayHide(): void; onTouchStart(event: MouseEvent): void; onTouchEnd(): void; hide(): void; toggle(event?: any): void; show(event: any): void; position(): void; searchItems(event: any, char: string): boolean; findVisibleItem(index: any): any; findLastFocusedItemIndex(): any; findLastItemIndex(): number; findPrevItemIndex(index: number): number; findNextItemIndex(index: number): any; findFirstFocusedItemIndex(): any; findFirstItemIndex(): any; findSelectedItemIndex(): any; changeFocusedItemIndex(event: any, index: number): void; scrollInView(index?: number): void; bindResizeListener(): void; isOutsideClicked(event: Event): boolean; unbindResizeListener(): void; unbindGlobalListeners(): void; unbindTriggerEventListener(): void; onDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; static ngAcceptInputType_global: unknown; static ngAcceptInputType_autoZIndex: unknown; static ngAcceptInputType_baseZIndex: unknown; static ngAcceptInputType_pressDelay: unknown; } declare class ContextMenuModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { ContextMenu, ContextMenuClasses, ContextMenuModule, ContextMenuStyle, ContextMenuSub };