@angular/router 15.0.2 → 15.1.0-next.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.
Files changed (35) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/directives/router_link.mjs +3 -3
  3. package/esm2020/src/directives/router_link_active.mjs +3 -3
  4. package/esm2020/src/directives/router_outlet.mjs +3 -3
  5. package/esm2020/src/events.mjs +34 -1
  6. package/esm2020/src/index.mjs +2 -2
  7. package/esm2020/src/models.mjs +1 -1
  8. package/esm2020/src/navigation_transition.mjs +44 -35
  9. package/esm2020/src/page_title_strategy.mjs +6 -6
  10. package/esm2020/src/route_reuse_strategy.mjs +6 -6
  11. package/esm2020/src/router.mjs +38 -13
  12. package/esm2020/src/router_config.mjs +1 -1
  13. package/esm2020/src/router_config_loader.mjs +3 -3
  14. package/esm2020/src/router_module.mjs +4 -4
  15. package/esm2020/src/router_outlet_context.mjs +3 -3
  16. package/esm2020/src/router_preloader.mjs +9 -9
  17. package/esm2020/src/router_scroller.mjs +3 -3
  18. package/esm2020/src/url_handling_strategy.mjs +6 -6
  19. package/esm2020/src/url_tree.mjs +3 -3
  20. package/esm2020/src/version.mjs +1 -1
  21. package/esm2020/testing/src/router_testing_module.mjs +8 -54
  22. package/fesm2015/router.mjs +166 -98
  23. package/fesm2015/router.mjs.map +1 -1
  24. package/fesm2015/testing.mjs +9 -55
  25. package/fesm2015/testing.mjs.map +1 -1
  26. package/fesm2015/upgrade.mjs +1 -1
  27. package/fesm2020/router.mjs +170 -103
  28. package/fesm2020/router.mjs.map +1 -1
  29. package/fesm2020/testing.mjs +9 -55
  30. package/fesm2020/testing.mjs.map +1 -1
  31. package/fesm2020/upgrade.mjs +1 -1
  32. package/index.d.ts +156 -23
  33. package/package.json +4 -4
  34. package/testing/index.d.ts +2 -7
  35. package/upgrade/index.d.ts +1 -1
@@ -1,14 +1,13 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { Location } from '@angular/common';
8
7
  import { provideLocationMocks } from '@angular/common/testing';
9
8
  import * as i0 from '@angular/core';
10
- import { Compiler, Injector, Optional, NgModule } from '@angular/core';
11
- import { Router, ɵflatten, ɵassignExtraOptionsToRouter, ROUTES, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, TitleStrategy, UrlHandlingStrategy, RouteReuseStrategy, ɵwithPreloading, NoPreloading } from '@angular/router';
9
+ import { NgModule } from '@angular/core';
10
+ import { Router, ɵflatten, ɵassignExtraOptionsToRouter, ROUTES, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, ɵwithPreloading, NoPreloading } from '@angular/router';
12
11
 
13
12
  /**
14
13
  * @license
@@ -20,29 +19,16 @@ import { Router, ɵflatten, ɵassignExtraOptionsToRouter, ROUTES, ROUTER_CONFIGU
20
19
  // This file exists to easily patch the SpyNgModuleFactoryLoader into g3
21
20
  const EXTRA_ROUTER_TESTING_PROVIDERS = [];
22
21
 
23
- /**
24
- * @license
25
- * Copyright Google LLC All Rights Reserved.
26
- *
27
- * Use of this source code is governed by an MIT-style license that can be
28
- * found in the LICENSE file at https://angular.io/license
29
- */
30
22
  function isUrlHandlingStrategy(opts) {
31
23
  // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at
32
24
  // runtime.
33
25
  return 'shouldProcessUrl' in opts;
34
26
  }
35
- /**
36
- * Router setup factory function used for testing. Only used internally to keep the factory that's
37
- * marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).
38
- */
39
- function setupTestingRouterInternal(urlSerializer, contexts, location, compiler, injector, routes, titleStrategy, opts, urlHandlingStrategy, routeReuseStrategy) {
40
- return setupTestingRouter(urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy, routeReuseStrategy, titleStrategy);
41
- }
42
27
  /**
43
28
  * Router setup factory function used for testing.
44
29
  *
45
30
  * @publicApi
31
+ * @deprecated Use `provideRouter` or `RouterTestingModule` instead.
46
32
  */
