@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.
Files changed (86) hide show
  1. package/bundles/router-testing.umd.js +4 -4
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +1 -1
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +3 -3
  6. package/bundles/router-upgrade.umd.js.map +1 -1
  7. package/bundles/router-upgrade.umd.min.js +1 -1
  8. package/bundles/router-upgrade.umd.min.js.map +1 -1
  9. package/bundles/router.umd.js +56 -50
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +4 -4
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/src/config.js +2 -1
  14. package/esm2015/src/directives/router_link.js +3 -3
  15. package/esm2015/src/directives/router_link_active.js +2 -2
  16. package/esm2015/src/directives/router_outlet.js +2 -2
  17. package/esm2015/src/events.js +19 -17
  18. package/esm2015/src/interfaces.js +6 -5
  19. package/esm2015/src/route_reuse_strategy.js +2 -2
  20. package/esm2015/src/router.js +4 -3
  21. package/esm2015/src/router_config_loader.js +2 -2
  22. package/esm2015/src/router_module.js +6 -6
  23. package/esm2015/src/router_outlet_context.js +3 -3
  24. package/esm2015/src/router_preloader.js +5 -5
  25. package/esm2015/src/router_state.js +5 -5
  26. package/esm2015/src/shared.js +4 -4
  27. package/esm2015/src/url_handling_strategy.js +3 -3
  28. package/esm2015/src/url_tree.js +6 -6
  29. package/esm2015/src/utils/preactivation.js +3 -3
  30. package/esm2015/src/version.js +5 -3
  31. package/esm2015/testing/src/router_testing_module.js +4 -4
  32. package/esm2015/upgrade/src/upgrade.js +3 -3
  33. package/esm5/src/config.js +1 -1
  34. package/esm5/src/directives/router_link.js +3 -3
  35. package/esm5/src/directives/router_link_active.js +2 -2
  36. package/esm5/src/directives/router_outlet.js +2 -2
  37. package/esm5/src/events.js +19 -17
  38. package/esm5/src/interfaces.js +1 -1
  39. package/esm5/src/route_reuse_strategy.js +2 -2
  40. package/esm5/src/router.js +3 -2
  41. package/esm5/src/router_config_loader.js +2 -2
  42. package/esm5/src/router_module.js +5 -5
  43. package/esm5/src/router_outlet_context.js +3 -3
  44. package/esm5/src/router_preloader.js +5 -5
  45. package/esm5/src/router_state.js +5 -5
  46. package/esm5/src/shared.js +3 -3
  47. package/esm5/src/url_handling_strategy.js +3 -3
  48. package/esm5/src/url_tree.js +6 -6
  49. package/esm5/src/utils/preactivation.js +3 -3
  50. package/esm5/src/version.js +5 -2
  51. package/esm5/testing/src/router_testing_module.js +4 -4
  52. package/esm5/upgrade/src/upgrade.js +3 -3
  53. package/fesm2015/router.js +56 -51
  54. package/fesm2015/router.js.map +1 -1
  55. package/fesm2015/testing.js +4 -4
  56. package/fesm2015/testing.js.map +1 -1
  57. package/fesm2015/upgrade.js +3 -3
  58. package/fesm2015/upgrade.js.map +1 -1
  59. package/fesm5/router.js +56 -50
  60. package/fesm5/router.js.map +1 -1
  61. package/fesm5/testing.js +4 -4
  62. package/fesm5/testing.js.map +1 -1
  63. package/fesm5/upgrade.js +3 -3
  64. package/fesm5/upgrade.js.map +1 -1
  65. package/package.json +4 -4
  66. package/router.metadata.json +1 -1
  67. package/src/config.d.ts +9 -3
  68. package/src/directives/router_link.d.ts +2 -2
  69. package/src/directives/router_link_active.d.ts +1 -1
  70. package/src/directives/router_outlet.d.ts +1 -1
  71. package/src/events.d.ts +20 -18
  72. package/src/interfaces.d.ts +5 -4
  73. package/src/route_reuse_strategy.d.ts +2 -2
  74. package/src/router.d.ts +3 -3
  75. package/src/router_config_loader.d.ts +1 -1
  76. package/src/router_module.d.ts +6 -6
  77. package/src/router_outlet_context.d.ts +2 -2
  78. package/src/router_preloader.d.ts +4 -4
  79. package/src/router_state.d.ts +4 -4
  80. package/src/shared.d.ts +4 -4
  81. package/src/url_handling_strategy.d.ts +2 -2
  82. package/src/url_tree.d.ts +5 -5
  83. package/src/version.d.ts +3 -0
  84. package/testing/src/router_testing_module.d.ts +4 -3
  85. package/testing/testing.metadata.json +1 -1
  86. package/upgrade/src/upgrade.d.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.0.0-rc.1
