UNPKG

@progress/kendo-angular-menu

Version:

Kendo UI Angular Menu component

31 lines (30 loc) 1.41 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Injectable, EventEmitter } from '@angular/core'; import { hasObservers } from '@progress/kendo-angular-common'; import { inMenu } from '../dom-queries'; import * as i0 from "@angular/core"; /** * @hidden */ export class ContextMenuService { keydown = new EventEmitter(); owner; items; emit(name, args) { this.owner.emitMenuEvent(name, args); } hasObservers(name) { return this.owner && hasObservers(this.owner[name]); } leaveMenu(e) { return this.items ? !inMenu(e.target, this.items) : true; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, decorators: [{ type: Injectable }] });