bia-framework
Version:
Bia Framework to work with angular 2
48 lines • 3 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
var RippleEffect_1 = require("../ripple-effect/RippleEffect");
var core_navegation_drawer_service_1 = require("./core-navegation-drawer.service");
var core_icon_1 = require("../core-icon/core-icon");
var CoreImage_1 = require("../core-image/CoreImage");
var CoreNavegationDrawer = (function () {
function CoreNavegationDrawer(navegationDrawerService) {
var _this = this;
this.navegationDrawerService = navegationDrawerService;
this.currentUser = null;
this.menuGroups = [];
this.selected = function (item) {
if (item.Click)
item.Click();
};
this.addMenuItem = function (newMenuGroup) {
_this.menuGroups = _this.menuGroups.concat([newMenuGroup]);
};
this.navegationDrawerService.showDrawerSubject.subscribe(function () { return _this.isVisible = true; });
this.navegationDrawerService.hideDrawerSubject.subscribe(function () { return _this.isVisible = false; });
this.navegationDrawerService.menuGroupsSubject.subscribe(function (newGroup) { return _this.addMenuItem(newGroup); });
this.navegationDrawerService.usuarioSubject.subscribe(function (user) { return _this.currentUser = user; });
}
CoreNavegationDrawer = __decorate([
core_1.Component({
selector: 'core-navegation-drawer',
encapsulation: core_1.ViewEncapsulation.None,
templateUrl: "node_modules/bia-framework/components/core-navegation-drawer/core-navegation-drawer.template.html",
styleUrls: ["node_modules/bia-framework/components/core-navegation-drawer/core-navegation-drawer.style.css"],
directives: [core_icon_1.CoreIcon, RippleEffect_1.RippleEffect, common_1.NgFor, common_1.NgIf, CoreImage_1.CoreImage, common_1.NgClass]
}),
__metadata('design:paramtypes', [core_navegation_drawer_service_1.CoreNavegationDrawerService])
], CoreNavegationDrawer);
return CoreNavegationDrawer;
}());
exports.CoreNavegationDrawer = CoreNavegationDrawer;
//# sourceMappingURL=core-navegation-drawer.component.js.map