2
+ * @license Angular v7.0.3
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -32,7 +32,7 @@ import { ɵgetDOM } from '@angular/platform-browser';
32
32
  * }
33
33
  * ```
34
34
  *
35
- * \@experimental
35
+ * \@publicApi
36
36
  */
37
37
  class RouterEvent {
38
38
  /**
@@ -49,7 +49,7 @@ class RouterEvent {
49
49
  *
50
50
  * Represents an event triggered when a navigation starts.
51
51
  *
52
- *
52
+ * \@publicApi
53
53
  */
54
54
  class NavigationStart extends RouterEvent {
55
55
  /**
@@ -78,7 +78,7 @@ class NavigationStart extends RouterEvent {
78
78
  *
79
79
  * Represents an event triggered when a navigation ends successfully.
80
80
  *
81
- *
81
+ * \@publicApi
82
82
  */
83
83
  class NavigationEnd extends RouterEvent {
84
84
  /**
@@ -105,7 +105,7 @@ class NavigationEnd extends RouterEvent {
105
105
  *
106
106
  * Represents an event triggered when a navigation is canceled.
107
107
  *
108
- *
108
+ * \@publicApi
109
109
  */
110
110
  class NavigationCancel extends RouterEvent {
111
111
  /**
@@ -130,7 +130,7 @@ class NavigationCancel extends RouterEvent {
130
130
  *
131
131
  * Represents an event triggered when a navigation fails due to an unexpected error.
132
132
  *
133
- *
133
+ * \@publicApi
134
134
  */
135
135
  class NavigationError extends RouterEvent {
136
136
  /**
@@ -157,7 +157,7 @@ class NavigationError extends RouterEvent {
157
157
  *
158
158
  * Represents an event triggered when routes are recognized.
159
159
  *
160
- *
160
+ * \@publicApi
161
161
  */
162
162
  class RoutesRecognized extends RouterEvent {
163
163
  /**
@@ -186,7 +186,7 @@ class RoutesRecognized extends RouterEvent {
186
186
  *
187
187
  * Represents the start of the Guard phase of routing.
188
188
  *
189
- * \@experimental
189
+ * \@publicApi
190
190
  */
191
191
  class GuardsCheckStart extends RouterEvent {
192
192
  /**
@@ -214,7 +214,7 @@ class GuardsCheckStart extends RouterEvent {
214
214
  *
215
215
  * Represents the end of the Guard phase of routing.
216
216
  *
217
- * \@experimental
217
+ * \@publicApi
218
218
  */
219
219
  class GuardsCheckEnd extends RouterEvent {
220
220
  /**
@@ -247,7 +247,7 @@ class GuardsCheckEnd extends RouterEvent {
247
247
  * in the "resolve" phase whether there's things to resolve or not. In the future this
248
248
  * behavior may change to only run when there are things to be resolved.
249
249
  *
250
- * \@experimental
250
+ * \@publicApi
251
251
  */
252
252
  class ResolveStart extends RouterEvent {
253
253
  /**
@@ -276,7 +276,7 @@ class ResolveStart extends RouterEvent {
276
276
  * Represents the end of the Resolve phase of routing. See note on
277
277
  * `ResolveStart` for use of this experimental API.
278
278
  *
279
- * \@experimental
279
+ * \@publicApi
280
280
  */
281
281
  class ResolveEnd extends RouterEvent {
282
282
  /**
@@ -304,7 +304,7 @@ class ResolveEnd extends RouterEvent {
304
304
  *
305
305
  * Represents an event triggered before lazy loading a route config.
306
306
  *
307
- * \@experimental
307
+ * \@publicApi
308
308
  */
309
309
  class RouteConfigLoadStart {
310
310
  /**
@@ -323,7 +323,7 @@ class RouteConfigLoadStart {
323
323
  *
324
324
  * Represents an event triggered when a route has been lazy loaded.
325
325
  *
326
- * \@experimental
326
+ * \@publicApi
327
327
  */
328
328
  class RouteConfigLoadEnd {
329
329
  /**
@@ -343,7 +343,7 @@ class RouteConfigLoadEnd {
343
343
  * Represents the start of end of the Resolve phase of routing. See note on
344
344
  * `ChildActivationEnd` for use of this experimental API.
345
345
  *
346
- * \@experimental
346
+ * \@publicApi
347
347
  */
348
348
  class ChildActivationStart {
349
349
  /**
@@ -367,7 +367,7 @@ class ChildActivationStart {
367
367
  * Represents the start of end of the Resolve phase of routing. See note on
368
368
  * `ChildActivationStart` for use of this experimental API.
369
369
  *
370
- * \@experimental
370
+ * \@publicApi
371
371
  */
372
372
  class ChildActivationEnd {
373
373
  /**
@@ -391,7 +391,7 @@ class ChildActivationEnd {
391
391
  * Represents the start of end of the Resolve phase of routing. See note on
392
392
  * `ActivationEnd` for use of this experimental API.
393
393
  *
394
- * \@experimental
394
+ * \@publicApi
395
395
  */
396
396
  class ActivationStart {
397
397
  /**
@@ -415,7 +415,7 @@ class ActivationStart {
415
415
  * Represents the start of end of the Resolve phase of routing. See note on
416
416
  * `ActivationStart` for use of this experimental API.
417
417
  *
418
- * \@experimental
418
+ * \@publicApi
419
419
  */
420
420
  class ActivationEnd {
421
421
  /**
@@ -437,6 +437,8 @@ class ActivationEnd {
437
437
  * \@description
438
438
  *
439
439
  * Represents a scrolling event.
440
+ *
441
+ * \@publicApi
440
442
  */
441
443
  class Scroll {
442
444
  /**
@@ -497,7 +499,7 @@ EmptyOutletComponent.decorators = [
497
499
  *
498
500
  * Name of the primary outlet.
499
501
  *
500
- *
502
+ * \@publicApi
501
503
  @type {?} */
502
504
  const PRIMARY_OUTLET = 'primary';
503
505
  class ParamsAsMap {
@@ -542,7 +544,7 @@ class ParamsAsMap {
542
544
  /**
543
545
  * Convert a `Params` instance to a `ParamMap`.
544
546
  *
545
- *
547
+ * \@publicApi
546
548
  * @param {?} params
547
549
  * @return {?}
548
550
  */
@@ -1000,7 +1002,7 @@ function containsSegmentGroupHelper(container, containee, containeePaths) {
1000
1002
  * }
1001
1003
  * ```
1002
1004
  *
1003
- *
1005
+ * \@publicApi
1004
1006
  */
1005
1007
  class UrlTree {
1006
1008
  /**
@@ -1036,7 +1038,7 @@ class UrlTree {
1036
1038
  *
1037
1039
  * See `UrlTree` for more information.
1038
1040
  *
1039
- *
1041
+ * \@publicApi
1040
1042
  */
1041
1043
  class UrlSegmentGroup {
1042
1044
  /**
@@ -1092,7 +1094,7 @@ class UrlSegmentGroup {
1092
1094
  * }
1093
1095
  * ```
1094
1096
  *
1095
- *
1097
+ * \@publicApi
1096
1098
  */
1097
1099
  class UrlSegment {
1098
1100
  /**
@@ -1167,7 +1169,7 @@ function mapChildrenIntoArray(segment, fn) {
1167
1169
  *
1168
1170
  * See `DefaultUrlSerializer` for an example of a URL serializer.
1169
1171
  *
1170
- *
1172
+ * \@publicApi
1171
1173
  * @abstract
1172
1174
  */
1173
1175
  class UrlSerializer {
@@ -1188,7 +1190,7 @@ class UrlSerializer {
1188
1190
  * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
1189
1191
  * specify route specific parameters.
1190
1192
  *
1191
- *
1193
+ * \@publicApi
1192
1194
  */
1193
1195
  class DefaultUrlSerializer {
1194
1196
  /**
@@ -1776,7 +1778,7 @@ function nodeChildrenAsMap(node) {
1776
1778
  *
1777
1779
  * See `ActivatedRoute` for more information.
1778
1780
  *
1779
- *
1781
+ * \@publicApi
1780
1782
  */
1781
1783
  class RouterState extends Tree {
1782
1784
  /**
@@ -1853,7 +1855,7 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
1853
1855
  * }
1854
1856
  * ```
1855
1857
  *
1856
- *
1858
+ * \@publicApi
1857
1859
  */
1858
1860
  class ActivatedRoute {
1859
1861
  /**
@@ -2002,7 +2004,7 @@ function flattenInherited(pathFromRoot) {
2002
2004
  * }
2003
2005
  * ```
2004
2006
  *
2005
- *
2007
+ * \@publicApi
2006
2008
  */
2007
2009
  class ActivatedRouteSnapshot {
2008
2010
  /**
@@ -2111,7 +2113,7 @@ class ActivatedRouteSnapshot {
2111
2113
  * }
2112
2114
  * ```
2113
2115
  *
2114
- *
2116
+ * \@publicApi
2115
2117
  */
2116
2118
  class RouterStateSnapshot extends Tree {
2117
2119
  /**
@@ -3724,8 +3726,8 @@ function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks
3724
3726
  }
3725
3727
  if (shouldRun) {
3726
3728
  /** @type {?} */
3727
- const outlet = /** @type {?} */ ((/** @type {?} */ ((context)).outlet));
3728
- checks.canDeactivateChecks.push(new CanDeactivate(outlet.component, curr));
3729
+ const component = context && context.outlet && context.outlet.component || null;
3730
+ checks.canDeactivateChecks.push(new CanDeactivate(component, curr));
3729
3731
  }
3730
3732
  }
3731
3733
  else {
@@ -4511,7 +4513,7 @@ function switchTap(next) {
4511
4513
  *
4512
4514
  * Provides a way to customize when activated routes get reused.
4513
4515
  *
4514
- * \@experimental
4516
+ * \@publicApi
4515
4517
  * @abstract
4516
4518
  */
4517
4519
  class RouteReuseStrategy {
@@ -4557,7 +4559,7 @@ class DefaultRouteReuseStrategy {
4557
4559
  */
4558
4560
  /** *
4559
4561
  * \@docsNotRequired
4560
- * \@experimental
4562
+ * \@publicApi
4561
4563
  @type {?} */
4562
4564
  const ROUTES = new InjectionToken('ROUTES');
4563
4565
  class RouterConfigLoader {
@@ -4630,13 +4632,13 @@ class RouterConfigLoader {
4630
4632
  *
4631
4633
  * Provides a way to migrate AngularJS applications to Angular.
4632
4634
  *
4633
- * \@experimental
4635
+ * \@publicApi
4634
4636
  * @abstract
4635
4637
  */
4636
4638
  class UrlHandlingStrategy {
4637
4639
  }
4638
4640
  /**
4639
- * \@experimental
4641
+ * \@publicApi
4640
4642
  */
4641
4643
  class DefaultUrlHandlingStrategy {
4642
4644
  /**
@@ -4695,7 +4697,7 @@ function defaultRouterHook(snapshot, runExtras) {
4695
4697
  *
4696
4698
  * \@ngModule RouterModule
4697
4699
  *
4698
- *
4700
+ * \@publicApi
4699
4701
  */
4700
4702
  class Router {
4701
4703
  /**
@@ -5006,6 +5008,7 @@ class Router {
5006
5008
  /** @type {?} */
5007
5009
  const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);
5008
5010
  eventsSubject.next(navCancel);
5011
+ t.resolve(false);
5009
5012
  /* All other errors should reset to the router's internal URL reference to the
5010
5013
  * pre-error state. */
5011
5014
  }
@@ -5517,7 +5520,7 @@ function validateCommands(commands) {
5517
5520
  *
5518
5521
  * \@ngModule RouterModule
5519
5522
  *
5520
- *
5523
+ * \@publicApi
5521
5524
  */
5522
5525
  class RouterLink {
5523
5526
  /**
@@ -5615,7 +5618,7 @@ RouterLink.propDecorators = {
5615
5618
  *
5616
5619
  * \@ngModule RouterModule
5617
5620
  *
5618
- *
5621
+ * \@publicApi
5619
5622
  */
5620
5623
  class RouterLinkWithHref {
5621
5624
  /**
@@ -5796,7 +5799,7 @@ function attrBoolValue(s) {
5796
5799
  *
5797
5800
  * \@ngModule RouterModule
5798
5801
  *
5799
- *
5802
+ * \@publicApi
5800
5803
  */
5801
5804
  class RouterLinkActive {
5802
5805
  /**
@@ -5916,7 +5919,7 @@ RouterLinkActive.propDecorators = {
5916
5919
  /**
5917
5920
  * Store contextual information about a `RouterOutlet`
5918
5921
  *
5919
- *
5922
+ * \@publicApi
5920
5923
  */
5921
5924
  class OutletContext {
5922
5925
  constructor() {
@@ -5930,7 +5933,7 @@ class OutletContext {
5930
5933
  /**
5931
5934
  * Store contextual information about the children (= nested) `RouterOutlet`
5932
5935
  *
5933
- *
5936
+ * \@publicApi
5934
5937
  */
5935
5938
  class ChildrenOutletContexts {
5936
5939
  constructor() {
@@ -6023,7 +6026,7 @@ class ChildrenOutletContexts {
6023
6026
  * ```
6024
6027
  * \@ngModule RouterModule
6025
6028
  *
6026
- *
6029
+ * \@publicApi
6027
6030
  */
6028
6031
  class RouterOutlet {
6029
6032
  /**
@@ -6214,7 +6217,7 @@ class OutletInjector {
6214
6217
  *
6215
6218
  * Provides a preloading strategy.
6216
6219
  *
6217
- * \@experimental
6220
+ * \@publicApi
6218
6221
  * @abstract
6219
6222
  */
6220
6223
  class PreloadingStrategy {
@@ -6228,7 +6231,7 @@ class PreloadingStrategy {
6228
6231
  * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
6229
6232
  * ```
6230
6233
  *
6231
- * \@experimental
6234
+ * \@publicApi
6232
6235
  */
6233
6236
  class PreloadAllModules {
6234
6237
  /**
@@ -6247,7 +6250,7 @@ class PreloadAllModules {
6247
6250
  *
6248
6251
  * This strategy is enabled by default.
6249
6252
  *
6250
- * \@experimental
6253
+ * \@publicApi
6251
6254
  */
6252
6255
  class NoPreloading {
6253
6256
  /**
@@ -6267,7 +6270,7 @@ class NoPreloading {
6267
6270
  *
6268
6271
  * If a route is protected by `canLoad` guards, the preloaded will not load it.
6269
6272
  *
6270
- *
6273
+ * \@publicApi
6271
6274
  */
6272
6275
  class RouterPreloader {
6273
6276
  /**
@@ -6479,7 +6482,7 @@ const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterL
6479
6482
  *
6480
6483
  * Is used in DI to configure the router.
6481
6484
  *
6482
- *
6485
+ * \@publicApi
6483
6486
  @type {?} */
6484
6487
  const ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');
6485
6488
  /** *
@@ -6562,7 +6565,7 @@ function routerNgProbeToken() {
6562
6565
  * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an
6563
6566
  * overview of how the router should be used.
6564
6567
  *
6565
- *
6568
+ * \@publicApi
6566
6569
  */
6567
6570
  class RouterModule {
6568
6571
  /**
@@ -6692,7 +6695,7 @@ function provideForRootGuard(router) {
6692
6695
  * class MyNgModule {}
6693
6696
  * ```
6694
6697
  *
6695
- *
6698
+ * \@publicApi
6696
6699
  * @param {?} routes
6697
6700
  * @return {?}
6698
6701
  */
@@ -6895,7 +6898,7 @@ function getBootstrapListener(r) {
6895
6898
  /** *
6896
6899
  * A token for the router initializer that will be called after the app is bootstrapped.
6897
6900
  *
6898
- * \@experimental
6901
+ * \@publicApi
6899
6902
  @type {?} */
6900
6903
  const ROUTER_INITIALIZER = new InjectionToken('Router Initializer');
6901
6904
  /**
@@ -6919,8 +6922,10 @@ function provideRouterInitializer() {
6919
6922
  * @fileoverview added by tsickle
6920
6923
  * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
6921
6924
  */
6922
- /** @type {?} */
6923
- const VERSION = new Version('7.0.0-rc.1');
6925
+ /** *
6926
+ * \@publicApi
6927
+ @type {?} */
6928
+ const VERSION = new Version('7.0.3');
6924
6929
 
6925
6930
  /**
6926
6931
  * @fileoverview added by tsickle