@angular/router 8.0.0-rc.3 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.0.0-rc.3
2
+ * @license Angular v8.0.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -24,7 +24,7 @@
24
24
  *
25
25
  * Use of this source code is governed by an MIT-style license that can be
26
26
  * found in the LICENSE file at https://angular.io/license
27
- */function G(t,e){var r,n=Object.keys(t),o=Object.keys(e);if(n.length!=o.length)return!1;for(var i=0;i<n.length;i++)if(t[r=n[i]]!==e[r])return!1;return!0}function W(t){return Array.prototype.concat.apply([],t)}function Q(t){return t.length>0?t[t.length-1]:null}function V(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function Z(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
27
+ */function G(t,e){var r,n=Object.keys(t),o=Object.keys(e);if(!n||!o||n.length!=o.length)return!1;for(var i=0;i<n.length;i++)if(t[r=n[i]]!==e[r])return!1;return!0}function W(t){return Array.prototype.concat.apply([],t)}function Q(t){return t.length>0?t[t.length-1]:null}function V(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function Z(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
28
28
  /**
29
29
  * @license
30
30
  * Copyright Google Inc. All Rights Reserved.
@@ -147,7 +147,7 @@ function Te(t){throw t}function Ee(t,e,r){return e.parse("/")}function je(t,e){r
147
147
  *
148
148
  * Use of this source code is governed by an MIT-style license that can be
149
149
  * found in the LICENSE file at https://angular.io/license
150
- */(r.value);return i=r.children.map(function(r){return t(e,r)}),new St(c,i)}(t,e._root,r?r._root:void 0);return new bt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:r})}),o.tap(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},o.map(function(t){return new Ft(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),o.tap({next:function(){c=!0},complete:function(){c=!0}}),o.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null}),o.catchError(function(o){if(l=!0,function i(t){return t&&t[M]}(o)){var a=Wt(o.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new y(t.id,e.serializeUrl(t.extractedUrl),o.message);r.next(u),t.resolve(!1),a&&e.navigateByUrl(o.url)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new S(t.id,e.serializeUrl(t.extractedUrl),o);r.next(s);try{t.resolve(e.errorHandler(o))}catch(e){t.reject(e)}}return n.EMPTY}))}))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){return this.transitions.value},t.prototype.setTransition=function(t){this.transitions.next(s({},this.getTransition(),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?e.state:null;setTimeout(function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t.map(B),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,o=e.queryParams,i=e.fragment,a=e.preserveQueryParams,u=e.queryParamsHandling,c=e.preserveFragment;r.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,p=c?this.currentUrlTree.fragment:i,h=null;if(u)switch(u){case"merge":h=s({},this.currentUrlTree.queryParams,o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}else h=a?this.currentUrlTree.queryParams:o||null;return null!==h&&(h=this.removeEmptyProps(h)),function f(t,e,r,n,o){if(0===r.length)return jt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new It(!0,0,t);var e=0,r=!1,n=t.reduce(function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return V(n.outlets,function(t,e){i[e]="string"==typeof t?t.split("/"):t}),d(t,[{outlets:i}])}if(n.segmentPath)return d(t,[n.segmentPath])}return"string"!=typeof n?d(t,[n]):0===o?(n.split("/").forEach(function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))}),t):d(t,[n])},[]);return new It(r,e,n)}(r);if(i.toRoot())return jt(e.root,new K([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new kt(r.snapshot._urlSegment,!0,0);var n=Et(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new kt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Nt(u.segmentGroup,u.index,i.commands):Mt(u.segmentGroup,u.index,i.commands);return jt(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),r.isDevMode()&&this.isNgZoneEnabled&&!r.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
150
+ */(r.value);return i=r.children.map(function(r){return t(e,r)}),new St(c,i)}(t,e._root,r?r._root:void 0);return new bt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:r})}),o.tap(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},o.map(function(t){return new Ft(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),o.tap({next:function(){c=!0},complete:function(){c=!0}}),o.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null}),o.catchError(function(o){if(l=!0,function i(t){return t&&t[M]}(o)){var a=Wt(o.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new y(t.id,e.serializeUrl(t.extractedUrl),o.message);r.next(u),t.resolve(!1),a&&e.navigateByUrl(o.url)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new S(t.id,e.serializeUrl(t.extractedUrl),o);r.next(s);try{t.resolve(e.errorHandler(o))}catch(e){t.reject(e)}}return n.EMPTY}))}))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t},t.prototype.setTransition=function(t){this.transitions.next(s({},this.getTransition(),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?e.state:null;setTimeout(function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t.map(B),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,o=e.queryParams,i=e.fragment,a=e.preserveQueryParams,u=e.queryParamsHandling,c=e.preserveFragment;r.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,p=c?this.currentUrlTree.fragment:i,h=null;if(u)switch(u){case"merge":h=s({},this.currentUrlTree.queryParams,o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}else h=a?this.currentUrlTree.queryParams:o||null;return null!==h&&(h=this.removeEmptyProps(h)),function f(t,e,r,n,o){if(0===r.length)return jt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new It(!0,0,t);var e=0,r=!1,n=t.reduce(function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return V(n.outlets,function(t,e){i[e]="string"==typeof t?t.split("/"):t}),d(t,[{outlets:i}])}if(n.segmentPath)return d(t,[n.segmentPath])}return"string"!=typeof n?d(t,[n]):0===o?(n.split("/").forEach(function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))}),t):d(t,[n])},[]);return new It(r,e,n)}(r);if(i.toRoot())return jt(e.root,new K([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new kt(r.snapshot._urlSegment,!0,0);var n=Et(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new kt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Nt(u.segmentGroup,u.index,i.commands):Mt(u.segmentGroup,u.index,i.commands);return jt(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),r.isDevMode()&&this.isNgZoneEnabled&&!r.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
151
151
  /**
152
152
  * @license
153
153
  * Copyright Google Inc. All Rights Reserved.
@@ -175,7 +175,7 @@ function Te(t){throw t}function Ee(t,e,r){return e.parse("/")}function je(t,e){r
175
175
  *
176
176
  * Use of this source code is governed by an MIT-style license that can be
177
177
  * found in the LICENSE file at https://angular.io/license
178
- */var lr=new r.Version("8.0.0-rc.3");
178
+ */var lr=new r.Version("8.0.1");
179
179
  /**
180
180
  * @license
181
181
  * Copyright Google Inc. All Rights Reserved.