@angular/router 7.0.0-rc.1 → 7.0.3
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.
- package/bundles/router-testing.umd.js +4 -4
- package/bundles/router-testing.umd.js.map +1 -1
- package/bundles/router-testing.umd.min.js +1 -1
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +3 -3
- package/bundles/router-upgrade.umd.js.map +1 -1
- package/bundles/router-upgrade.umd.min.js +1 -1
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +56 -50
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +4 -4
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/src/config.js +2 -1
- package/esm2015/src/directives/router_link.js +3 -3
- package/esm2015/src/directives/router_link_active.js +2 -2
- package/esm2015/src/directives/router_outlet.js +2 -2
- package/esm2015/src/events.js +19 -17
- package/esm2015/src/interfaces.js +6 -5
- package/esm2015/src/route_reuse_strategy.js +2 -2
- package/esm2015/src/router.js +4 -3
- package/esm2015/src/router_config_loader.js +2 -2
- package/esm2015/src/router_module.js +6 -6
- package/esm2015/src/router_outlet_context.js +3 -3
- package/esm2015/src/router_preloader.js +5 -5
- package/esm2015/src/router_state.js +5 -5
- package/esm2015/src/shared.js +4 -4
- package/esm2015/src/url_handling_strategy.js +3 -3
- package/esm2015/src/url_tree.js +6 -6
- package/esm2015/src/utils/preactivation.js +3 -3
- package/esm2015/src/version.js +5 -3
- package/esm2015/testing/src/router_testing_module.js +4 -4
- package/esm2015/upgrade/src/upgrade.js +3 -3
- package/esm5/src/config.js +1 -1
- package/esm5/src/directives/router_link.js +3 -3
- package/esm5/src/directives/router_link_active.js +2 -2
- package/esm5/src/directives/router_outlet.js +2 -2
- package/esm5/src/events.js +19 -17
- package/esm5/src/interfaces.js +1 -1
- package/esm5/src/route_reuse_strategy.js +2 -2
- package/esm5/src/router.js +3 -2
- package/esm5/src/router_config_loader.js +2 -2
- package/esm5/src/router_module.js +5 -5
- package/esm5/src/router_outlet_context.js +3 -3
- package/esm5/src/router_preloader.js +5 -5
- package/esm5/src/router_state.js +5 -5
- package/esm5/src/shared.js +3 -3
- package/esm5/src/url_handling_strategy.js +3 -3
- package/esm5/src/url_tree.js +6 -6
- package/esm5/src/utils/preactivation.js +3 -3
- package/esm5/src/version.js +5 -2
- package/esm5/testing/src/router_testing_module.js +4 -4
- package/esm5/upgrade/src/upgrade.js +3 -3
- package/fesm2015/router.js +56 -51
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +4 -4
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/upgrade.js +3 -3
- package/fesm2015/upgrade.js.map +1 -1
- package/fesm5/router.js +56 -50
- package/fesm5/router.js.map +1 -1
- package/fesm5/testing.js +4 -4
- package/fesm5/testing.js.map +1 -1
- package/fesm5/upgrade.js +3 -3
- package/fesm5/upgrade.js.map +1 -1
- package/package.json +4 -4
- package/router.metadata.json +1 -1
- package/src/config.d.ts +9 -3
- package/src/directives/router_link.d.ts +2 -2
- package/src/directives/router_link_active.d.ts +1 -1
- package/src/directives/router_outlet.d.ts +1 -1
- package/src/events.d.ts +20 -18
- package/src/interfaces.d.ts +5 -4
- package/src/route_reuse_strategy.d.ts +2 -2
- package/src/router.d.ts +3 -3
- package/src/router_config_loader.d.ts +1 -1
- package/src/router_module.d.ts +6 -6
- package/src/router_outlet_context.d.ts +2 -2
- package/src/router_preloader.d.ts +4 -4
- package/src/router_state.d.ts +4 -4
- package/src/shared.d.ts +4 -4
- package/src/url_handling_strategy.d.ts +2 -2
- package/src/url_tree.d.ts +5 -5
- package/src/version.d.ts +3 -0
- package/testing/src/router_testing_module.d.ts +4 -3
- package/testing/testing.metadata.json +1 -1
- package/upgrade/src/upgrade.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.0.
|
|
2
|
+
* @license Angular v7.0.3
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -125,14 +125,14 @@ function we(t){throw t}function be(t,e,r){return e.parse("/")}function Ce(t,e){r
|
|
|
125
125
|
*
|
|
126
126
|
* Use of this source code is governed by an MIT-style license that can be
|
|
127
127
|
* found in the LICENSE file at https://angular.io/license
|
|
128
|
-
*/(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy),n.tap(function(t){var r=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);o.next(r)}));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.state,h=t.extras,f=new v(t.id,e.serializeUrl(c),l,p);o.next(f);var d=bt(c,e.rootComponentType).snapshot;return r.of(s({},t,{targetSnapshot:d,urlAfterRedirects:c,extras:s({},h,{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,t.resolve(null),r.EMPTY}),fe(function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.tap(function(t){var r=new b(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),n.map(function(t){return s({},t,{guards:function r(t,e,n){var o=t._root;return function t(e,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=St(r);return e.children.forEach(function(e){!function r(e,n,o,i,a){void 0===a&&(a={canDeactivateChecks:[],canActivateChecks:[]});var u=e.value,s=n?n.value:null,c=o?o.getContext(e.value.outlet):null;if(s&&u.routeConfig===s.routeConfig){var l=function p(t,e,r){switch(r){case"always":return!0;case"paramsOrQueryParamsChange":return!At(t,e)||!F(t.queryParams,e.queryParams);case"paramsChange":default:return!At(t,e)}}(s,u,u.routeConfig.runGuardsAndResolvers);l?a.canActivateChecks.push(new Xt(i)):(u.data=s.data,u._resolvedData=s._resolvedData),t(e,n,u.component?c?c.children:null:o,i,a),l&&a.canDeactivateChecks.push(new te(c.outlet.component,s))}else s&&re(n,c,a),a.canActivateChecks.push(new Xt(i)),t(e,null,u.component?c?c.children:null:o,i,a)}(e,a[e.value.outlet],n,o.concat([e.value]),i),delete a[e.value.outlet]}),W(a,function(t,e){return re(t,n.getContext(e),i)}),i}(o,e?e._root:null,n,[o.value])}(t.targetSnapshot,t.currentSnapshot,e.rootContexts)})}),function p(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.currentSnapshot,u=o.guards,c=u.canActivateChecks,l=u.canDeactivateChecks;return 0===l.length&&0===c.length?r.of(s({},o,{guardsResult:!0})):function p(t,e,o,i){return r.from(t).pipe(n.mergeMap(function(t){return function a(t,e,o,i,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?r.from(s).pipe(n.mergeMap(function(r){var a=ee(r,e,u);return V(a.canDeactivate?a.canDeactivate(t,e,o,i):a(t,e,o,i)).pipe(n.first())})).pipe(n.every(function(t){return!0===t})):r.of(!0)}(t.component,t.route,o,e,i)}),n.every(function(t){return!0===t}))}(l,i,a,t).pipe(n.mergeMap(function(o){return o?function a(t,e,o,i){return r.from(e).pipe(n.concatMap(function(e){return Q(r.from([function a(t,e){return null!==t&&e&&e(new _(t)),r.of(!0)}(e.route.parent,i),function u(t,e){return null!==t&&e&&e(new A(t)),r.of(!0)}(e.route,i),function s(t,e,o){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t});return Q(r.from(a).pipe(n.map(function(e){return Q(r.from(e.guards).pipe(n.map(function(r){var a=ee(r,e.node,o);return V(a.canActivateChild?a.canActivateChild(i,t):a(i,t)).pipe(n.first())})))})))}(t,e.path,o),function c(t,e,o){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Q(r.from(i).pipe(n.map(function(r){var i=ee(r,e,o);return V(i.canActivate?i.canActivate(e,t):i(e,t)).pipe(n.first())}))):r.of(!0)}(t,e.route,o)]))}),n.every(function(t){return!0===t}))}(i,c,t,e):r.of(!1)}),n.map(function(t){return s({},o,{guardsResult:t})}))}))}}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),n.tap(function(t){var r=new C(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)}),n.filter(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"");return o.next(r),t.resolve(!1),!1}return!0}),fe(function(t){if(t.guards.canActivateChecks.length)return r.of(t).pipe(n.tap(function(t){var r=new R(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),function o(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.guards.canActivateChecks;return a.length?r.from(a).pipe(n.concatMap(function(o){return function a(t,e,o,i){return function a(t,e,o,i){var a=Object.keys(t);if(0===a.length)return r.of({});if(1===a.length){var u=a[0];return he(t[u],e,o,i).pipe(n.map(function(t){var e;return(e={})[u]=t,e}))}var s={};return r.from(a).pipe(n.mergeMap(function(r){return he(t[r],e,o,i).pipe(n.map(function(t){return s[r]=t,t}))})).pipe(n.last(),n.map(function(){return s}))}(t._resolve,t,e,i).pipe(n.map(function(e){return t._resolvedData=e,t.data=s({},t.data,Rt(t,o).resolve),null}))}(o.route,i,t,e)}),n.reduce(function(t,e){return t}),n.map(function(t){return o})):r.of(o)}))}}(e.paramsInheritanceStrategy,e.ngModule.injector),n.tap(function(t){var r=new P(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}))}),fe(function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.map(function(t){var n=function o(t,e,n){var o=function t(e,n,o){if(o&&e.shouldReuseRoute(n.value,o.value.snapshot)){(c=o.value)._futureSnapshot=n.value;var i=function a(e,r,n){return r.children.map(function(r){var o,i;try{for(var a=h(n.children),u=a.next();!u.done;u=a.next()){var s=u.value;if(e.shouldReuseRoute(s.value.snapshot,r.value))return t(e,r,s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)})}(e,n,o);return new yt(c,i)}var u=e.retrieve(n.value);if(u){var s=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(n,s),s}var c=function l(t){return new Ct(new r.BehaviorSubject(t.url),new r.BehaviorSubject(t.params),new r.BehaviorSubject(t.queryParams),new r.BehaviorSubject(t.fragment),new r.BehaviorSubject(t.data),t.outlet,t.component,t)}
|
|
128
|
+
*/(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy),n.tap(function(t){var r=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);o.next(r)}));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.state,h=t.extras,f=new v(t.id,e.serializeUrl(c),l,p);o.next(f);var d=bt(c,e.rootComponentType).snapshot;return r.of(s({},t,{targetSnapshot:d,urlAfterRedirects:c,extras:s({},h,{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,t.resolve(null),r.EMPTY}),fe(function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.tap(function(t){var r=new b(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),n.map(function(t){return s({},t,{guards:function r(t,e,n){var o=t._root;return function t(e,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=St(r);return e.children.forEach(function(e){!function r(e,n,o,i,a){void 0===a&&(a={canDeactivateChecks:[],canActivateChecks:[]});var u=e.value,s=n?n.value:null,c=o?o.getContext(e.value.outlet):null;if(s&&u.routeConfig===s.routeConfig){var l=function p(t,e,r){switch(r){case"always":return!0;case"paramsOrQueryParamsChange":return!At(t,e)||!F(t.queryParams,e.queryParams);case"paramsChange":default:return!At(t,e)}}(s,u,u.routeConfig.runGuardsAndResolvers);l?a.canActivateChecks.push(new Xt(i)):(u.data=s.data,u._resolvedData=s._resolvedData),t(e,n,u.component?c?c.children:null:o,i,a),l&&a.canDeactivateChecks.push(new te(c&&c.outlet&&c.outlet.component||null,s))}else s&&re(n,c,a),a.canActivateChecks.push(new Xt(i)),t(e,null,u.component?c?c.children:null:o,i,a)}(e,a[e.value.outlet],n,o.concat([e.value]),i),delete a[e.value.outlet]}),W(a,function(t,e){return re(t,n.getContext(e),i)}),i}(o,e?e._root:null,n,[o.value])}(t.targetSnapshot,t.currentSnapshot,e.rootContexts)})}),function p(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.currentSnapshot,u=o.guards,c=u.canActivateChecks,l=u.canDeactivateChecks;return 0===l.length&&0===c.length?r.of(s({},o,{guardsResult:!0})):function p(t,e,o,i){return r.from(t).pipe(n.mergeMap(function(t){return function a(t,e,o,i,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?r.from(s).pipe(n.mergeMap(function(r){var a=ee(r,e,u);return V(a.canDeactivate?a.canDeactivate(t,e,o,i):a(t,e,o,i)).pipe(n.first())})).pipe(n.every(function(t){return!0===t})):r.of(!0)}(t.component,t.route,o,e,i)}),n.every(function(t){return!0===t}))}(l,i,a,t).pipe(n.mergeMap(function(o){return o?function a(t,e,o,i){return r.from(e).pipe(n.concatMap(function(e){return Q(r.from([function a(t,e){return null!==t&&e&&e(new _(t)),r.of(!0)}(e.route.parent,i),function u(t,e){return null!==t&&e&&e(new A(t)),r.of(!0)}(e.route,i),function s(t,e,o){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t});return Q(r.from(a).pipe(n.map(function(e){return Q(r.from(e.guards).pipe(n.map(function(r){var a=ee(r,e.node,o);return V(a.canActivateChild?a.canActivateChild(i,t):a(i,t)).pipe(n.first())})))})))}(t,e.path,o),function c(t,e,o){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Q(r.from(i).pipe(n.map(function(r){var i=ee(r,e,o);return V(i.canActivate?i.canActivate(e,t):i(e,t)).pipe(n.first())}))):r.of(!0)}(t,e.route,o)]))}),n.every(function(t){return!0===t}))}(i,c,t,e):r.of(!1)}),n.map(function(t){return s({},o,{guardsResult:t})}))}))}}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),n.tap(function(t){var r=new C(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)}),n.filter(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"");return o.next(r),t.resolve(!1),!1}return!0}),fe(function(t){if(t.guards.canActivateChecks.length)return r.of(t).pipe(n.tap(function(t){var r=new R(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),function o(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.guards.canActivateChecks;return a.length?r.from(a).pipe(n.concatMap(function(o){return function a(t,e,o,i){return function a(t,e,o,i){var a=Object.keys(t);if(0===a.length)return r.of({});if(1===a.length){var u=a[0];return he(t[u],e,o,i).pipe(n.map(function(t){var e;return(e={})[u]=t,e}))}var s={};return r.from(a).pipe(n.mergeMap(function(r){return he(t[r],e,o,i).pipe(n.map(function(t){return s[r]=t,t}))})).pipe(n.last(),n.map(function(){return s}))}(t._resolve,t,e,i).pipe(n.map(function(e){return t._resolvedData=e,t.data=s({},t.data,Rt(t,o).resolve),null}))}(o.route,i,t,e)}),n.reduce(function(t,e){return t}),n.map(function(t){return o})):r.of(o)}))}}(e.paramsInheritanceStrategy,e.ngModule.injector),n.tap(function(t){var r=new P(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}))}),fe(function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.map(function(t){var n=function o(t,e,n){var o=function t(e,n,o){if(o&&e.shouldReuseRoute(n.value,o.value.snapshot)){(c=o.value)._futureSnapshot=n.value;var i=function a(e,r,n){return r.children.map(function(r){var o,i;try{for(var a=h(n.children),u=a.next();!u.done;u=a.next()){var s=u.value;if(e.shouldReuseRoute(s.value.snapshot,r.value))return t(e,r,s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)})}(e,n,o);return new yt(c,i)}var u=e.retrieve(n.value);if(u){var s=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(n,s),s}var c=function l(t){return new Ct(new r.BehaviorSubject(t.url),new r.BehaviorSubject(t.params),new r.BehaviorSubject(t.queryParams),new r.BehaviorSubject(t.fragment),new r.BehaviorSubject(t.data),t.outlet,t.component,t)}
|
|
129
129
|
/**
|
|
130
130
|
* @license
|
|
131
131
|
* Copyright Google Inc. All Rights Reserved.
|
|
132
132
|
*
|
|
133
133
|
* Use of this source code is governed by an MIT-style license that can be
|
|
134
134
|
* found in the LICENSE file at https://angular.io/license
|
|
135
|
-
*/(n.value);return i=n.children.map(function(r){return t(e,r)}),new yt(c,i)}(t,e._root,n?n._root:void 0);return new wt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:n})}),n.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)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},n.map(function(t){return new Ht(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),n.tap({next:function(){c=!0},complete:function(){c=!0}}),n.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);o.next(r),t.resolve(!1)}}),n.catchError(function(n){if(l=!0,function i(t){return t&&t.ngNavigationCancelingError}(n)){e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var a=new y(t.id,e.serializeUrl(t.extractedUrl),n.message);o.next(a)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var u=new S(t.id,e.serializeUrl(t.extractedUrl),n);o.next(u);try{t.resolve(e.errorHandler(n))}catch(e){t.reject(e)}}return r.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?{navigationId:e.state.navigationId}: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.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){q(t),this.config=t.map(H),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,r){void 0===r&&(r={});var n=r.relativeTo,o=r.queryParams,i=r.fragment,a=r.preserveQueryParams,u=r.queryParamsHandling,c=r.preserveFragment;e.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 Et(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new jt(!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 W(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 jt(r,e,n)}(r);if(i.toRoot())return Et(e.root,new $([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new It(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new It(r.snapshot._urlSegment,!0,0);var n=Tt(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 It(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Mt(u.segmentGroup,u.index,i.commands):Lt(u.segmentGroup,u.index,i.commands);return Et(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,r){void 0===r&&(r={skipLocationChange:!1}),e.isDevMode()&&this.isNgZoneEnabled&&!e.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=t instanceof Y?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)},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)}}
|
|
135
|
+
*/(n.value);return i=n.children.map(function(r){return t(e,r)}),new yt(c,i)}(t,e._root,n?n._root:void 0);return new wt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:n})}),n.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)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},n.map(function(t){return new Ht(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),n.tap({next:function(){c=!0},complete:function(){c=!0}}),n.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);o.next(r),t.resolve(!1)}}),n.catchError(function(n){if(l=!0,function i(t){return t&&t.ngNavigationCancelingError}(n)){e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var a=new y(t.id,e.serializeUrl(t.extractedUrl),n.message);o.next(a),t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var u=new S(t.id,e.serializeUrl(t.extractedUrl),n);o.next(u);try{t.resolve(e.errorHandler(n))}catch(e){t.reject(e)}}return r.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?{navigationId:e.state.navigationId}: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.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){q(t),this.config=t.map(H),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,r){void 0===r&&(r={});var n=r.relativeTo,o=r.queryParams,i=r.fragment,a=r.preserveQueryParams,u=r.queryParamsHandling,c=r.preserveFragment;e.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 Et(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new jt(!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 W(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 jt(r,e,n)}(r);if(i.toRoot())return Et(e.root,new $([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new It(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new It(r.snapshot._urlSegment,!0,0);var n=Tt(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 It(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Mt(u.segmentGroup,u.index,i.commands):Lt(u.segmentGroup,u.index,i.commands);return Et(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,r){void 0===r&&(r={skipLocationChange:!1}),e.isDevMode()&&this.isNgZoneEnabled&&!e.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=t instanceof Y?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)},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)}}
|
|
136
136
|
/**
|
|
137
137
|
* @license
|
|
138
138
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -160,7 +160,7 @@ function we(t){throw t}function be(t,e,r){return e.parse("/")}function Ce(t,e){r
|
|
|
160
160
|
*
|
|
161
161
|
* Use of this source code is governed by an MIT-style license that can be
|
|
162
162
|
* found in the LICENSE file at https://angular.io/license
|
|
163
|
-
*/var tr=new e.Version("7.0.
|
|
163
|
+
*/var tr=new e.Version("7.0.3");
|
|
164
164
|
/**
|
|
165
165
|
* @license
|
|
166
166
|
* Copyright Google Inc. All Rights Reserved.
|