47
33
  function setupTestingRouter(urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy, routeReuseStrategy, titleStrategy) {
48
34
  const router = new Router(null, urlSerializer, contexts, location, injector, compiler, ɵflatten(routes));
@@ -101,32 +87,16 @@ class RouterTestingModule {
101
87
  };
102
88
  }
103
89
  }
104
- RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
- RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
106
- RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, providers: [
90
+ RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
91
+ RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
92
+ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterTestingModule, providers: [
107
93
  ɵROUTER_PROVIDERS,
108
94
  EXTRA_ROUTER_TESTING_PROVIDERS,
109
95
  provideLocationMocks(),
110
- {
111
- provide: Router,
112
- useFactory: setupTestingRouterInternal,
113
- deps: [
114
- UrlSerializer,
115
- ChildrenOutletContexts,
116
- Location,
117
- Compiler,
118
- Injector,
119
- ROUTES,
120
- TitleStrategy,
121
- ROUTER_CONFIGURATION,
122
- [UrlHandlingStrategy, new Optional()],
123
- [RouteReuseStrategy, new Optional()],
124
- ]
125
- },
126
96
  ɵwithPreloading(NoPreloading).ɵproviders,
127
97
  { provide: ROUTES, multi: true, useValue: [] },
128
98
  ], imports: [RouterModule] });
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RouterTestingModule, decorators: [{
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterTestingModule, decorators: [{
130
100
  type: NgModule,
131
101
  args: [{
132
102
  exports: [RouterModule],
@@ -134,22 +104,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
134
104
  ɵROUTER_PROVIDERS,
135
105
  EXTRA_ROUTER_TESTING_PROVIDERS,
136
106
  provideLocationMocks(),
137
- {
138
- provide: Router,
139
- useFactory: setupTestingRouterInternal,
140
- deps: [
141
- UrlSerializer,
142
- ChildrenOutletContexts,
143
- Location,
144
- Compiler,
145
- Injector,
146
- ROUTES,
147
- TitleStrategy,
148
- ROUTER_CONFIGURATION,
149
- [UrlHandlingStrategy, new Optional()],
150
- [RouteReuseStrategy, new Optional()],
151
- ]
152
- },
153
107
  ɵwithPreloading(NoPreloading).ɵproviders,
154
108
  { provide: ROUTES, multi: true, useValue: [] },
155
109
  ]
@@ -195,5 +149,5 @@ var spy_ng_module_factory_loader = {};
195
149
  * Generated bundle index. Do not edit.
196
150
  */
197
151
 
198
- export { RouterTestingModule, setupTestingRouter, setupTestingRouterInternal };
152
+ export { RouterTestingModule, setupTestingRouter };
199
153
  //# sourceMappingURL=testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/extra_router_testing_providers.ts","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/spy_ng_module_factory_loader.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists to easily patch the SpyNgModuleFactoryLoader into g3\nexport const EXTRA_ROUTER_TESTING_PROVIDERS = [];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {provideLocationMocks} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵwithPreloading as withPreloading} from '@angular/router';\n\nimport {EXTRA_ROUTER_TESTING_PROVIDERS} from './extra_router_testing_providers';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing. Only used internally to keep the factory that's\n * marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).\n */\nexport function setupTestingRouterInternal(\n urlSerializer: UrlSerializer,\n contexts: ChildrenOutletContexts,\n location: Location,\n compiler: Compiler,\n injector: Injector,\n routes: Route[][],\n titleStrategy: TitleStrategy,\n opts?: ExtraOptions|UrlHandlingStrategy,\n urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy,\n) {\n return setupTestingRouter(\n urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy,\n routeReuseStrategy, titleStrategy);\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy|null, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n router.titleStrategy = titleStrategy;\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS,\n EXTRA_ROUTER_TESTING_PROVIDERS,\n provideLocationMocks(),\n {\n provide: Router,\n useFactory: setupTestingRouterInternal,\n deps: [\n UrlSerializer,\n ChildrenOutletContexts,\n Location,\n Compiler,\n Injector,\n ROUTES,\n TitleStrategy,\n ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()],\n ]\n },\n withPreloading(NoPreloading).ɵproviders,\n {provide: ROUTES, multi: true, useValue: []},\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n {provide: ROUTES, multi: true, useValue: routes},\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists for easily patching SpyNgModuleFactoryLoader in g3\nexport default {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\nexport * from './spy_ng_module_factory_loader';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","assignExtraOptionsToRouter","ROUTER_PROVIDERS","withPreloading"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BAA8B,GAAG,EAAE;;ACThD;;;;;;AAMG;AASH,SAAS,qBAAqB,CAAC,IACmB,EAAA;;;IAGhD,OAAO,kBAAk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E,IAAI,QAAQ,EAAE,CAAC;AACrC,aAAA;AACF,SAAA;AACD,QAAAC,eAAc,CAAC,YAAY,CAAC,CAAC,UAAU;QACvC,EAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC;AAC7C,KAAA,EAAA,OAAA,EAAA,CAvBS,YAAY,CAAA,EAAA,CAAA,CAAA;sGAyBX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA1B/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE;wBACTD,iBAAgB;wBAChB,8BAA8B;AAC9B,wBAAA,oBAAoB,EAAE;AACtB,wBAAA;AACE,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,UAAU,EAAE,0BAA0B;AACtC,4BAAA,IAAI,EAAE;gCACJ,aAAa;gCACb,sBAAsB;gCACtB,QAAQ;gCACR,QAAQ;gCACR,QAAQ;gCACR,MAAM;gCACN,aAAa;gCACb,oBAAoB;AACpB,gCAAA,CAAC,mBAAmB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACrC,gCAAA,CAAC,kBAAkB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACrC,6BAAA;AACF,yBAAA;AACD,wBAAAC,eAAc,CAAC,YAAY,CAAC,CAAC,UAAU;wBACvC,EAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC;AAC7C,qBAAA;AACF,iBAAA,CAAA;;;AChID;;;;;;AAMG;AAEH;AACA,mCAAe,EAAE;;ACTjB;;;;;;AAMG;;ACNH;;;;;;AAMG;AASH;;ACfA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/extra_router_testing_providers.ts","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/spy_ng_module_factory_loader.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists to easily patch the SpyNgModuleFactoryLoader into g3\nexport const EXTRA_ROUTER_TESTING_PROVIDERS = [];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {provideLocationMocks} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵwithPreloading as withPreloading} from '@angular/router';\n\nimport {EXTRA_ROUTER_TESTING_PROVIDERS} from './extra_router_testing_providers';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n * @deprecated Use `provideRouter` or `RouterTestingModule` instead.\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy|null, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n router.titleStrategy = titleStrategy;\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS,\n EXTRA_ROUTER_TESTING_PROVIDERS,\n provideLocationMocks(),\n withPreloading(NoPreloading).ɵproviders,\n {provide: ROUTES, multi: true, useValue: []},\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n {provide: ROUTES, multi: true, useValue: routes},\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists for easily patching SpyNgModuleFactoryLoader in g3\nexport default {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\nexport * from './spy_ng_module_factory_loader';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","assignExtraOptionsToRouter","ROUTER_PROVIDERS","withPreloading"],"mappings":";;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BAA8B,GAAG,EAAE;;ACMhD,SAAS,qBAAqB,CAAC,IACmB,EAAA;;;IAGhD,OAAO,kBAAkB,IAAI,IAAI,CAAC;AACpC,CAAC;AAED;;;;;AAKG;AACG,SAAU,kBAAkB,CAC9B,aAA4B,EAAE,QAAgC,EAAE,QAAkB,EAClF,QAAkB,EAAE,QAAkB,EAAE,MAAiB,EACzD,IAA4C,EAAE,mBAAyC,EACvF,kBAAuC,EAAE,aAA6B,EAAA;IACxE,MAAM,MAAM,GACR,IAAI,MAAM,CAAC,IAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAEA,QAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9F,IAAA,IAAI,IAAI,EAAE;;AAER,QAAA,IAAI,qBAAqB,CAAC,IAAI,CAAC,EAAE;AAC/B,YAAA,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC;AACnC,SAAA;AAAM,aAAA;;AAEL,YAAAC,2BAA0B,CAAC,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;AAC9B,QAAA,oBAAoB,EAAE;AACtB,QAAAC,eAAc,CAAC,YAAY,CAAC,CAAC,UAAU;QACvC,EAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC;AAC7C,KAAA,EAAA,OAAA,EAAA,CAPS,YAAY,CAAA,EAAA,CAAA,CAAA;sGASX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAV/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE;wBACTD,iBAAgB;wBAChB,8BAA8B;AAC9B,wBAAA,oBAAoB,EAAE;AACtB,wBAAAC,eAAc,CAAC,YAAY,CAAC,CAAC,UAAU;wBACvC,EAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC;AAC7C,qBAAA;AACF,iBAAA,CAAA;;;AC5FD;;;;;;AAMG;AAEH;AACA,mCAAe,EAAE;;ACTjB;;;;;;AAMG;;ACNH;;;;;;AAMG;AASH;;ACfA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -580,6 +580,7 @@ export declare type CanDeactivateFn<T> = (component: T, currentRoute: ActivatedR
580
580
  * ```
581
581
  *
582
582
  * @publicApi
583
+ * @deprecated Use `CanMatch` instead
583
584
  */
584
585
  export declare interface CanLoad {
585
586
  canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
@@ -591,6 +592,8 @@ export declare interface CanLoad {
591
592
  * @publicApi
592
593
  * @see `CanLoad`
593
594
  * @see `Route`
595
+ * @see `CanMatchFn`
596
+ * @deprecated Use `Route.canMatch` and `CanMatchFn` instead
594
597
  */
595
598
  export declare type CanLoadFn = (route: Route, segments: UrlSegment[]) => Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
596
599
 
@@ -988,7 +991,7 @@ declare type ErrorHandler = (error: any) => any;
988
991
  *
989
992
  * @publicApi
990
993
  */
991
- declare type Event_2 = RouterEvent | NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | GuardsCheckStart | GuardsCheckEnd | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll | ResolveStart | ResolveEnd;
994
+ declare type Event_2 = RouterEvent | NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | GuardsCheckStart | GuardsCheckEnd | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll | ResolveStart | ResolveEnd | NavigationSkipped;
992
995
  export { Event_2 as Event }
993
996
 
994
997
  /**
@@ -1012,7 +1015,8 @@ export declare const enum EventType {
1012
1015
  ChildActivationEnd = 12,
1013
1016
  ActivationStart = 13,
1014
1017
  ActivationEnd = 14,
1015
- Scroll = 15
1018
+ Scroll = 15,
1019
+ NavigationSkipped = 16
1016
1020
  }
1017
1021
 
1018
1022
  /**
@@ -1434,6 +1438,16 @@ export declare interface Navigation {
1434
1438
  * @publicApi
1435
1439
  */
1436
1440
  export declare interface NavigationBehaviorOptions {
1441
+ /**
1442
+ * How to handle a navigation request to the current URL.
1443
+ *
1444
+ * This value is a subset of the options available in `OnSameUrlNavigation` and
1445
+ * will take precedence over the default value set for the `Router`.
1446
+ *
1447
+ * @see `OnSameUrlNavigation`
1448
+ * @see `RouterConfigOptions`
1449
+ */
1450
+ onSameUrlNavigation?: Extract<OnSameUrlNavigation, 'reload'>;
1437
1451
  /**
1438
1452
  * When true, navigates without pushing a new state into history.
1439
1453
  *
@@ -1622,6 +1636,65 @@ export declare class NavigationError extends RouterEvent {
1622
1636
  export declare interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {
1623
1637
  }
1624
1638
 
1639
+ /**
1640
+ * An event triggered when a navigation is skipped.
1641
+ * This can happen for a couple reasons including onSameUrlHandling
1642
+ * is set to `ignore` and the navigation URL is not different than the
1643
+ * current state.
1644
+ *
1645
+ * @publicApi
1646
+ */
1647
+ export declare class NavigationSkipped extends RouterEvent {
1648
+ /**
1649
+ * A description of why the navigation was skipped. For debug purposes only. Use `code`
1650
+ * instead for a stable skipped reason that can be used in production.
1651
+ */
1652
+ reason: string;
1653
+ /**
1654
+ * A code to indicate why the navigation was skipped. This code is stable for
1655
+ * the reason and can be relied on whereas the `reason` string could change and should not be
1656
+ * used in production.
1657
+ */
1658
+ readonly code?: NavigationSkippedCode | undefined;
1659
+ readonly type = EventType.NavigationSkipped;
1660
+ constructor(
1661
+ /** @docsNotRequired */
1662
+ id: number,
1663
+ /** @docsNotRequired */
1664
+ url: string,
1665
+ /**
1666
+ * A description of why the navigation was skipped. For debug purposes only. Use `code`
1667
+ * instead for a stable skipped reason that can be used in production.
1668
+ */
1669
+ reason: string,
1670
+ /**
1671
+ * A code to indicate why the navigation was skipped. This code is stable for
1672
+ * the reason and can be relied on whereas the `reason` string could change and should not be
1673
+ * used in production.
1674
+ */
1675
+ code?: NavigationSkippedCode | undefined);
1676
+ }
1677
+
1678
+ /**
1679
+ * A code for the `NavigationSkipped` event of the `Router` to indicate the
1680
+ * reason a navigation was skipped.
1681
+ *
1682
+ * @publicApi
1683
+ */
1684
+ export declare const enum NavigationSkippedCode {
1685
+ /**
1686
+ * A navigation was skipped because the navigation URL was the same as the current Router URL.
1687
+ */
1688
+ IgnoredSameUrlNavigation = 0,
1689
+ /**
1690
+ * A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both
1691
+ * the current Router URL and the target of the navigation.
1692
+ *
1693
+ * @see UrlHandlingStrategy
1694
+ */
1695
+ IgnoredByUrlHandlingStrategy = 1
1696
+ }
1697
+
1625
1698
  /**
1626
1699
  * An event triggered when a navigation starts.
1627
1700
  *
@@ -1701,6 +1774,32 @@ export declare class NoPreloading implements PreloadingStrategy {
1701
1774
  static ɵprov: i0.ɵɵInjectableDeclaration<NoPreloading>;
1702
1775
  }
1703
1776
 
1777
+ /**
1778
+ * How to handle a navigation request to the current URL. One of:
1779
+ *
1780
+ * - `'ignore'` : The router ignores the request it is the same as the current state.
1781
+ * - `'reload'` : The router processes the URL even if it is not different from the current state.
1782
+ * One example of when you might want this option is if a `canMatch` guard depends on
1783
+ * application state and initially rejects navigation to a route. After fixing the state, you want
1784
+ * to re-navigate to the same URL so the route with the `canMatch` guard can activate.
1785
+ *
1786
+ * Note that this only configures whether the Route reprocesses the URL and triggers related
1787
+ * action and events like redirects, guards, and resolvers. By default, the router re-uses a
1788
+ * component instance when it re-navigates to the same component type without visiting a different
1789
+ * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload
1790
+ * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`
1791
+ * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`. Additionally,
1792
+ * resolvers and most guards for routes do not run unless the path or path params changed
1793
+ * (configured by `runGuardsAndResolvers`).
1794
+ *
1795
+ * @publicApi
1796
+ * @see RouteReuseStrategy
1797
+ * @see RunGuardsAndResolvers
1798
+ * @see NavigationBehaviorOptions
1799
+ * @see RouterConfigOptions
1800
+ */
1801
+ export declare type OnSameUrlNavigation = 'reload' | 'ignore';
1802
+
1704
1803
  /**
1705
1804
  * Store contextual information about a `RouterOutlet`
1706
1805
  *
@@ -2406,6 +2505,7 @@ export declare interface Route {
2406
2505
  *
2407
2506
  * When using a function rather than DI tokens, the function can call `inject` to get any required
2408
2507
  * dependencies. This `inject` call must be done in a synchronous context.
2508
+ * @deprecated Use `canMatch` instead
2409
2509
  */
2410
2510
  canLoad?: Array<CanLoadFn | any>;
2411
2511
  /**
@@ -2427,11 +2527,19 @@ export declare interface Route {
2427
2527
  */
2428
2528
  loadChildren?: LoadChildren;
2429
2529
  /**
2430
- * Defines when guards and resolvers will be run. One of
2431
- * - `paramsOrQueryParamsChange` : Run when query parameters change.
2530
+ * A policy for when to run guards and resolvers on a route.
2531
+ *
2532
+ * Guards and/or resolvers will always run when a route is activated or deactivated. When a route
2533
+ * is unchanged, the default behavior is the same as `paramsChange`.
2534
+ *
2535
+ * `paramsChange` : Rerun the guards and resolvers when path or
2536
+ * path param changes. This does not include query parameters. This option is the default.
2432
2537
  * - `always` : Run on every execution.
2433
- * By default, guards and resolvers run only when the matrix
2434
- * parameters of the route change.
2538
+ * - `pathParamsChange` : Rerun guards and resolvers when the path params
2539
+ * change. This does not compare matrix or query parameters.
2540
+ * - `paramsOrQueryParamsChange` : Run when path, matrix, or query parameters change.
2541
+ * - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params
2542
+ * change or query params have changed. This does not include matrix parameters.
2435
2543
  *
2436
2544
  * @see RunGuardsAndResolvers
2437
2545
  */
@@ -2528,6 +2636,8 @@ export declare class Router {
2528
2636
  readonly routerState: RouterState;
2529
2637
  /**
2530
2638
  * A handler for navigation errors in this NgModule.
2639
+ *
2640
+ * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.
2531
2641
  */
2532
2642
  errorHandler: ErrorHandler;
2533
2643
  /**
@@ -2535,6 +2645,10 @@ export declare class Router {
2535
2645
  * when `url` contains an invalid character.
2536
2646
  * The most common case is a `%` sign
2537
2647
  * that's not encoded and is not part of a percent encoded sequence.
2648
+ *
2649
+ * @deprecated Configure this through `RouterModule.forRoot` instead:
2650
+ * `RouterModule.forRoot(routes, {malformedUriErrorHandler: myHandler})`
2651
+ * @see `RouterModule`
2538
2652
  */
2539
2653
  malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
2540
2654
  /**
@@ -2546,30 +2660,35 @@ export declare class Router {
2546
2660
  /**
2547
2661
  * A strategy for extracting and merging URLs.
2548
2662
  * Used for AngularJS to Angular migrations.
2663
+ *
2664
+ * @deprecated Configure using `providers` instead:
2665
+ * `{provide: UrlHandlingStrategy, useClass: MyStrategy}`.
2549
2666
  */
2550
2667
  urlHandlingStrategy: UrlHandlingStrategy;
2551
2668
  /**
2552
2669
  * A strategy for re-using routes.
2670
+ *
2671
+ * @deprecated Configure using `providers` instead:
2672
+ * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.
2553
2673
  */
2554
2674
  routeReuseStrategy: RouteReuseStrategy;
2555
2675
  /**
2556
2676
  * A strategy for setting the title based on the `routerState`.
2677
+ *
2678
+ * @deprecated Configure using `providers` instead:
2679
+ * `{provide: TitleStrategy, useClass: MyStrategy}`.
2557
2680
  */
2558
2681
  titleStrategy?: TitleStrategy;
2559
2682
  /**
2560
- * How to handle a navigation request to the current URL. One of:
2683
+ * How to handle a navigation request to the current URL.
2561
2684
  *
2562
- * - `'ignore'` : The router ignores the request.
2563
- * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
2564
2685
  *
2565
- * Note that this only configures whether the Route reprocesses the URL and triggers related
2566
- * action and events like redirects, guards, and resolvers. By default, the router re-uses a
2567
- * component instance when it re-navigates to the same component type without visiting a different
2568
- * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload
2569
- * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`
2570
- * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.
2686
+ * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
2687
+ * @see `withRouterConfig`
2688
+ * @see `provideRouter`
2689
+ * @see `RouterModule`
2571
2690
  */
2572
- onSameUrlNavigation: 'reload' | 'ignore';
2691
+ onSameUrlNavigation: OnSameUrlNavigation;
2573
2692
  /**
2574
2693
  * How to merge parameters, data, resolved data, and title from parent to child
2575
2694
  * routes. One of:
@@ -2578,6 +2697,11 @@ export declare class Router {
2578
2697
  * for path-less or component-less routes.
2579
2698
  * - `'always'` : Inherit parent parameters, data, and resolved data
2580
2699
  * for all child routes.
2700
+ *
2701
+ * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
2702
+ * @see `withRouterConfig`
2703
+ * @see `provideRouter`
2704
+ * @see `RouterModule`
2581
2705
  */
2582
2706
  paramsInheritanceStrategy: 'emptyOnly' | 'always';
2583
2707
  /**
@@ -2586,6 +2710,11 @@ export declare class Router {
2586
2710
  * Set to `'eager'` to update the browser URL at the beginning of navigation.
2587
2711
  * You can choose to update early so that, if navigation fails,
2588
2712
  * you can show an error message with the URL that failed.
2713
+ *
2714
+ * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
2715
+ * @see `withRouterConfig`
2716
+ * @see `provideRouter`
2717
+ * @see `RouterModule`
2589
2718
  */
2590
2719
  urlUpdateStrategy: 'deferred' | 'eager';
2591
2720
  /**
@@ -2609,6 +2738,10 @@ export declare class Router {
2609
2738
  *
2610
2739
  * The default value is `replace`.
2611
2740
  *
2741
+ * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
2742
+ * @see `withRouterConfig`
2743
+ * @see `provideRouter`
2744
+ * @see `RouterModule`
2612
2745
  */
2613
2746
  canceledNavigationResolution: 'replace' | 'computed';
2614
2747
  private readonly navigationTransitions;
@@ -2848,13 +2981,13 @@ export declare interface RouterConfigOptions {
2848
2981
  */
2849
2982
  canceledNavigationResolution?: 'replace' | 'computed';
2850
2983
  /**
2851
- * Define what the router should do if it receives a navigation request to the current URL.
2852
- * Default is `ignore`, which causes the router ignores the navigation.
2853
- * This can disable features such as a "refresh" button.
2854
- * Use this option to configure the behavior when navigating to the
2855
- * current URL. Default is 'ignore'.
2984
+ * Configures the default for handling a navigation request to the current URL.
2985
+ *
2986
+ * If unset, the `Router` will use `'ignore'`.
2987
+ *
2988
+ * @see `OnSameUrlNavigation`
2856
2989
  */
2857
- onSameUrlNavigation?: 'reload' | 'ignore';
2990
+ onSameUrlNavigation?: OnSameUrlNavigation;
2858
2991
  /**
2859
2992
  * Defines how the router merges parameters, data, and resolved data from parent to child
2860
2993
  * routes. By default ('emptyOnly'), inherits parent parameters only for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "15.0.2",
3
+ "version": "15.1.0-next.1",
4
4
  "description": "Angular - the routing library",
5
5
  "keywords": [
6
6
  "angular",
@@ -24,9 +24,9 @@
24
24
  "tslib": "^2.3.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@angular/core": "15.0.2",
28
- "@angular/common": "15.0.2",
29
- "@angular/platform-browser": "15.0.2",
27
+ "@angular/core": "15.1.0-next.1",
28
+ "@angular/common": "15.1.0-next.1",
29
+ "@angular/platform-browser": "15.1.0-next.1",
30
30
  "rxjs": "^6.5.3 || ^7.4.0"
31
31
  },
32
32
  "ng-update": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -57,13 +57,8 @@ export declare class RouterTestingModule {
57
57
  * Router setup factory function used for testing.
58
58
  *
59
59
  * @publicApi
60
+ * @deprecated Use `provideRouter` or `RouterTestingModule` instead.
60
61
  */
61
62
  export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy | null, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy): Router;
62
63
 
63
- /**
64
- * Router setup factory function used for testing. Only used internally to keep the factory that's
65
- * marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).
66
- */
67
- export declare function setupTestingRouterInternal(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, compiler: Compiler, injector: Injector, routes: Route[][], titleStrategy: TitleStrategy, opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy): Router;
68
-
69
64
  export { }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.2
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */