ad-custom-lib
Version:
This is an UI custom library based on Adminlte library with purpose for personal use, if you need a full template of Primeng please visit https://github.com/mledour/angular-admin-lte
1,539 lines (1,527 loc) • 223 kB
JavaScript
import { __spread } from 'tslib';
import { CommonModule } from '@angular/common';
import { Injectable, Component, ChangeDetectorRef, Input, NgModule, ChangeDetectionStrategy, ElementRef, ViewChild, ContentChild, NgZone, Renderer2, InjectionToken, EventEmitter, Directive, Output, ViewChildren, Optional, SkipSelf, ContentChildren, ViewContainerRef, HostListener } from '@angular/core';
import { NavigationEnd, PRIMARY_OUTLET, Router, RouterModule, NavigationStart, ActivationStart, ActivatedRoute } from '@angular/router';
import { BehaviorSubject, Subject } from 'rxjs';
import { Title } from '@angular/platform-browser';
import { pluck, distinctUntilChanged } from 'rxjs/operators';
import { NgControl, FormsModule } from '@angular/forms';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function Path() { }
if (false) {
/** @type {?} */
Path.prototype.data;
/** @type {?} */
Path.prototype.params;
/** @type {?} */
Path.prototype.url;
}
/**
* @record
*/
function Paths() { }
/*
*
*/
var RoutingService = /** @class */ (function () {
/**
* @method constructor
* @param router [description]
*/
function RoutingService(router) {
this.router = router;
this.onChange = new BehaviorSubject(undefined);
this.events = new BehaviorSubject(undefined);
this.init();
}
/**
* [createUrl description]
* @method createUrl
* @param route [description]
* @return [description]
*/
/**
* [createUrl description]
* \@method createUrl
* @private
* @param {?} route [description]
* @return {?} [description]
*/
RoutingService.createUrl = /**
* [createUrl description]
* \@method createUrl
* @private
* @param {?} route [description]
* @return {?} [description]
*/
function (route) {
/** @type {?} */
var url = route.url.map((/**
* @param {?} urlSegment
* @return {?}
*/
function (urlSegment) { return urlSegment.toString(); })).join('/');
return url;
};
/**
* [isChildrenSelfRoute description]
* @method isChildrenSelfRoute
* @param route [description]
* @return [description]
*/
/**
* [isChildrenSelfRoute description]
* \@method isChildrenSelfRoute
* @private
* @param {?} route [description]
* @return {?} [description]
*/
RoutingService.isChildrenSelfRoute = /**
* [isChildrenSelfRoute description]
* \@method isChildrenSelfRoute
* @private
* @param {?} route [description]
* @return {?} [description]
*/
function (route) {
route.routeConfig.children.forEach((/**
* @param {?} child
* @return {?}
*/
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]
*/
/**
* [createBreadcrumb description]
* \@method createBreadcrumb
* @private
* @param {?} route [description]
* @param {?} url [description]
* @return {?} [description]
*/
RoutingService.createBreadcrumb = /**
* [createBreadcrumb description]
* \@method createBreadcrumb
* @private
* @param {?} route [description]
* @param {?} url [description]
* @return {?} [description]
*/
function (route, url) {
/** @type {?} */
var 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
*/
/**
* [init description]
* \@method init
* @private
* @return {?}
*/
RoutingService.prototype.init = /**
* [init description]
* \@method init
* @private
* @return {?}
*/
function () {
var _this = this;
this.router.events.subscribe((/**
* @param {?} routeEvent
* @return {?}
*/
function (routeEvent) {
// console.log(routeEvent)
// https://github.com/angular/angular/issues/17473: event not fired anymore on load for routed component.
if (routeEvent instanceof NavigationEnd) {
_this.events.next(routeEvent);
/** @type {?} */
var route = _this.router.routerState.root.snapshot;
/** @type {?} */
var tmpUrl = '';
/** @type {?} */
var url = '';
/** @type {?} */
var rootRoot = true;
/** @type {?} */
var paths = [];
while (route.children.length) {
route = route.firstChild;
tmpUrl = "/" + RoutingService.createUrl(route);
if (route.outlet !== PRIMARY_OUTLET || (!route.routeConfig.path && !rootRoot)) {
continue;
}
rootRoot = false;
if (route.params || route.data) {
for (var 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: Injectable }
];
/** @nocollapse */
RoutingService.ctorParameters = function () { return [
{ type: Router }
]; };
return RoutingService;
}());
if (false) {
/** @type {?} */
RoutingService.prototype.onChange;
/** @type {?} */
RoutingService.prototype.events;
/**
* @type {?}
* @private
*/
RoutingService.prototype.router;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/*
*
*/
var BreadcrumbsComponent = /** @class */ (function () {
/**
* @method constructor
* @param routingService [description]
* @param changeDetectorRef [description]
*/
function BreadcrumbsComponent(routingService, changeDetectorRef, router) {
this.routingService = routingService;
this.changeDetectorRef = changeDetectorRef;
this.router = router;
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((/**
* @param {?} value
* @return {?}
*/
function (value) {
_this.breadcrumbs = value;
}));
};
/**
* @method ngOnDestroy
*/
/**
* \@method ngOnDestroy
* @return {?}
*/
BreadcrumbsComponent.prototype.ngOnDestroy = /**
* \@method ngOnDestroy
* @return {?}
*/
function () {
this.subscription.unsubscribe();
};
BreadcrumbsComponent.decorators = [
{ type: Component, args: [{
selector: 'mk-breadcrumbs',
template: "<ol class=\"breadcrumb\">\r\n <li *ngFor=\"let breadcrumb of breadcrumbs; let first = first; let last = last\"\r\n [class.active]=\"last || !breadcrumb.url\">\r\n <a *ngIf=\"breadcrumb.url\" [routerLink]=\"breadcrumb.url\">\r\n <i *ngIf=\"first\" ngClass=\"{{homeIcon}}\"></i>\r\n <ng-template [ngIf]=\"breadcrumb.data.breadcrumbs\">{{breadcrumb.data.breadcrumbs}}</ng-template>\r\n <ng-template [ngIf]=\"!breadcrumb.data.breadcrumbs\">{{breadcrumb.data.title}}</ng-template>\r\n </a>\r\n <ng-template [ngIf]=\"!breadcrumb.url\">\r\n <i *ngIf=\"first\" ngClass=\"{{homeIcon}}\"></i>\r\n <ng-template [ngIf]=\"breadcrumb.data.breadcrumbs\">{{breadcrumb.data.breadcrumbs}}</ng-template>\r\n <ng-template [ngIf]=\"!breadcrumb.data.breadcrumbs\">{{breadcrumb.data.title}}</ng-template>\r\n </ng-template>\r\n </li>\r\n</ol>",
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 .fa,.breadcrumb>li .glyphicon,.breadcrumb>li .ion{margin-right:5px}"]
}] }
];
/** @nocollapse */
BreadcrumbsComponent.ctorParameters = function () { return [
{ type: RoutingService },
{ type: ChangeDetectorRef },
{ type: Router }
]; };
BreadcrumbsComponent.propDecorators = {
homeIcon: [{ type: Input }]
};
return BreadcrumbsComponent;
}());
if (false) {
/** @type {?} */
BreadcrumbsComponent.prototype.breadcrumbs;
/**
* @type {?}
* @private
*/
BreadcrumbsComponent.prototype.subscription;
/** @type {?} */
BreadcrumbsComponent.prototype.homeIcon;
/**
* @type {?}
* @private
*/
BreadcrumbsComponent.prototype.routingService;
/**
* @type {?}
* @private
*/
BreadcrumbsComponent.prototype.changeDetectorRef;
/**
* @type {?}
* @private
*/
BreadcrumbsComponent.prototype.router;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var BreadcrumbsModule = /** @class */ (function () {
function BreadcrumbsModule() {
}
BreadcrumbsModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule, RouterModule],
exports: [BreadcrumbsComponent],
declarations: [BreadcrumbsComponent]
},] }
];
return BreadcrumbsModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* [throttle description]
* \@method throttle
* @param {?} callback [description]
* @param {?} delay [description]
* @return {?} [description]
*/
function throttle(callback, delay) {
var _this = this;
/** @type {?} */
var timeout = null;
return (/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!timeout) {
timeout = setTimeout((/**
* @return {?}
*/
function () {
callback.call.apply(callback, __spread([_this], args));
timeout = null;
}), delay);
}
});
}
/**
* [removeSubscriptions description]
* \@method removeSubscriptions
* @param {?} subscriptions
* @return {?}
*/
function removeSubscriptions(subscriptions) {
if (subscriptions) {
subscriptions.forEach((/**
* @param {?} subscription
* @return {?}
*/
function (subscription) {
subscription.unsubscribe();
}));
}
return [];
}
/**
* [removeListeners description]
* \@method removeListeners
* @param {?} listeners
* @return {?}
*/
function removeListeners(listeners) {
if (listeners) {
listeners.forEach((/**
* @param {?} listener
* @return {?}
*/
function (listener) {
listener();
}));
}
return [];
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var FooterService = /** @class */ (function () {
function FooterService() {
}
Object.defineProperty(FooterService.prototype, "offsetHeight", {
/**
* [offsetHeight description]
* @method offsetHeight
* @return [description]
*/
get: /**
* [offsetHeight description]
* \@method offsetHeight
* @return {?} [description]
*/
function () {
return this.elementRef ? this.elementRef.nativeElement.offsetHeight : 0;
},
enumerable: true,
configurable: true
});
FooterService.decorators = [
{ type: Injectable }
];
return FooterService;
}());
if (false) {
/** @type {?} */
FooterService.prototype.elementRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var HeaderService = /** @class */ (function () {
function HeaderService() {
}
Object.defineProperty(HeaderService.prototype, "offsetHeight", {
/**
* [offsetHeight description]
* @method offsetHeight
* @return [description]
*/
get: /**
* [offsetHeight description]
* \@method offsetHeight
* @return {?} [description]
*/
function () {
return this.elementRef ? this.elementRef.nativeElement.offsetHeight : 0;
},
enumerable: true,
configurable: true
});
HeaderService.decorators = [
{ type: Injectable }
];
return HeaderService;
}());
if (false) {
/** @type {?} */
HeaderService.prototype.elementRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/*
*
*/
var /*
*
*/
LayoutStore = /** @class */ (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 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(pluck('windowInnerHeight'), 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(pluck('windowInnerWidth'), 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(pluck('isSidebarLeftCollapsed'), 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(pluck('isSidebarLeftExpandOnOver'), 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(pluck('isSidebarLeftMouseOver'), 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(pluck('isSidebarLeftMini'), 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(pluck('sidebarRightSkin'), 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(pluck('isSidebarRightCollapsed'), 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(pluck('isSidebarRightOverContent'), 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(pluck('sidebarLeftMenu'), 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(pluck('sidebarLeftMenuActiveUrl'), 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(pluck('sidebarLeftElementHeight'), 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(pluck('layout'), 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(pluck('skin'), 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(pluck('wrapperClasses'), distinctUntilChanged())));
},
enumerable: true,
configurable: true
});
/**
* [sidebarLeftCollapsed description]
* @method sidebarLeftCollapsed
* @param value [description]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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]
*/
/**
* [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;
}());
if (false) {
/** @type {?} */
LayoutStore.prototype.layoutState;
/**
* @type {?}
* @private
*/
LayoutStore.prototype._layoutState;
/**
* @type {?}
* @private
*/
LayoutStore.prototype.initialLayoutState;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var SidebarRightService = /** @class */ (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: Injectable }
];
return SidebarRightService;
}());
if (false) {
/** @type {?} */
SidebarRightService.prototype.elementRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ContentComponent = /** @class */ (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) {
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;
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((/**
* @param {?} value
* @return {?}
*/
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((/**
* @param {?} routeEvent
* @return {?}
*/
function (routeEvent) {
if (routeEvent instanceof NavigationStart) {
_this.navigationEnd = false;
}
if (routeEvent instanceof NavigationEnd) {
_this.navigationEnd = true;
_this.setContentMinHeight();
}
})));
this.subscriptions.push(this.layoutStore.sidebarLeftElementHeight.subscribe((/**
* @param {?} value
* @return {?}
*/
function (value) {
_this.sidebarLeftHeight = value;
_this.setContentMinHeight();
})));
this.subscriptions.push(this.layoutStore.layout.subscribe((/**
* @param {?} value
* @return {?}
*/
function (value) {
_this.layout = value;
_this.setContentMinHeight();
})));
this.subscriptions.push(this.layoutStore.windowInnerHeight.subscribe((/**
* @param {?} value
* @return {?}
*/
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", {
/**
* [scrollHeight description]
* @method scrollHeight
* @return [description]
*/
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]
*/
/**
* [getTitle description]
* \@method getTitle
* @private
* @param {?} title [description]
* @return {?} [description]
*/
ContentComponent.prototype.getTitle = /**
* [getTitle description]
* \@method getTitle
* @private
* @param {?} title [description]
* @return {?} [description]
*/
function (title) {
return title ? title + " - " + this.titleTag : this.titleTag;
};
/**
* [setMinHeight description]
* @method setMinHeight
*/
/**
* [setMinHeight description]
* \@method setMinHeight
* @private
* @return {?}
*/
ContentComponent.prototype.setContentMinHeight = /**
* [setMinHeight description]
* \@method setMinHeight
* @private
* @return {?}
*/
function () {
if (this.navigationEnd) {
/** @type {?} */
var heightStyle = void 0;
/** @type {?} */
var headerFooterOffsetHeight = this.headerService.offsetHeight + this.footerService.offsetHeight;
if (this.layout === 'fixed') {
heightStyle = this.windowInnerHeight - this.footerService.offsetHeight;
}
else {
/** @type {?} */
var 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: Component, args: [{
selector: 'mk-layout-content',
template: "<div class=\"content-wrapper\" [style.min-height.px]=\"heightStyle\">\r\n <div #contentInnerElement class=\"content-inner\">\r\n <ng-content select=\"[mk-layout-content-before-header]\"></ng-content>\r\n <!-- <section class=\"content-header\">\r\n <h1 *ngIf=\"header || description\">\r\n {{header}}\r\n <small *ngIf=\"description\">{{description}}</small>\r\n </h1>\r\n <mk-breadcrumbs></mk-breadcrumbs>\r\n </section> -->\r\n <ng-content select=\"[mk-layout-content-after-header]\"></ng-content>\r\n <section class=\"content\">\r\n <ng-content></ng-content>\r\n </section>\r\n </div>\r\n</div>",
changeDetection: ChangeDetectionStrategy.OnPush,
styles: [":host{display:block}.content-wrapper{position:relative}"]
}] }
];
/** @nocollapse */
ContentComponent.ctorParameters = function () { return [
{ type: LayoutStore },
{ type: RoutingService },
{ type: Title },
{ type: ElementRef },
{ type: ChangeDetectorRef },
{ type: SidebarRightService },
{ type: HeaderService },
{ type: FooterService },
{ type: Router }
]; };
ContentComponent.propDecorators = {
contentInnerElement: [{ type: ViewChild, args: ['contentInnerElement', { static: true },] }]
};
return ContentComponent;
}());
if (false) {
/** @type {?} */
ContentComponent.prototype.description;
/** @type {?} */
ContentComponent.prototype.header;
/** @type {?} */
ContentComponent.prototype.heightStyle;
/** @type {?} */
ContentComponent.prototype.sidebarLeftHeight;
/** @type {?} */
ContentComponent.prototype.windowInnerHeight;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.layout;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.titleTag;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.navigationEnd;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.subscriptions;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.contentInnerElement;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.layoutStore;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.routingService;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.titleService;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.elementRef;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.changeDetectorRef;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.sidebarRightService;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.headerService;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.footerService;
/**
* @type {?}
* @private
*/
ContentComponent.prototype.router;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ContentModule = /** @class */ (function () {
function ContentModule() {
}
ContentModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule, RouterModule, BreadcrumbsModule],
exports: [ContentComponent],
declarations: [ContentComponent]
},] }
];
return ContentModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Footer Left
*/
var FooterLeftComponent = /** @class */ (function () {
function FooterLeftComponent() {
}
FooterLeftComponent.decorators = [
{ type: Component, args: [{
selector: 'mk-layout-footer-left',
template: '<ng-template #templateRef><ng-content></ng-content></ng-template>'
}] }
];
FooterLeftComponent.propDecorators = {
templateRef: [{ type: ViewChild, args: ['templateRef', { static: true },] }]
};
return FooterLeftComponent;
}());
if (false) {
/** @type {?} */
FooterLeftComponent.prototype.templateRef;
}
/**
* Footer Right
*/
var FooterRightComponent = /** @class */ (function () {
function FooterRightComponent() {
}
FooterRightComponent.decorators = [
{ type: Component, args: [{
selector: 'mk-layout-footer-right',
template: '<ng-template #templateRef><ng-content></ng-content></ng-template>'
}] }
];
FooterRightComponent.propDecorators = {
templateRef: [{ type: ViewChild, args: ['templateRef', { static: true },] }]
};
return FooterRightComponent;
}());
if (false) {
/** @type {?} */
FooterRightComponent.prototype.templateRef;
}
var FooterComponent = /** @class */ (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: Component, args: [{
selector: 'mk-layout-footer',
template: "<footer class=\"main-footer\">\r\n <div class=\"pull-right hidden-xs\">\r\n <ng-template [ngTemplateOutlet]=\"footerRightComponent?.templateRef\"></ng-template>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"footerLeftComponent?.templateRef\"></ng-template>\r\n</footer>",
styles: [":host{display:block}"]
}] }
];
/** @nocollapse */
FooterComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: FooterService }
]; };
FooterComponent.propDecorators = {
footerLeftComponent: [{ type: ContentChild, args: [FooterLeftComponent, { static: true },] }],
footerRightComponent: [{ type: ContentChild, args: [FooterRightComponent, { static: true },] }]
};
return FooterComponent;
}());
if (false) {
/** @type {?} */
FooterComponent.prototype.footerLeftComponent;
/** @type {?} */
FooterComponent.prototype.footerRightComponent;
/**
* @type {?}
* @private
*/
FooterComponent.prototype.elementRef;
/**
* @type {?}
* @private
*/
FooterComponent.prototype.footerService;
}
/**
* @fileoverview added by tsickle
* @supp