UNPKG

angular-admin-lte-teliqo

Version:
1,261 lines (1,248 loc) 459 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('rxjs'), require('@angular/common'), require('rxjs/operators'), require('tslib'), require('@angular/platform-browser'), require('@angular/forms')) : typeof define === 'function' && define.amd ? define('angular-admin-lte-teliqo', ['exports', '@angular/core', '@angular/router', 'rxjs', '@angular/common', 'rxjs/operators', 'tslib', '@angular/platform-browser', '@angular/forms'], factory) : (factory((global['angular-admin-lte-teliqo'] = {}),global.ng.core,global.ng.router,null,global.ng.common,global.Rx.Observable.prototype,global.tslib,global.ng.platformBrowser,global.ng.forms)); }(this, (function (exports,core,router,rxjs,common,operators,tslib_1,platformBrowser,forms) { 'use strict'; /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var RoutingService = (function () { /** * @method constructor * @param router [description] */ function RoutingService(router$$1) { this.router = router$$1; this.onChange = new rxjs.BehaviorSubject(undefined); this.events = new rxjs.BehaviorSubject(undefined); this.init(); } /** * [createUrl description] * \@method createUrl * @param {?} route [description] * @return {?} [description] */ RoutingService.createUrl = /** * [createUrl description] * \@method createUrl * @param {?} route [description] * @return {?} [description] */ function (route) { var /** @type {?} */ url = route.url.map(function (urlSegment) { return urlSegment.toString(); }).join('/'); return url; }; /** * [isChildrenSelfRoute description] * \@method isChildrenSelfRoute * @param {?} route [description] * @return {?} [description] */ RoutingService.isChildrenSelfRoute = /** * [isChildrenSelfRoute description] * \@method isChildrenSelfRoute * @param {?} route [description] * @return {?} [description] */ function (route) { route.routeConfig.children.forEach(function (child) { if (child.path === '' && (child.component || child.loadChildren)) { return true; } }); return false; }; /** * [createBreadcrumb description] * \@method createBreadcrumb * @param {?} route [description] * @param {?} url [description] * @return {?} [description] */ RoutingService.createBreadcrumb = /** * [createBreadcrumb description] * \@method createBreadcrumb * @param {?} route [description] * @param {?} url [description] * @return {?} [description] */ function (route, url) { var /** @type {?} */ isUrl = true; if (route.children.length !== 0 && route.firstChild.routeConfig.path) { if (url !== '/' && !route.routeConfig.loadChildren && !route.routeConfig.component && !RoutingService.isChildrenSelfRoute(route)) { isUrl = false; } } return { data: route.data, params: route.params, url: isUrl ? url : null }; }; /** * [init description] * \@method init * @return {?} */ RoutingService.prototype.init = /** * [init description] * \@method init * @return {?} */ function () { var _this = this; this.router.events.subscribe(function (routeEvent) { // https://github.com/angular/angular/issues/17473: event not fired anymore on load for routed component. // https://github.com/angular/angular/issues/17473: event not fired anymore on load for routed component. _this.events.next(routeEvent); if (routeEvent instanceof router.NavigationEnd) { var /** @type {?} */ route = _this.router.routerState.root.snapshot, /** @type {?} */ tmpUrl = '', /** @type {?} */ url = '', /** @type {?} */ rootRoot = true; var /** @type {?} */ paths = []; while (route.children.length) { route = route.firstChild; tmpUrl = "/" + RoutingService.createUrl(route); if (route.outlet !== router.PRIMARY_OUTLET || (!route.routeConfig.path && !rootRoot)) { continue; } rootRoot = false; if (route.params || route.data) { for (var /** @type {?} */ key in route.params) { if (!key) { continue; } if (route.data['title']) { route.data['title'] = route.data['title'].replace(":" + key, route.params[key]); route.data['title'] = route.data['title'].replace(":" + key, route.params[key]); } if (route.data['breadcrumbs']) { route.data['breadcrumbs'] = route.data['breadcrumbs'].replace(":" + key, route.params[key]); } if (route.data['description']) { route.data['description'] = route.data['description'].replace(":" + key, route.params[key]); } } } if (tmpUrl === '/') { paths.push(RoutingService.createBreadcrumb(route, tmpUrl)); } else { url += tmpUrl; paths.push(RoutingService.createBreadcrumb(route, url)); } } _this.onChange.next(paths); } }); }; RoutingService.decorators = [ { type: core.Injectable }, ]; /** @nocollapse */ RoutingService.ctorParameters = function () { return [ { type: router.Router, }, ]; }; return RoutingService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var BreadcrumbsComponent = (function () { /** * @method constructor * @param routingService [description] * @param changeDetectorRef [description] */ function BreadcrumbsComponent(routingService, changeDetectorRef) { this.routingService = routingService; this.changeDetectorRef = changeDetectorRef; this.homeIcon = 'fa fa-home'; } /** * @method ngOnInit */ /** * \@method ngOnInit * @return {?} */ BreadcrumbsComponent.prototype.ngOnInit = /** * \@method ngOnInit * @return {?} */ function () { var _this = this; this.subscription = this.routingService.onChange.subscribe(function (value) { _this.breadcrumbs = value; }); }; /** * @method ngOnDestroy */ /** * \@method ngOnDestroy * @return {?} */ BreadcrumbsComponent.prototype.ngOnDestroy = /** * \@method ngOnDestroy * @return {?} */ function () { this.subscription.unsubscribe(); }; BreadcrumbsComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-breadcrumbs', template: "<ol class=\"breadcrumb\">\n <li *ngFor=\"let breadcrumb of breadcrumbs; let first = first; let last = last\" [class.active]=\"last || !breadcrumb.url\">\n <a *ngIf=\"breadcrumb.url\" [routerLink]=\"breadcrumb.url\">\n <i *ngIf=\"first\" ngClass=\"{{homeIcon}}\"></i>\n <ng-template [ngIf]=\"breadcrumb.data.breadcrumbs\">{{breadcrumb.data.breadcrumbs}}</ng-template>\n <ng-template [ngIf]=\"!breadcrumb.data.breadcrumbs\">{{breadcrumb.data.title}}</ng-template>\n </a>\n <ng-template [ngIf]=\"!breadcrumb.url\">\n <i *ngIf=\"first\" ngClass=\"{{homeIcon}}\"></i>\n <ng-template [ngIf]=\"breadcrumb.data.breadcrumbs\">{{breadcrumb.data.breadcrumbs}}</ng-template>\n <ng-template [ngIf]=\"!breadcrumb.data.breadcrumbs\">{{breadcrumb.data.title}}</ng-template>\n </ng-template>\n </li>\n</ol>\n", styles: [".breadcrumb{float:right;background:0 0;margin-top:0;margin-bottom:0;font-size:12px;padding:7px 5px;position:absolute;top:15px;right:10px;border-radius:2px}.breadcrumb>li>a{color:#444;text-decoration:none;display:inline-block}.breadcrumb>li>a>.fa,.breadcrumb>li>a>.glyphicon,.breadcrumb>li>a>.ion{margin-right:5px}"] },] }, ]; /** @nocollapse */ BreadcrumbsComponent.ctorParameters = function () { return [ { type: RoutingService, }, { type: core.ChangeDetectorRef, }, ]; }; BreadcrumbsComponent.propDecorators = { "homeIcon": [{ type: core.Input },], }; return BreadcrumbsComponent; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var BreadcrumbsModule = (function () { function BreadcrumbsModule() { } BreadcrumbsModule.decorators = [ { type: core.NgModule, args: [{ imports: [common.CommonModule, router.RouterModule], exports: [BreadcrumbsComponent], declarations: [BreadcrumbsComponent] },] }, ]; return BreadcrumbsModule; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var LayoutStore = (function () { /** * @method constructor * @param layoutConfig [description] */ function LayoutStore(layoutConfig) { this.initialLayoutState = { isSidebarLeftCollapsed: false, isSidebarLeftExpandOnOver: false, isSidebarLeftMouseOver: false, isSidebarLeftMini: true, sidebarRightSkin: 'dark', isSidebarRightCollapsed: true, isSidebarRightOverContent: true, layout: 'normal', sidebarLeftMenu: [], sidebarLeftMenuActiveUrl: '', skin: 'blue' }; if (layoutConfig) { this.initialLayoutState = Object.assign(this.initialLayoutState, layoutConfig); } this._layoutState = new rxjs.BehaviorSubject(this.initialLayoutState); this.layoutState = this._layoutState.asObservable(); } Object.defineProperty(LayoutStore.prototype, "windowInnerHeight", { /** * [windowInnerHeight description] * @method windowInnerHeight * @return [description] */ get: /** * [windowInnerHeight description] * \@method windowInnerHeight * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('windowInnerHeight'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "windowInnerWidth", { /** * [windowInnerWidth description] * @method windowInnerWidth * @return [description] */ get: /** * [windowInnerWidth description] * \@method windowInnerWidth * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('windowInnerWidth'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarLeftCollapsed", { /** * [isSidebarLeftCollapsed description] * @return [description] */ get: /** * [isSidebarLeftCollapsed description] * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarLeftCollapsed'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarLeftExpandOnOver", { /** * [isSidebarLeftExpandOnOver description] * @method isSidebarLeftExpandOnOver * @return [description] */ get: /** * [isSidebarLeftExpandOnOver description] * \@method isSidebarLeftExpandOnOver * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarLeftExpandOnOver'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarLeftMouseOver", { /** * [isSidebarLeftMouseOver description] * @method isSidebarLeftMouseOver * @return [description] */ get: /** * [isSidebarLeftMouseOver description] * \@method isSidebarLeftMouseOver * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarLeftMouseOver'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarLeftMini", { /** * [isSidebarLeftMini description] * @method isSidebarLeftMini * @return [description] */ get: /** * [isSidebarLeftMini description] * \@method isSidebarLeftMini * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarLeftMini'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "sidebarRightSkin", { /** * [sidebarRightSkin description] * @method sidebarRightSkin * @return [description] */ get: /** * [sidebarRightSkin description] * \@method sidebarRightSkin * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('sidebarRightSkin'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarRightCollapsed", { /** * [isSidebarRightCollapsed description] * @return [description] */ get: /** * [isSidebarRightCollapsed description] * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarRightCollapsed'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "isSidebarRightOverContent", { /** * [isSidebarRightOverContent description] * @method isSidebarRightOverContent * @return [description] */ get: /** * [isSidebarRightOverContent description] * \@method isSidebarRightOverContent * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('isSidebarRightOverContent'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "sidebarLeftMenu", { /** * [sidebarLeftMenu description] * @method sidebarLeftMenu * @return [description] */ get: /** * [sidebarLeftMenu description] * \@method sidebarLeftMenu * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('sidebarLeftMenu'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "sidebarLeftMenuActiveUrl", { /** * [sidebarLeftMenuActiveUrl description] * @method sidebarLeftMenuActiveUrl * @return [description] */ get: /** * [sidebarLeftMenuActiveUrl description] * \@method sidebarLeftMenuActiveUrl * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('sidebarLeftMenuActiveUrl'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "sidebarLeftElementHeight", { /** * [sidebarLeftElementHeight description] * @method sidebarLeftElementHeight * @return [description] */ get: /** * [sidebarLeftElementHeight description] * \@method sidebarLeftElementHeight * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('sidebarLeftElementHeight'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "layout", { /** * [layoutType description] * @method layoutType * @return [description] */ get: /** * [layoutType description] * \@method layoutType * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('layout'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "skin", { /** * [skin description] * @method skin * @return [description] */ get: /** * [skin description] * \@method skin * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('skin'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); Object.defineProperty(LayoutStore.prototype, "wrapperClasses", { /** * [wrapperClasses description] * @method wrapperClasses * @return [description] */ get: /** * [wrapperClasses description] * \@method wrapperClasses * @return {?} [description] */ function () { return /** @type {?} */ (this.layoutState.pipe(operators.pluck('wrapperClasses'), operators.distinctUntilChanged())); }, enumerable: true, configurable: true }); /** * [sidebarLeftCollapsed description] * \@method sidebarLeftCollapsed * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarLeftCollapsed = /** * [sidebarLeftCollapsed description] * \@method sidebarLeftCollapsed * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarLeftCollapsed: value })); }; /** * [sidebarLeftExpandOnOver description] * \@method sidebarLeftExpandOnOver * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarLeftExpandOnOver = /** * [sidebarLeftExpandOnOver description] * \@method sidebarLeftExpandOnOver * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarLeftExpandOnOver: value })); }; /** * [setSidebarLeftElementHeight description] * \@method setSidebarLeftElementHeight * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setSidebarLeftElementHeight = /** * [setSidebarLeftElementHeight description] * \@method setSidebarLeftElementHeight * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { sidebarLeftElementHeight: value })); }; /** * [setSidebarRightSkin description] * \@method setSidebarRightSkin * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.setSidebarRightSkin = /** * [setSidebarRightSkin description] * \@method setSidebarRightSkin * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { sidebarRightSkin: value })); }; /** * [sidebarLeftMouseOver description] * \@method sidebarLeftMouseOver * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarLeftMouseOver = /** * [sidebarLeftMouseOver description] * \@method sidebarLeftMouseOver * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarLeftMouseOver: value })); }; /** * [sidebarLeftMini description] * \@method sidebarLeftMini * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarLeftMini = /** * [sidebarLeftMini description] * \@method sidebarLeftMini * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarLeftMini: value })); }; /** * [sidebarRightCollapsed description] * \@method sidebarRightCollapsed * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarRightCollapsed = /** * [sidebarRightCollapsed description] * \@method sidebarRightCollapsed * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarRightCollapsed: value })); }; /** * [sidebarRightOverContent description] * \@method sidebarRightOverContent * @param {?=} value [description] * @return {?} */ LayoutStore.prototype.sidebarRightOverContent = /** * [sidebarRightOverContent description] * \@method sidebarRightOverContent * @param {?=} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { isSidebarRightOverContent: value })); }; /** * [setSidebarLeftMenu description] * \@method setSidebarLeftMenu * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setSidebarLeftMenu = /** * [setSidebarLeftMenu description] * \@method setSidebarLeftMenu * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { sidebarLeftMenu: value })); }; /** * [setSidebarLeftMenuActiveUrl description] * \@method setSidebarLeftMenuActiveUrl * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setSidebarLeftMenuActiveUrl = /** * [setSidebarLeftMenuActiveUrl description] * \@method setSidebarLeftMenuActiveUrl * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { sidebarLeftMenuActiveUrl: value })); }; /** * [setLayout description] * \@method setLayout * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setLayout = /** * [setLayout description] * \@method setLayout * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { layout: value })); }; /** * [setSkin description] * \@method setSkin * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setSkin = /** * [setSkin description] * \@method setSkin * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { skin: value })); }; /** * [setWrapperClasses description] * \@method setWrapperClasses * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setWrapperClasses = /** * [setWrapperClasses description] * \@method setWrapperClasses * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { wrapperClasses: value })); }; /** * [setWindowInnerHeight description] * \@method setWindowInnerHeight * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setWindowInnerHeight = /** * [setWindowInnerHeight description] * \@method setWindowInnerHeight * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { windowInnerHeight: value })); }; /** * [setWindowInnerWidth description] * \@method setWindowInnerWidth * @param {?} value [description] * @return {?} */ LayoutStore.prototype.setWindowInnerWidth = /** * [setWindowInnerWidth description] * \@method setWindowInnerWidth * @param {?} value [description] * @return {?} */ function (value) { this._layoutState.next(Object.assign(this._layoutState.value, { windowInnerWidth: value })); }; return LayoutStore; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var SidebarRightService = (function () { function SidebarRightService() { } Object.defineProperty(SidebarRightService.prototype, "scrollHeight", { /** * [scrollHeight description] * @method scrollHeight * @return [description] */ get: /** * [scrollHeight description] * \@method scrollHeight * @return {?} [description] */ function () { return this.elementRef ? this.elementRef.nativeElement.scrollHeight : null; }, enumerable: true, configurable: true }); SidebarRightService.decorators = [ { type: core.Injectable }, ]; return SidebarRightService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var HeaderService = (function () { function HeaderService() { } Object.defineProperty(HeaderService.prototype, "offsetHeight", { get: /** * [offsetHeight description] * \@method offsetHeight * @return {?} [description] */ function () { return this.elementRef.nativeElement.offsetHeight; }, enumerable: true, configurable: true }); HeaderService.decorators = [ { type: core.Injectable }, ]; return HeaderService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var FooterService = (function () { function FooterService() { } Object.defineProperty(FooterService.prototype, "offsetHeight", { get: /** * [offsetHeight description] * \@method offsetHeight * @return {?} [description] */ function () { return this.elementRef.nativeElement.offsetHeight; }, enumerable: true, configurable: true }); FooterService.decorators = [ { type: core.Injectable }, ]; return FooterService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * [throttle description] * \@method throttle * @param {?} callback [description] * @param {?} delay [description] * @return {?} [description] */ function throttle(callback, delay) { var _this = this; var /** @type {?} */ timeout = null; return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!timeout) { timeout = setTimeout(function () { callback.call.apply(callback, tslib_1.__spread([_this], args)); timeout = null; }, delay); } }; } /** * [removeSubscriptions description] * \@method removeSubscriptions * @param {?} subscriptions * @return {?} */ function removeSubscriptions(subscriptions) { if (subscriptions) { subscriptions.forEach(function (subscription) { subscription.unsubscribe(); }); } return []; } /** * [removeListeners description] * \@method removeListeners * @param {?} listeners * @return {?} */ function removeListeners(listeners) { if (listeners) { listeners.forEach(function (listener) { listener(); }); } return []; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ContentComponent = (function () { /** * @method constructor * @param layoutStore * @param routingService * @param titleService * @param elementRef * @param changeDetectorRef * @param sidebarRightService * @param headerService * @param footerService * @param router */ function ContentComponent(layoutStore, routingService, titleService, elementRef, changeDetectorRef, sidebarRightService, headerService, footerService, router$$1) { this.layoutStore = layoutStore; this.routingService = routingService; this.titleService = titleService; this.elementRef = elementRef; this.changeDetectorRef = changeDetectorRef; this.sidebarRightService = sidebarRightService; this.headerService = headerService; this.footerService = footerService; this.router = router$$1; this.subscriptions = []; } /** * @method ngOnInit */ /** * \@method ngOnInit * @return {?} */ ContentComponent.prototype.ngOnInit = /** * \@method ngOnInit * @return {?} */ function () { var _this = this; this.titleTag = this.titleService.getTitle(); this.subscriptions.push(this.routingService.onChange.subscribe(function (value) { if (value && value[value.length - 1]) { _this.titleService.setTitle(_this.getTitle(value[value.length - 1].data['title'])); _this.header = value[value.length - 1].data['title']; _this.description = value[value.length - 1].data['description']; } _this.changeDetectorRef.markForCheck(); })); this.subscriptions.push(this.router.events.subscribe(function (routeEvent) { if (routeEvent instanceof router.NavigationStart) { _this.navigationEnd = false; } if (routeEvent instanceof router.NavigationEnd) { _this.navigationEnd = true; _this.setContentMinHeight(); } })); this.subscriptions.push(this.layoutStore.sidebarLeftElementHeight.subscribe(function (value) { _this.sidebarLeftHeight = value; _this.setContentMinHeight(); })); this.subscriptions.push(this.layoutStore.layout.subscribe(function (value) { _this.layout = value; _this.setContentMinHeight(); })); this.subscriptions.push(this.layoutStore.windowInnerHeight.subscribe(function (value) { _this.windowInnerHeight = value; _this.setContentMinHeight(); })); this.heightStyle = this.windowInnerHeight; }; /** * @method ngOnDestroy */ /** * \@method ngOnDestroy * @return {?} */ ContentComponent.prototype.ngOnDestroy = /** * \@method ngOnDestroy * @return {?} */ function () { this.subscriptions = removeSubscriptions(this.subscriptions); }; Object.defineProperty(ContentComponent.prototype, "scrollHeight", { get: /** * [scrollHeight description] * \@method scrollHeight * @return {?} [description] */ function () { return this.contentInnerElement.nativeElement.scrollHeight; }, enumerable: true, configurable: true }); /** * [getTitle description] * \@method getTitle * @param {?} title [description] * @return {?} [description] */ ContentComponent.prototype.getTitle = /** * [getTitle description] * \@method getTitle * @param {?} title [description] * @return {?} [description] */ function (title) { return title ? title + " - " + this.titleTag : this.titleTag; }; /** * [setMinHeight description] * \@method setMinHeight * @return {?} */ ContentComponent.prototype.setContentMinHeight = /** * [setMinHeight description] * \@method setMinHeight * @return {?} */ function () { if (this.navigationEnd) { var /** @type {?} */ heightStyle = void 0; var /** @type {?} */ headerFooterOffsetHeight = this.headerService.offsetHeight + this.footerService.offsetHeight; if (this.layout === 'fixed') { heightStyle = this.windowInnerHeight - this.footerService.offsetHeight; } else { var /** @type {?} */ sidebarRight = this.sidebarRightService.scrollHeight ? this.sidebarRightService.scrollHeight - this.headerService.offsetHeight : 0; heightStyle = Math.max(this.windowInnerHeight - headerFooterOffsetHeight, this.sidebarLeftHeight - this.headerService.offsetHeight, sidebarRight); } if (heightStyle && heightStyle !== this.heightStyle) { if (this.scrollHeight > heightStyle) { heightStyle = null; } this.heightStyle = heightStyle; this.changeDetectorRef.detectChanges(); } } }; ContentComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-content', template: "<div class=\"content-wrapper\" [style.min-height.px]=\"heightStyle\">\n <div #contentInnerElement class=\"content-inner\">\n <ng-content select=\"[mk-layout-content-before-header]\"></ng-content>\n <section *ngIf=\"header || description\" class=\"content-header\">\n <h1>\n {{header}}\n <small *ngIf=\"description\">{{description}}</small>\n </h1>\n <mk-breadcrumbs></mk-breadcrumbs>\n </section>\n <ng-content select=\"[mk-layout-content-after-header]\"></ng-content>\n <section class=\"content\">\n <ng-content></ng-content>\n </section>\n </div>\n</div>\n", styles: [":host{display:block}.content-wrapper{position:relative}"], changeDetection: core.ChangeDetectionStrategy.OnPush },] }, ]; /** @nocollapse */ ContentComponent.ctorParameters = function () { return [ { type: LayoutStore, }, { type: RoutingService, }, { type: platformBrowser.Title, }, { type: core.ElementRef, }, { type: core.ChangeDetectorRef, }, { type: SidebarRightService, }, { type: HeaderService, }, { type: FooterService, }, { type: router.Router, }, ]; }; ContentComponent.propDecorators = { "contentInnerElement": [{ type: core.ViewChild, args: ['contentInnerElement',] },], }; return ContentComponent; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ContentModule = (function () { function ContentModule() { } ContentModule.decorators = [ { type: core.NgModule, args: [{ imports: [common.CommonModule, router.RouterModule, BreadcrumbsModule], exports: [ContentComponent], declarations: [ContentComponent] },] }, ]; return ContentModule; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Footer Left */ var FooterLeftComponent = (function () { function FooterLeftComponent() { } FooterLeftComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-footer-left', template: '<ng-template #templateRef><ng-content></ng-content></ng-template>' },] }, ]; /** @nocollapse */ FooterLeftComponent.propDecorators = { "templateRef": [{ type: core.ViewChild, args: ['templateRef',] },], }; return FooterLeftComponent; }()); /** * Footer Right */ var FooterRightComponent = (function () { function FooterRightComponent() { } FooterRightComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-footer-right', template: '<ng-template #templateRef><ng-content></ng-content></ng-template>' },] }, ]; /** @nocollapse */ FooterRightComponent.propDecorators = { "templateRef": [{ type: core.ViewChild, args: ['templateRef',] },], }; return FooterRightComponent; }()); var FooterComponent = (function () { function FooterComponent(elementRef, footerService) { this.elementRef = elementRef; this.footerService = footerService; } /** * @return {?} */ FooterComponent.prototype.ngOnInit = /** * @return {?} */ function () { this.footerService.elementRef = this.elementRef; }; FooterComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-footer', template: "<footer class=\"main-footer\">\n <div class=\"pull-right hidden-xs\">\n <ng-template [ngTemplateOutlet]=\"footerRightComponent?.templateRef\"></ng-template>\n </div>\n <ng-template [ngTemplateOutlet]=\"footerLeftComponent?.templateRef\"></ng-template>\n</footer>\n", styles: [":host{display:block}"] },] }, ]; /** @nocollapse */ FooterComponent.ctorParameters = function () { return [ { type: core.ElementRef, }, { type: FooterService, }, ]; }; FooterComponent.propDecorators = { "footerLeftComponent": [{ type: core.ContentChild, args: [FooterLeftComponent,] },], "footerRightComponent": [{ type: core.ContentChild, args: [FooterRightComponent,] },], }; return FooterComponent; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var FooterModule = (function () { function FooterModule() { } FooterModule.decorators = [ { type: core.NgModule, args: [{ imports: [common.CommonModule], exports: [FooterComponent, FooterLeftComponent, FooterRightComponent], declarations: [FooterComponent, FooterLeftComponent, FooterRightComponent] },] }, ]; return FooterModule; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Header Logo */ var HeaderLogoComponent = (function () { function HeaderLogoComponent() { } HeaderLogoComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-header-logo', template: '<ng-template #templateRef><ng-content></ng-content></ng-template>' },] }, ]; /** @nocollapse */ HeaderLogoComponent.propDecorators = { "templateRef": [{ type: core.ViewChild, args: ['templateRef',] },], }; return HeaderLogoComponent; }()); /** * Header Logo Mini */ var HeaderLogoMiniComponent = (function () { function HeaderLogoMiniComponent() { } HeaderLogoMiniComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-header-logo-mini', template: '<ng-template #templateRef><ng-content></ng-content></ng-template>' },] }, ]; /** @nocollapse */ HeaderLogoMiniComponent.propDecorators = { "templateRef": [{ type: core.ViewChild, args: ['templateRef',] },], }; return HeaderLogoMiniComponent; }()); /** * Header */ var HeaderComponent = (function () { /** * @method constructor * @param layoutStore [description] * @param ngZone [description] * @param renderer2 [description] * @param elementRef [description] * @param headerService [description] */ function HeaderComponent(layoutStore, ngZone, renderer2, elementRef, headerService) { this.layoutStore = layoutStore; this.ngZone = ngZone; this.renderer2 = renderer2; this.elementRef = elementRef; this.headerService = headerService; this.listeners = []; this.subscriptions = []; this.isSidebarLeftToggle = true; this.isSidebarRightToggle = true; } /** * @method ngAfterViewInit */ /** * \@method ngAfterViewInit * @return {?} */ HeaderComponent.prototype.ngAfterViewInit = /** * \@method ngAfterViewInit * @return {?} */ function () { var _this = this; this.headerService.elementRef = this.headerElement; if (this.sidebarLeftToggleElement) { this.subscriptions.push(this.layoutStore.isSidebarLeftCollapsed.subscribe(function (value) { _this.isSidebarLeftCollapsed = value; })); this.ngZone.runOutsideAngular(function () { _this.listeners.push(_this.renderer2.listen(_this.sidebarLeftToggleElement.nativeElement, 'click', function (event) { event.preventDefault(); _this.layoutStore.sidebarLeftCollapsed(!_this.isSidebarLeftCollapsed); })); }); } if (this.sidebarRightToggleElement) { this.subscriptions.push(this.layoutStore.isSidebarRightCollapsed.subscribe(function (value) { _this.isSidebarRightCollapsed = value; })); this.ngZone.runOutsideAngular(function () { _this.listeners.push(_this.renderer2.listen(_this.sidebarRightToggleElement.nativeElement, 'click', function (event) { event.preventDefault(); _this.layoutStore.sidebarRightCollapsed(!_this.isSidebarRightCollapsed); })); }); } }; /** * @method ngOnDestroy */ /** * \@method ngOnDestroy * @return {?} */ HeaderComponent.prototype.ngOnDestroy = /** * \@method ngOnDestroy * @return {?} */ function () { this.listeners = removeListeners(this.listeners); this.subscriptions = removeSubscriptions(this.subscriptions); }; HeaderComponent.decorators = [ { type: core.Component, args: [{ selector: 'mk-layout-header', template: "<header #headerElement class=\"main-header\">\n <a href=\"/\" class=\"logo\">\n <span cl