ngx-quicklink
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,1 +0,1 @@ | ||
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("@angular/core"),require("@angular/router"),require("rxjs")):typeof define==="function"&&define.amd?define(["exports","@angular/core","@angular/router","rxjs"],factory):(global=global||self,factory(global.ngxql={},global.core,global.router,global.rxjs))})(this,function(exports,core,router,rxjs){"use strict";var __decorate=undefined&&undefined.__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=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var PrefetchRegistry=function(){function PrefetchRegistry(router$$1){this.router=router$$1;this.trees=[]}PrefetchRegistry.prototype.add=function(tree){this.trees.push(tree)};PrefetchRegistry.prototype.shouldPrefetch=function(url){var tree=this.router.parseUrl(url);return this.trees.some(function(child){return containsTree(child,tree)})};PrefetchRegistry=__decorate([core.Injectable(),__metadata("design:paramtypes",[router.Router])],PrefetchRegistry);return PrefetchRegistry}();function containsQueryParams(container,containee){return Object.keys(containee).length<=Object.keys(container).length&&Object.keys(containee).every(function(key){return containee[key]===container[key]})}function containsTree(container,containee){return containsQueryParams(container.queryParams,containee.queryParams)&&containsSegmentGroup(container.root,containee.root)}function containsSegmentGroup(container,containee){return containsSegmentGroupHelper(container,containee,containee.segments)}function containsSegmentGroupHelper(container,containee,containeePaths){if(container.segments.length>containeePaths.length){var current=container.segments.slice(0,containeePaths.length);if(!equalPath(current,containeePaths))return false;if(containee.hasChildren())return false;return true}else if(container.segments.length===containeePaths.length){if(!equalPath(container.segments,containeePaths))return false;for(var c in containee.children){if(!container.children[c])return false;if(!containsSegmentGroup(container.children[c],containee.children[c]))return false}return true}else{var current=containeePaths.slice(0,container.segments.length);var next=containeePaths.slice(container.segments.length);if(!equalPath(container.segments,current))return false;if(!container.children[router.PRIMARY_OUTLET])return false;return containsSegmentGroupHelper(container.children[router.PRIMARY_OUTLET],containee,next)}}function equalPath(as,bs){if(as.length!==bs.length)return false;return as.every(function(a,i){return a.path===bs[i].path})}var __decorate$1=undefined&&undefined.__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$1=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var ɵ0=function(cb){var start=Date.now();return setTimeout(function(){cb({didTimeout:false,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)};var requestIdleCallback=window.requestIdleCallback||ɵ0;var cancelIdleCallback=window.cancelIdleCallback||clearTimeout;var observerSupported=function(){return!!window.IntersectionObserver};var LinkHandler=new core.InjectionToken("LinkHandler");var ObservableLinkHandler=function(){function ObservableLinkHandler(loader,queue){var _this=this;this.loader=loader;this.queue=queue;this.registerBuffer=[];this.unregisterBuffer=[];this.elementLink=new Map;this.observer=observerSupported()?new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){var link=entry.target;_this.queue.add(_this.elementLink.get(link).urlTree);_this.observer.unobserve(link);requestIdleCallback(function(){_this.loader.preload().subscribe(function(){return void 0})})}})}):null}ObservableLinkHandler.prototype.register=function(el){var _this=this;this.elementLink.set(el.element,el);cancelIdleCallback(this.registerIdle);this.registerBuffer.push(el.element);this.registerIdle=requestIdleCallback(function(){_this.registerBuffer.forEach(function(e){return _this.observer.observe(e)});_this.registerBuffer=[]})};ObservableLinkHandler.prototype.unregister=function(el){var _this=this;this.elementLink.delete(el.element);cancelIdleCallback(this.unregisterIdle);this.unregisterBuffer.push(el.element);this.unregisterIdle=requestIdleCallback(function(){_this.unregisterBuffer.forEach(function(e){return _this.observer.observe(e)});_this.unregisterBuffer=[]})};ObservableLinkHandler.prototype.supported=function(){return observerSupported()};ObservableLinkHandler=__decorate$1([core.Injectable(),__metadata$1("design:paramtypes",[router.RouterPreloader,PrefetchRegistry])],ObservableLinkHandler);return ObservableLinkHandler}();var PreloadLinkHandler=function(){function PreloadLinkHandler(loader,queue){this.loader=loader;this.queue=queue}PreloadLinkHandler.prototype.register=function(el){var _this=this;this.queue.add(el.urlTree);requestIdleCallback(function(){return _this.loader.preload().subscribe(function(){return void 0})})};PreloadLinkHandler.prototype.unregister=function(_){};PreloadLinkHandler.prototype.supported=function(){return true};PreloadLinkHandler=__decorate$1([core.Injectable(),__metadata$1("design:paramtypes",[router.RouterPreloader,PrefetchRegistry])],PreloadLinkHandler);return PreloadLinkHandler}();var __decorate$2=undefined&&undefined.__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$2=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var __param=undefined&&undefined.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};var LinkDirective=function(){function LinkDirective(linkHandlers,el,link,linkWithHref){this.linkHandlers=linkHandlers;this.el=el;this.linkHandler=this.linkHandlers.filter(function(h){return h.supported()}).shift();this.routerLink=link||linkWithHref}LinkDirective.prototype.ngOnInit=function(){this.linkHandler.register(this)};LinkDirective.prototype.ngOnDestroy=function(){this.linkHandler.unregister(this)};Object.defineProperty(LinkDirective.prototype,"element",{get:function(){return this.el.nativeElement},enumerable:true,configurable:true});Object.defineProperty(LinkDirective.prototype,"urlTree",{get:function(){return this.routerLink.urlTree},enumerable:true,configurable:true});LinkDirective=__decorate$2([core.Directive({selector:"[routerLink]"}),__param(0,core.Inject(LinkHandler)),__param(2,core.Optional()),__param(3,core.Optional()),__metadata$2("design:paramtypes",[Array,core.ElementRef,router.RouterLink,router.RouterLinkWithHref])],LinkDirective);return LinkDirective}();var __decorate$3=undefined&&undefined.__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$3=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var QuicklinkStrategy=function(){function QuicklinkStrategy(queue,router$$1){this.queue=queue;this.router=router$$1}QuicklinkStrategy.prototype.preload=function(route,load){var conn=navigator.connection;if(conn){if((conn.effectiveType||"").includes("2g")||conn.saveData)return rxjs.EMPTY}if(route.data&&!route.data.preload){return rxjs.EMPTY}var fullPath=findPath(this.router.config,route);if(this.queue.shouldPrefetch(fullPath)){return load()}return rxjs.EMPTY};QuicklinkStrategy=__decorate$3([core.Injectable(),__metadata$3("design:paramtypes",[PrefetchRegistry,router.Router])],QuicklinkStrategy);return QuicklinkStrategy}();var findPath=function(config,route){config=config.slice();var parent=new Map;var _loop_1=function(){var el=config.shift();if(el===route)return"break";var current_1=el._loadedConfig;if(!current_1||!current_1.routes)return"continue";current_1.routes.forEach(function(r){parent.set(r,el);config.push(r)})};while(config.length){var state_1=_loop_1();if(state_1==="break")break}var segments=[];var current=route;while(current){segments.unshift(current.path);current=parent.get(current)}return"/"+segments.join("/")};var __decorate$4=undefined&&undefined.__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 QuicklinkModule=function(){function QuicklinkModule(){}QuicklinkModule=__decorate$4([core.NgModule({declarations:[LinkDirective],providers:[{provide:LinkHandler,useClass:ObservableLinkHandler,multi:true},{provide:LinkHandler,useClass:PreloadLinkHandler,multi:true},PrefetchRegistry,QuicklinkStrategy],exports:[LinkDirective]})],QuicklinkModule);return QuicklinkModule}();exports.QuicklinkModule=QuicklinkModule;exports.QuicklinkStrategy=QuicklinkStrategy;Object.defineProperty(exports,"__esModule",{value:true})}); | ||
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("@angular/core"),require("@angular/router"),require("rxjs")):typeof define==="function"&&define.amd?define(["exports","@angular/core","@angular/router","rxjs"],factory):(global=global||self,factory(global.ngxql={},global.core,global.router,global.rxjs))})(this,function(exports,core,router,rxjs){"use strict";var __decorate=undefined&&undefined.__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=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var PrefetchRegistry=function(){function PrefetchRegistry(router$$1){this.router=router$$1;this.trees=[]}PrefetchRegistry.prototype.add=function(tree){this.trees.push(tree)};PrefetchRegistry.prototype.shouldPrefetch=function(url){var tree=this.router.parseUrl(url);return this.trees.some(function(child){return containsTree(child,tree)})};PrefetchRegistry=__decorate([core.Injectable(),__metadata("design:paramtypes",[router.Router])],PrefetchRegistry);return PrefetchRegistry}();function containsQueryParams(container,containee){return Object.keys(containee).length<=Object.keys(container).length&&Object.keys(containee).every(function(key){return containee[key]===container[key]})}function containsTree(container,containee){return containsQueryParams(container.queryParams,containee.queryParams)&&containsSegmentGroup(container.root,containee.root)}function containsSegmentGroup(container,containee){return containsSegmentGroupHelper(container,containee,containee.segments)}function containsSegmentGroupHelper(container,containee,containeePaths){if(container.segments.length>containeePaths.length){var current=container.segments.slice(0,containeePaths.length);if(!equalPath(current,containeePaths))return false;if(containee.hasChildren())return false;return true}else if(container.segments.length===containeePaths.length){if(!equalPath(container.segments,containeePaths))return false;for(var c in containee.children){if(!container.children[c])return false;if(!containsSegmentGroup(container.children[c],containee.children[c]))return false}return true}else{var current=containeePaths.slice(0,container.segments.length);var next=containeePaths.slice(container.segments.length);if(!equalPath(container.segments,current))return false;if(!container.children[router.PRIMARY_OUTLET])return false;return containsSegmentGroupHelper(container.children[router.PRIMARY_OUTLET],containee,next)}}function equalPath(as,bs){if(as.length!==bs.length)return false;return as.every(function(a,i){return a.path===bs[i].path})}var __decorate$1=undefined&&undefined.__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$1=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var ɵ0=function(cb){var start=Date.now();return setTimeout(function(){cb({didTimeout:false,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)},ɵ1=function(){};var requestIdleCallback=typeof window!=="undefined"?window.requestIdleCallback||ɵ0:ɵ1;var ɵ2=function(){};var cancelIdleCallback=typeof window!=="undefined"?window.cancelIdleCallback||clearTimeout:ɵ2;var observerSupported=function(){return typeof window!=="undefined"?!!window.IntersectionObserver:false};var LinkHandler=new core.InjectionToken("LinkHandler");var ObservableLinkHandler=function(){function ObservableLinkHandler(loader,queue){var _this=this;this.loader=loader;this.queue=queue;this.registerBuffer=[];this.unregisterBuffer=[];this.elementLink=new Map;this.observer=observerSupported()?new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){var link=entry.target;_this.queue.add(_this.elementLink.get(link).urlTree);_this.observer.unobserve(link);requestIdleCallback(function(){_this.loader.preload().subscribe(function(){return void 0})})}})}):null}ObservableLinkHandler.prototype.register=function(el){var _this=this;this.elementLink.set(el.element,el);cancelIdleCallback(this.registerIdle);this.registerBuffer.push(el.element);this.registerIdle=requestIdleCallback(function(){_this.registerBuffer.forEach(function(e){return _this.observer.observe(e)});_this.registerBuffer=[]})};ObservableLinkHandler.prototype.unregister=function(el){var _this=this;this.elementLink.delete(el.element);cancelIdleCallback(this.unregisterIdle);this.unregisterBuffer.push(el.element);this.unregisterIdle=requestIdleCallback(function(){_this.unregisterBuffer.forEach(function(e){return _this.observer.unobserve(e)});_this.unregisterBuffer=[]})};ObservableLinkHandler.prototype.supported=function(){return observerSupported()};ObservableLinkHandler=__decorate$1([core.Injectable(),__metadata$1("design:paramtypes",[router.RouterPreloader,PrefetchRegistry])],ObservableLinkHandler);return ObservableLinkHandler}();var PreloadLinkHandler=function(){function PreloadLinkHandler(loader,queue){this.loader=loader;this.queue=queue}PreloadLinkHandler.prototype.register=function(el){var _this=this;this.queue.add(el.urlTree);requestIdleCallback(function(){return _this.loader.preload().subscribe(function(){return void 0})})};PreloadLinkHandler.prototype.unregister=function(_){};PreloadLinkHandler.prototype.supported=function(){return true};PreloadLinkHandler=__decorate$1([core.Injectable(),__metadata$1("design:paramtypes",[router.RouterPreloader,PrefetchRegistry])],PreloadLinkHandler);return PreloadLinkHandler}();var __decorate$2=undefined&&undefined.__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$2=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var __param=undefined&&undefined.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};var LinkDirective=function(){function LinkDirective(linkHandlers,el,link,linkWithHref){this.linkHandlers=linkHandlers;this.el=el;this.linkHandler=this.linkHandlers.filter(function(h){return h.supported()}).shift();this.routerLink=link||linkWithHref}LinkDirective.prototype.ngOnInit=function(){this.linkHandler.register(this)};LinkDirective.prototype.ngOnDestroy=function(){this.linkHandler.unregister(this)};Object.defineProperty(LinkDirective.prototype,"element",{get:function(){return this.el.nativeElement},enumerable:true,configurable:true});Object.defineProperty(LinkDirective.prototype,"urlTree",{get:function(){return this.routerLink.urlTree},enumerable:true,configurable:true});LinkDirective=__decorate$2([core.Directive({selector:"[routerLink]"}),__param(0,core.Inject(LinkHandler)),__param(2,core.Optional()),__param(3,core.Optional()),__metadata$2("design:paramtypes",[Array,core.ElementRef,router.RouterLink,router.RouterLinkWithHref])],LinkDirective);return LinkDirective}();var __decorate$3=undefined&&undefined.__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$3=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)};var QuicklinkStrategy=function(){function QuicklinkStrategy(queue,router$$1){this.queue=queue;this.router=router$$1}QuicklinkStrategy.prototype.preload=function(route,load){var conn=typeof window!=="undefined"?navigator.connection:undefined;if(conn){if((conn.effectiveType||"").includes("2g")||conn.saveData)return rxjs.EMPTY}if(route.data&&!route.data.preload){return rxjs.EMPTY}var fullPath=findPath(this.router.config,route);if(this.queue.shouldPrefetch(fullPath)){return load()}return rxjs.EMPTY};QuicklinkStrategy=__decorate$3([core.Injectable(),__metadata$3("design:paramtypes",[PrefetchRegistry,router.Router])],QuicklinkStrategy);return QuicklinkStrategy}();var findPath=function(config,route){config=config.slice();var parent=new Map;var _loop_1=function(){var el=config.shift();if(el===route)return"break";var current_1=el._loadedConfig;if(!current_1||!current_1.routes)return"continue";current_1.routes.forEach(function(r){parent.set(r,el);config.push(r)})};while(config.length){var state_1=_loop_1();if(state_1==="break")break}var segments=[];var current=route;while(current){segments.unshift(current.path);current=parent.get(current)}return"/"+segments.join("/")};var __decorate$4=undefined&&undefined.__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 QuicklinkModule=function(){function QuicklinkModule(){}QuicklinkModule=__decorate$4([core.NgModule({declarations:[LinkDirective],providers:[{provide:LinkHandler,useClass:ObservableLinkHandler,multi:true},{provide:LinkHandler,useClass:PreloadLinkHandler,multi:true},PrefetchRegistry,QuicklinkStrategy],exports:[LinkDirective]})],QuicklinkModule);return QuicklinkModule}();exports.QuicklinkModule=QuicklinkModule;exports.QuicklinkStrategy=QuicklinkStrategy;Object.defineProperty(exports,"__esModule",{value:true})}); |
@@ -23,7 +23,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}, 1); | ||
}; | ||
var requestIdleCallback = window.requestIdleCallback || ɵ0; | ||
var cancelIdleCallback = window.cancelIdleCallback || clearTimeout; | ||
var observerSupported = function () { return !!window.IntersectionObserver; }; | ||
var ɵ1 = observerSupported; | ||
}, ɵ1 = function () { }; | ||
var requestIdleCallback = (typeof window !== "undefined") ? (window.requestIdleCallback || ɵ0) : ɵ1; | ||
var ɵ2 = function () { }; | ||
var cancelIdleCallback = (typeof window !== "undefined") ? (window.cancelIdleCallback || clearTimeout) : ɵ2; | ||
var observerSupported = function () { return (typeof window !== "undefined") ? !!window.IntersectionObserver : false; }; | ||
var ɵ3 = observerSupported; | ||
export var LinkHandler = new InjectionToken('LinkHandler'); | ||
@@ -69,3 +70,3 @@ var ObservableLinkHandler = /** @class */ (function () { | ||
this.unregisterIdle = requestIdleCallback(function () { | ||
_this.unregisterBuffer.forEach(function (e) { return _this.observer.observe(e); }); | ||
_this.unregisterBuffer.forEach(function (e) { return _this.observer.unobserve(e); }); | ||
_this.unregisterBuffer = []; | ||
@@ -105,3 +106,3 @@ }); | ||
export { PreloadLinkHandler }; | ||
export { ɵ0, ɵ1 }; | ||
export { ɵ0, ɵ1, ɵ2, ɵ3 }; | ||
//# sourceMappingURL=link-handler.service.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":27,"character":2},"ɵ1":{"__symbolic":"error","message":"Lambda not supported","line":40,"character":26},"LinkHandler":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":42,"character":31},"arguments":["LinkHandler"]},"ObservableLinkHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":44,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader","line":66,"character":30},{"__symbolic":"reference","module":"./prefetch-registry.service","name":"PrefetchRegistry","line":66,"character":62}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"PreloadLinkHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":93,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader","line":66,"character":30},{"__symbolic":"reference","module":"./prefetch-registry.service","name":"PrefetchRegistry","line":66,"character":62}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":27,"character":2},"ɵ1":{"__symbolic":"error","message":"Lambda not supported","line":37,"character":7},"ɵ2":{"__symbolic":"error","message":"Lambda not supported","line":39,"character":107},"ɵ3":{"__symbolic":"error","message":"Lambda not supported","line":40,"character":26},"LinkHandler":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":42,"character":31},"arguments":["LinkHandler"]},"ObservableLinkHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":44,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader","line":66,"character":30},{"__symbolic":"reference","module":"./prefetch-registry.service","name":"PrefetchRegistry","line":66,"character":62}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"PreloadLinkHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":93,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"RouterPreloader","line":66,"character":30},{"__symbolic":"reference","module":"./prefetch-registry.service","name":"PrefetchRegistry","line":66,"character":62}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}}}}] |
@@ -1,1 +0,1 @@ | ||
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbolic":"new","expression":{"__symbol":3,"members":[]},"arguments":["LinkHandler"]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":5,"members":[]},{"__symbol":6,"members":[]}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":4,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":5,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":6,"members":[]}}}}],"lifecycleHooks":[]}}},{"symbol":{"__symbol":7,"members":[]},"metadata":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":5,"members":[]},{"__symbol":6,"members":[]}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":7,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":5,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":6,"members":[]}}}}],"lifecycleHooks":[]}}}],"symbols":[{"__symbol":0,"name":"ɵ0","filePath":"./link-handler.service"},{"__symbol":1,"name":"ɵ1","filePath":"./link-handler.service"},{"__symbol":2,"name":"LinkHandler","filePath":"./link-handler.service"},{"__symbol":3,"name":"InjectionToken","filePath":"@angular/core"},{"__symbol":4,"name":"ObservableLinkHandler","filePath":"./link-handler.service"},{"__symbol":5,"name":"RouterPreloader","filePath":"@angular/router"},{"__symbol":6,"name":"PrefetchRegistry","filePath":"./prefetch-registry.service"},{"__symbol":7,"name":"PreloadLinkHandler","filePath":"./link-handler.service"}]} | ||
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":3,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"src/link-handler.service.ts"}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbolic":"new","expression":{"__symbol":5,"members":[]},"arguments":["LinkHandler"]}},{"symbol":{"__symbol":6,"members":[]},"metadata":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":7,"members":[]},{"__symbol":8,"members":[]}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":6,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":7,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":8,"members":[]}}}}],"lifecycleHooks":[]}}},{"symbol":{"__symbol":9,"members":[]},"metadata":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":7,"members":[]},{"__symbol":8,"members":[]}]}],"register":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"supported":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":9,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":7,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":8,"members":[]}}}}],"lifecycleHooks":[]}}}],"symbols":[{"__symbol":0,"name":"ɵ0","filePath":"./link-handler.service"},{"__symbol":1,"name":"ɵ1","filePath":"./link-handler.service"},{"__symbol":2,"name":"ɵ2","filePath":"./link-handler.service"},{"__symbol":3,"name":"ɵ3","filePath":"./link-handler.service"},{"__symbol":4,"name":"LinkHandler","filePath":"./link-handler.service"},{"__symbol":5,"name":"InjectionToken","filePath":"@angular/core"},{"__symbol":6,"name":"ObservableLinkHandler","filePath":"./link-handler.service"},{"__symbol":7,"name":"RouterPreloader","filePath":"@angular/router"},{"__symbol":8,"name":"PrefetchRegistry","filePath":"./prefetch-registry.service"},{"__symbol":9,"name":"PreloadLinkHandler","filePath":"./link-handler.service"}]} |
{ | ||
"name": "ngx-quicklink", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Quicklink for Angular", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,3 +20,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
QuicklinkStrategy.prototype.preload = function (route, load) { | ||
var conn = navigator.connection; | ||
var conn = (typeof window !== "undefined") ? navigator.connection : undefined; | ||
if (conn) { | ||
@@ -23,0 +23,0 @@ // Don't preload if the user is on 2G. or if Save-Data is enabled.. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65362
452