UNPKG

@metismenu/angular

Version:
91 lines (81 loc) 3.74 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('metismenujs')) : typeof define === 'function' && define.amd ? define('@metismenu/angular', ['exports', '@angular/core', 'metismenujs'], factory) : (global = global || self, factory((global.metismenu = global.metismenu || {}, global.metismenu.angular = {}), global.ng.core, global.MetisMenu)); }(this, (function (exports, i0, MetisMenu) { 'use strict'; MetisMenu = MetisMenu && Object.prototype.hasOwnProperty.call(MetisMenu, 'default') ? MetisMenu['default'] : MetisMenu; var MetismenuAngularService = /** @class */ (function () { function MetismenuAngularService() { } return MetismenuAngularService; }()); MetismenuAngularService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MetismenuAngularService_Factory() { return new MetismenuAngularService(); }, token: MetismenuAngularService, providedIn: "root" }); MetismenuAngularService.decorators = [ { type: i0.Injectable, args: [{ providedIn: 'root' },] } ]; MetismenuAngularService.ctorParameters = function () { return []; }; var MetismenuAngularComponent = /** @class */ (function () { function MetismenuAngularComponent(elem) { this.elem = elem; this.toggle = 'true'; this.parentTrigger = 'li'; this.subMenu = 'ul'; this.triggerElement = 'a'; } MetismenuAngularComponent.prototype.ngAfterViewInit = function () { this.mmOpts = { toggle: (this.toggle.toLowerCase() === 'true'), parentTrigger: this.parentTrigger || 'li', subMenu: this.subMenu || 'ul', triggerElement: this.triggerElement || 'a', }; this.mm = new MetisMenu(this.elem.nativeElement, this.mmOpts); }; MetismenuAngularComponent.prototype.ngOnInit = function () { }; MetismenuAngularComponent.prototype.ngOnDestroy = function () { this.mm.dispose(); }; return MetismenuAngularComponent; }()); MetismenuAngularComponent.decorators = [ { type: i0.Component, args: [{ selector: 'metis-menu, [metis-menu]', // inputs: ['toggle', 'parentTrigger', 'subMenu', 'triggerElement'], template: "<ng-content></ng-content>" },] } ]; MetismenuAngularComponent.ctorParameters = function () { return [ { type: i0.ElementRef } ]; }; MetismenuAngularComponent.propDecorators = { toggle: [{ type: i0.Input }], parentTrigger: [{ type: i0.Input }], subMenu: [{ type: i0.Input }], triggerElement: [{ type: i0.Input }] }; var MetismenuAngularModule = /** @class */ (function () { function MetismenuAngularModule() { } return MetismenuAngularModule; }()); MetismenuAngularModule.decorators = [ { type: i0.NgModule, args: [{ declarations: [MetismenuAngularComponent], imports: [], exports: [MetismenuAngularComponent] },] } ]; /* * Public API Surface of metismenu-angular */ /** * Generated bundle index. Do not edit. */ exports.MetismenuAngularComponent = MetismenuAngularComponent; exports.MetismenuAngularModule = MetismenuAngularModule; exports.MetismenuAngularService = MetismenuAngularService; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=metismenu-angular.umd.js.map