UNPKG

@addapptables/perfect-scrollbar

Version:
2 lines 1.97 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("perfect-scrollbar"),require("@angular/router"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@addapptables/perfect-scrollbar",["exports","@angular/core","perfect-scrollbar","@angular/router","rxjs/operators"],t):t(((e=e||self).addapptables=e.addapptables||{},e.addapptables["perfect-scrollbar"]={}),e.ng.core,e["perfect-scrollbar"],e.ng.router,e.rxjs.operators)}(this,function(e,t,r,o,n){"use strict";r=r&&r.hasOwnProperty("default")?r["default"]:r;var i=function(){function e(e,t){this._elementRef=e,this._router=t,this.allSub=new Array,this.options={}}return Object.defineProperty(e.prototype,"perfectScrollOptions",{set:function(e){this.options=e},enumerable:!0,configurable:!0}),e.prototype.onResize=function(){this.ps&&this.ps.update()},e.prototype.ngAfterViewInit=function(){var e=this;this.initPerfectScroll();var t=this._router.events.pipe(n.filter(function(e){return e instanceof o.NavigationEnd||e instanceof o.NavigationError||e instanceof o.NavigationCancel}),n.delay(100)).subscribe(function(){e.ps&&e.ps.update()});this.allSub.push(t)},e.prototype.initPerfectScroll=function(){this.ps=new r(this._elementRef.nativeElement,{})},e.prototype.ngOnDestroy=function(){this.ps&&this.ps.destroy(),this.allSub.forEach(function(e){return e.unsubscribe()})},e.decorators=[{type:t.Directive,args:[{selector:"[addapptablesPerfectScrollbar]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:o.Router}]},e.propDecorators={perfectScrollOptions:[{type:t.Input}],onResize:[{type:t.HostListener,args:["window:resize"]}]},e}(),s=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[i],exports:[i]}]}],e}();e.AddapptablePerfectScrollbarModule=s,e.PerfectScrollbarDirective=i,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=addapptables-perfect-scrollbar.umd.min.js.map