@angular/router 15.0.1 → 15.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/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/deprecated_load_children.mjs +3 -1
- package/esm2020/src/directives/router_link.mjs +3 -3
- package/esm2020/src/directives/router_link_active.mjs +3 -3
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/models.mjs +1 -1
- package/esm2020/src/navigation_transition.mjs +138 -78
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/provide_router.mjs +6 -7
- package/esm2020/src/route_reuse_strategy.mjs +6 -6
- package/esm2020/src/router.mjs +49 -147
- package/esm2020/src/router_config_loader.mjs +3 -3
- package/esm2020/src/router_module.mjs +11 -9
- package/esm2020/src/router_outlet_context.mjs +3 -3
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +20 -21
- package/esm2020/src/router_state.mjs +1 -1
- package/esm2020/src/url_handling_strategy.mjs +6 -6
- package/esm2020/src/url_tree.mjs +4 -4
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +47 -55
- package/fesm2015/router.mjs +400 -436
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +48 -56
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +394 -434
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +48 -56
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +16 -37
- package/package.json +4 -4
- package/testing/index.d.ts +1 -7
- package/upgrade/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { Location } from '@angular/common';
|
|
8
8
|
import { provideLocationMocks } from '@angular/common/testing';
|
|
9
9
|
import * as i0 from '@angular/core';
|
|
10
|
-
import { Compiler, Injector,
|
|
11
|
-
import {
|
|
10
|
+
import { inject, Compiler, Injector, NgModule } from '@angular/core';
|
|
11
|
+
import { UrlSerializer, ChildrenOutletContexts, ROUTES, UrlHandlingStrategy, ROUTER_CONFIGURATION, RouteReuseStrategy, TitleStrategy, Router, RouterModule, ɵROUTER_PROVIDERS, ɵwithPreloading, NoPreloading } from '@angular/router';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -32,12 +32,9 @@ function isUrlHandlingStrategy(opts) {
|
|
|
32
32
|
// runtime.
|
|
33
33
|
return 'shouldProcessUrl' in opts;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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);
|
|
35
|
+
function throwInvalidConfigError(parameter) {
|
|
36
|
+
throw new Error(`Parameter ${parameter} does not match the one available in the injector. ` +
|
|
37
|
+
'`setupTestingRouter` is meant to be used as a factory function with dependencies coming from DI.');
|
|
41
38
|
}
|
|
42
39
|
/**
|
|
43
40
|
* Router setup factory function used for testing.
|
|
@@ -45,25 +42,52 @@ function setupTestingRouterInternal(urlSerializer, contexts, location, compiler,
|
|
|
45
42
|
* @publicApi
|
|
46
43
|
*/
|
|
47
44
|
function setupTestingRouter(urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy, routeReuseStrategy, titleStrategy) {
|
|
48
|
-
|
|
45
|
+
// Note: The checks below are to detect misconfigured providers and invalid uses of
|
|
46
|
+
// `setupTestingRouter`. This function is not used internally (neither in router code or anywhere
|
|
47
|
+
// in g3). It appears this function was exposed as publicApi by mistake and should not be used
|
|
48
|
+
// externally either. However, if it is, the documented intent is to be used as a factory function
|
|
49
|
+
// and parameter values should always match what's available in DI.
|
|
50
|
+
if (urlSerializer !== inject(UrlSerializer)) {
|
|
51
|
+
throwInvalidConfigError('urlSerializer');
|
|
52
|
+
}
|
|
53
|
+
if (contexts !== inject(ChildrenOutletContexts)) {
|
|
54
|
+
throwInvalidConfigError('contexts');
|
|
55
|
+
}
|
|
56
|
+
if (location !== inject(Location)) {
|
|
57
|
+
throwInvalidConfigError('location');
|
|
58
|
+
}
|
|
59
|
+
if (compiler !== inject(Compiler)) {
|
|
60
|
+
throwInvalidConfigError('compiler');
|
|
61
|
+
}
|
|
62
|
+
if (injector !== inject(Injector)) {
|
|
63
|
+
throwInvalidConfigError('injector');
|
|
64
|
+
}
|
|
65
|
+
if (routes !== inject(ROUTES)) {
|
|
66
|
+
throwInvalidConfigError('routes');
|
|
67
|
+
}
|
|
49
68
|
if (opts) {
|
|
50
69
|
// Handle deprecated argument ordering.
|
|
51
70
|
if (isUrlHandlingStrategy(opts)) {
|
|
52
|
-
|
|
71
|
+
if (opts !== inject(UrlHandlingStrategy)) {
|
|
72
|
+
throwInvalidConfigError('opts (UrlHandlingStrategy)');
|
|
73
|
+
}
|
|
53
74
|
}
|
|
54
75
|
else {
|
|
55
|
-
|
|
56
|
-
|
|
76
|
+
if (opts !== inject(ROUTER_CONFIGURATION)) {
|
|
77
|
+
throwInvalidConfigError('opts (ROUTER_CONFIGURATION)');
|
|
78
|
+
}
|
|
57
79
|
}
|
|
58
80
|
}
|
|
59
|
-
if (urlHandlingStrategy) {
|
|
60
|
-
|
|
81
|
+
if (urlHandlingStrategy !== inject(UrlHandlingStrategy)) {
|
|
82
|
+
throwInvalidConfigError('urlHandlingStrategy');
|
|
61
83
|
}
|
|
62
|
-
if (routeReuseStrategy) {
|
|
63
|
-
|
|
84
|
+
if (routeReuseStrategy !== inject(RouteReuseStrategy)) {
|
|
85
|
+
throwInvalidConfigError('routeReuseStrategy');
|
|
64
86
|
}
|
|
65
|
-
|
|
66
|
-
|
|
87
|
+
if (titleStrategy !== inject(TitleStrategy)) {
|
|
88
|
+
throwInvalidConfigError('titleStrategy');
|
|
89
|
+
}
|
|
90
|
+
return new Router();
|
|
67
91
|
}
|
|
68
92
|
/**
|
|
69
93
|
* @description
|
|
@@ -101,32 +125,16 @@ class RouterTestingModule {
|
|
|
101
125
|
};
|
|
102
126
|
}
|
|
103
127
|
}
|
|
104
|
-
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.
|
|
128
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
129
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
130
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RouterTestingModule, providers: [
|
|
107
131
|
ɵROUTER_PROVIDERS,
|
|
108
132
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
109
133
|
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
134
|
ɵwithPreloading(NoPreloading).ɵproviders,
|
|
127
135
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
128
136
|
], imports: [RouterModule] });
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
130
138
|
type: NgModule,
|
|
131
139
|
args: [{
|
|
132
140
|
exports: [RouterModule],
|
|
@@ -134,22 +142,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImpor
|
|
|
134
142
|
ɵROUTER_PROVIDERS,
|
|
135
143
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
136
144
|
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
145
|
ɵwithPreloading(NoPreloading).ɵproviders,
|
|
154
146
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
155
147
|
]
|
|
@@ -195,5 +187,5 @@ var spy_ng_module_factory_loader = {};
|
|
|
195
187
|
* Generated bundle index. Do not edit.
|
|
196
188
|
*/
|
|
197
189
|
|
|
198
|
-
export { RouterTestingModule, setupTestingRouter
|
|
190
|
+
export { RouterTestingModule, setupTestingRouter };
|
|
199
191
|
//# sourceMappingURL=testing.mjs.map
|
package/fesm2020/testing.mjs.map
CHANGED
|
@@ -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,kBAAkB,IAAI,IAAI,CAAC;AACpC,CAAC;AAED;;;AAGG;AACG,SAAU,0BAA0B,CACtC,aAA4B,EAC5B,QAAgC,EAChC,QAAkB,EAClB,QAAkB,EAClB,QAAkB,EAClB,MAAiB,EACjB,aAA4B,EAC5B,IAAuC,EACvC,mBAAyC,EACzC,kBAAuC,EAAA;IAEzC,OAAO,kBAAkB,CACrB,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EACxF,kBAAkB,EAAE,aAAa,CAAC,CAAC;AACzC,CAAC;AAED;;;;AAIG;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,E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C,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, inject, Injector, ModuleWithProviders, NgModule} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵ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\nfunction throwInvalidConfigError(parameter: string): never {\n throw new Error(\n `Parameter ${parameter} does not match the one available in the injector. ` +\n '`setupTestingRouter` is meant to be used as a factory function with dependencies coming from DI.');\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 // Note: The checks below are to detect misconfigured providers and invalid uses of\n // `setupTestingRouter`. This function is not used internally (neither in router code or anywhere\n // in g3). It appears this function was exposed as publicApi by mistake and should not be used\n // externally either. However, if it is, the documented intent is to be used as a factory function\n // and parameter values should always match what's available in DI.\n if (urlSerializer !== inject(UrlSerializer)) {\n throwInvalidConfigError('urlSerializer');\n }\n if (contexts !== inject(ChildrenOutletContexts)) {\n throwInvalidConfigError('contexts');\n }\n if (location !== inject(Location)) {\n throwInvalidConfigError('location');\n }\n if (compiler !== inject(Compiler)) {\n throwInvalidConfigError('compiler');\n }\n if (injector !== inject(Injector)) {\n throwInvalidConfigError('injector');\n }\n if (routes !== inject(ROUTES)) {\n throwInvalidConfigError('routes');\n }\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n if (opts !== inject(UrlHandlingStrategy)) {\n throwInvalidConfigError('opts (UrlHandlingStrategy)');\n }\n } else {\n if (opts !== inject(ROUTER_CONFIGURATION)) {\n throwInvalidConfigError('opts (ROUTER_CONFIGURATION)');\n }\n }\n }\n\n if (urlHandlingStrategy !== inject(UrlHandlingStrategy)) {\n throwInvalidConfigError('urlHandlingStrategy');\n }\n\n if (routeReuseStrategy !== inject(RouteReuseStrategy)) {\n throwInvalidConfigError('routeReuseStrategy');\n }\n\n if (titleStrategy !== inject(TitleStrategy)) {\n throwInvalidConfigError('titleStrategy');\n }\n\n return new 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":["ROUTER_PROVIDERS","withPreloading"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BAA8B,GAAG,EAAE;;ACThD;;;;;;AAMG;AASH,SAAS,qBAAqB,CAAC,IACmB,EAAA;;;IAGhD,OAAO,kBAAkB,IAAI,IAAI,CAAC;AACpC,CAAC;AAED,SAAS,uBAAuB,CAAC,SAAiB,EAAA;AAChD,IAAA,MAAM,IAAI,KAAK,CACX,CAAA,UAAA,EAAa,SAAS,CAAqD,mDAAA,CAAA;AAC3E,QAAA,kGAAkG,CAAC,CAAC;AAC1G,CAAC;AAED;;;;AAIG;AACG,SAAU,kBAAkB,CAC9B,aAA4B,EAAE,QAAgC,EAAE,QAAkB,EAClF,QAAkB,EAAE,QAAkB,EAAE,MAAiB,EACzD,IAA4C,EAAE,mBAAyC,EACvF,kBAAuC,EAAE,aAA6B,EAAA;;;;;;AAMxE,IAAA,IAAI,aAAa,KAAK,MAAM,CAAC,aAAa,CAAC,EAAE;QAC3C,uBAAuB,CAAC,eAAe,CAAC,CAAC;AAC1C,KAAA;AACD,IAAA,IAAI,QAAQ,KAAK,MAAM,CAAC,sBAAsB,CAAC,EAAE;QAC/C,uBAAuB,CAAC,UAAU,CAAC,CAAC;AACrC,KAAA;AACD,IAAA,IAAI,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,EAAE;QACjC,uBAAuB,CAAC,UAAU,CAAC,CAAC;AACrC,KAAA;AACD,IAAA,IAAI,Q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,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC;AAC7C,qBAAA;AACF,iBAAA,CAAA;;;AC3HD;;;;;;AAMG;AAEH;AACA,mCAAe,EAAE;;ACTjB;;;;;;AAMG;;ACNH;;;;;;AAMG;AASH;;ACfA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
package/fesm2020/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -17,7 +17,6 @@ import { EventEmitter } from '@angular/core';
|
|
|
17
17
|
import * as i0 from '@angular/core';
|
|
18
18
|
import { InjectionToken } from '@angular/core';
|
|
19
19
|
import { Injector } from '@angular/core';
|
|
20
|
-
import { Location as Location_2 } from '@angular/common';
|
|
21
20
|
import { LocationStrategy } from '@angular/common';
|
|
22
21
|
import { ModuleWithProviders } from '@angular/core';
|
|
23
22
|
import { NgModuleFactory } from '@angular/core';
|
|
@@ -1312,7 +1311,7 @@ export declare interface IsActiveMatchOptions {
|
|
|
1312
1311
|
* @see `LoadChildrenCallback`
|
|
1313
1312
|
* @publicApi
|
|
1314
1313
|
*/
|
|
1315
|
-
export declare type LoadChildren = LoadChildrenCallback
|
|
1314
|
+
export declare type LoadChildren = LoadChildrenCallback;
|
|
1316
1315
|
|
|
1317
1316
|
/**
|
|
1318
1317
|
*
|
|
@@ -2494,10 +2493,9 @@ export declare class RouteConfigLoadStart {
|
|
|
2494
2493
|
* @publicApi
|
|
2495
2494
|
*/
|
|
2496
2495
|
export declare class Router {
|
|
2497
|
-
config: Routes;
|
|
2498
|
-
private navigations;
|
|
2499
2496
|
private disposed;
|
|
2500
2497
|
private locationSubscription?;
|
|
2498
|
+
private get navigationId();
|
|
2501
2499
|
/**
|
|
2502
2500
|
* The id of the currently active page in the router.
|
|
2503
2501
|
* Updated to the transition's target id on a successful navigation.
|
|
@@ -2516,13 +2514,14 @@ export declare class Router {
|
|
|
2516
2514
|
private console;
|
|
2517
2515
|
private isNgZoneEnabled;
|
|
2518
2516
|
/**
|
|
2519
|
-
* An event stream for routing events
|
|
2517
|
+
* An event stream for routing events.
|
|
2520
2518
|
*/
|
|
2521
|
-
|
|
2519
|
+
get events(): Observable<Event_2>;
|
|
2522
2520
|
/**
|
|
2523
2521
|
* The current state of routing in this NgModule.
|
|
2524
2522
|
*/
|
|
2525
2523
|
readonly routerState: RouterState;
|
|
2524
|
+
private options;
|
|
2526
2525
|
/**
|
|
2527
2526
|
* A handler for navigation errors in this NgModule.
|
|
2528
2527
|
*/
|
|
@@ -2608,20 +2607,11 @@ export declare class Router {
|
|
|
2608
2607
|
*
|
|
2609
2608
|
*/
|
|
2610
2609
|
canceledNavigationResolution: 'replace' | 'computed';
|
|
2610
|
+
config: Routes;
|
|
2611
2611
|
private readonly navigationTransitions;
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
constructor(
|
|
2616
|
-
/** @internal */
|
|
2617
|
-
rootComponentType: Type<any> | null,
|
|
2618
|
-
/** @internal */
|
|
2619
|
-
urlSerializer: UrlSerializer,
|
|
2620
|
-
/** @internal */
|
|
2621
|
-
rootContexts: ChildrenOutletContexts,
|
|
2622
|
-
/** @internal */
|
|
2623
|
-
location: Location_2, injector: Injector, compiler: Compiler, config: Routes);
|
|
2624
|
-
private setTransition;
|
|
2612
|
+
private readonly urlSerializer;
|
|
2613
|
+
private readonly location;
|
|
2614
|
+
constructor();
|
|
2625
2615
|
/**
|
|
2626
2616
|
* Sets up the location change listener and performs the initial navigation.
|
|
2627
2617
|
*/
|
|
@@ -2786,7 +2776,6 @@ export declare class Router {
|
|
|
2786
2776
|
*/
|
|
2787
2777
|
isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;
|
|
2788
2778
|
private removeEmptyProps;
|
|
2789
|
-
private processNavigations;
|
|
2790
2779
|
private resetState;
|
|
2791
2780
|
private resetUrlToCurrentUrlTree;
|
|
2792
2781
|
private generateNgRouterState;
|
|
@@ -3870,7 +3859,7 @@ export declare interface UrlCreationOptions {
|
|
|
3870
3859
|
* constructor(private router: Router, private route: ActivatedRoute) {}
|
|
3871
3860
|
*
|
|
3872
3861
|
* go() {
|
|
3873
|
-
*
|
|
3862
|
+
* router.navigate(['../list'], { relativeTo: this.route });
|
|
3874
3863
|
* }
|
|
3875
3864
|
* }
|
|
3876
3865
|
* ```
|
|
@@ -3884,7 +3873,7 @@ export declare interface UrlCreationOptions {
|
|
|
3884
3873
|
*
|
|
3885
3874
|
* ```
|
|
3886
3875
|
* // Navigate to /results?page=1
|
|
3887
|
-
*
|
|
3876
|
+
* router.navigate(['/results'], { queryParams: { page: 1 } });
|
|
3888
3877
|
* ```
|
|
3889
3878
|
*/
|
|
3890
3879
|
queryParams?: Params | null;
|
|
@@ -3893,7 +3882,7 @@ export declare interface UrlCreationOptions {
|
|
|
3893
3882
|
*
|
|
3894
3883
|
* ```
|
|
3895
3884
|
* // Navigate to /results#top
|
|
3896
|
-
*
|
|
3885
|
+
* router.navigate(['/results'], { fragment: 'top' });
|
|
3897
3886
|
* ```
|
|
3898
3887
|
*/
|
|
3899
3888
|
fragment?: string;
|
|
@@ -3906,13 +3895,13 @@ export declare interface UrlCreationOptions {
|
|
|
3906
3895
|
* The "preserve" option discards any new query params:
|
|
3907
3896
|
* ```
|
|
3908
3897
|
* // from /view1?page=1 to/view2?page=1
|
|
3909
|
-
*
|
|
3898
|
+
* router.navigate(['/view2'], { queryParams: { page: 2 }, queryParamsHandling: "preserve"
|
|
3910
3899
|
* });
|
|
3911
3900
|
* ```
|
|
3912
3901
|
* The "merge" option appends new query params to the params from the current URL:
|
|
3913
3902
|
* ```
|
|
3914
3903
|
* // from /view1?page=1 to/view2?page=1&otherKey=2
|
|
3915
|
-
*
|
|
3904
|
+
* router.navigate(['/view2'], { queryParams: { otherKey: 2 }, queryParamsHandling: "merge"
|
|
3916
3905
|
* });
|
|
3917
3906
|
* ```
|
|
3918
3907
|
* In case of a key collision between current parameters and those in the `queryParams` object,
|
|
@@ -3925,7 +3914,7 @@ export declare interface UrlCreationOptions {
|
|
|
3925
3914
|
*
|
|
3926
3915
|
* ```
|
|
3927
3916
|
* // Preserve fragment from /results#top to /view#top
|
|
3928
|
-
*
|
|
3917
|
+
* router.navigate(['/view'], { preserveFragment: true });
|
|
3929
3918
|
* ```
|
|
3930
3919
|
*/
|
|
3931
3920
|
preserveFragment?: boolean;
|
|
@@ -4321,16 +4310,6 @@ export { withPreloading as ɵwithPreloading }
|
|
|
4321
4310
|
*/
|
|
4322
4311
|
export declare function withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature;
|
|
4323
4312
|
|
|
4324
|
-
export declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void;
|
|
4325
|
-
|
|
4326
|
-
/**
|
|
4327
|
-
* Deprecated `loadChildren` value types.
|
|
4328
|
-
*
|
|
4329
|
-
* @publicApi
|
|
4330
|
-
* @deprecated represents the deprecated type side of `LoadChildren`.
|
|
4331
|
-
*/
|
|
4332
|
-
export declare type ɵDeprecatedLoadChildren = never;
|
|
4333
|
-
|
|
4334
4313
|
/**
|
|
4335
4314
|
* This component is used internally within the router to be a placeholder when an empty
|
|
4336
4315
|
* router-outlet is needed. For example, with a config such as:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.3",
|
|
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.
|
|
28
|
-
"@angular/common": "15.0.
|
|
29
|
-
"@angular/platform-browser": "15.0.
|
|
27
|
+
"@angular/core": "15.0.3",
|
|
28
|
+
"@angular/common": "15.0.3",
|
|
29
|
+
"@angular/platform-browser": "15.0.3",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -60,10 +60,4 @@ export declare class RouterTestingModule {
|
|
|
60
60
|
*/
|
|
61
61
|
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
62
|
|
|
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
63
|
export { }
|
package/upgrade/index.d.ts
CHANGED