UNPKG

@xui/components

Version:

xUI Components for Angular

24 lines 2.95 kB
import { Directive, ElementRef, input } from '@angular/core'; import * as i0 from "@angular/core"; export class XuiMenuTriggerFor { constructor(elementRef) { this.elementRef = elementRef; this.menu = input.required({ alias: 'xuiMenuTriggerFor' }); } _click() { this.menu().open(this.elementRef); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XuiMenuTriggerFor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.1", type: XuiMenuTriggerFor, selector: "[xuiMenuTriggerFor]", inputs: { menu: { classPropertyName: "menu", publicName: "xuiMenuTriggerFor", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "_click($event)" } }, exportAs: ["xuiMenuTriggerFor"], ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XuiMenuTriggerFor, decorators: [{ type: Directive, args: [{ selector: '[xuiMenuTriggerFor]', exportAs: 'xuiMenuTriggerFor', host: { '(click)': '_click($event)' } }] }], ctorParameters: () => [{ type: i0.ElementRef }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS10cmlnZ2VyLWZvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMveHVpL3NyYy9jb250ZXh0LW1lbnUvbWVudS10cmlnZ2VyLWZvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBVTdELE1BQU0sT0FBTyxpQkFBaUI7SUFHNUIsWUFBb0IsVUFBc0I7UUFBdEIsZUFBVSxHQUFWLFVBQVU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