@angular/router 14.1.0-rc.0 → 14.2.0-next.0
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 +10 -6
- package/esm2020/src/directives/router_link.mjs +12 -9
- package/esm2020/src/directives/router_link_active.mjs +5 -4
- package/esm2020/src/directives/router_outlet.mjs +9 -5
- package/esm2020/src/index.mjs +4 -3
- package/esm2020/src/operators/recognize.mjs +1 -1
- package/esm2020/src/operators/resolve_data.mjs +4 -9
- package/esm2020/src/page_title_strategy.mjs +13 -8
- package/esm2020/src/private_export.mjs +3 -2
- package/esm2020/src/router.mjs +128 -72
- package/esm2020/src/router_config.mjs +19 -0
- package/esm2020/src/router_config_loader.mjs +6 -5
- package/esm2020/src/router_module.mjs +22 -79
- package/esm2020/src/router_outlet_context.mjs +9 -1
- package/esm2020/src/router_preloader.mjs +19 -11
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/router_state.mjs +7 -3
- package/esm2020/src/shared.mjs +22 -2
- package/esm2020/src/url_tree.mjs +9 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +10 -12
- package/fesm2015/router.mjs +371 -286
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +10 -12
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +363 -288
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +10 -12
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +37 -13
- package/package.json +4 -4
- package/testing/index.d.ts +2 -3
- package/upgrade/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.
|
|
2
|
+
* @license Angular v14.2.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import { Location, LocationStrategy } from '@angular/common';
|
|
|
8
8
|
import { SpyLocation, MockLocationStrategy } from '@angular/common/testing';
|
|
9
9
|
import * as i0 from '@angular/core';
|
|
10
10
|
import { Compiler, Injector, Optional, NgModule } from '@angular/core';
|
|
11
|
-
import { Router, ɵflatten, ɵassignExtraOptionsToRouter, provideRoutes, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, ROUTES, UrlHandlingStrategy, RouteReuseStrategy,
|
|
11
|
+
import { Router, ɵflatten, ɵassignExtraOptionsToRouter, provideRoutes, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, ROUTES, TitleStrategy, UrlHandlingStrategy, RouteReuseStrategy, ɵprovidePreloading, NoPreloading } from '@angular/router';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -36,8 +36,8 @@ function isUrlHandlingStrategy(opts) {
|
|
|
36
36
|
* Router setup factory function used for testing. Only used internally to keep the factory that's
|
|
37
37
|
* marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).
|
|
38
38
|
*/
|
|
39
|
-
function setupTestingRouterInternal(urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy, routeReuseStrategy
|
|
40
|
-
return setupTestingRouter(urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy, routeReuseStrategy, titleStrategy
|
|
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
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Router setup factory function used for testing.
|
|
@@ -101,9 +101,9 @@ class RouterTestingModule {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
105
|
-
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
106
|
-
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
104
|
+
RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.0", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
+
RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.0", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
|
|
106
|
+
RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.0", ngImport: i0, type: RouterTestingModule, providers: [
|
|
107
107
|
ɵROUTER_PROVIDERS,
|
|
108
108
|
EXTRA_ROUTER_TESTING_PROVIDERS,
|
|
109
109
|
{ provide: Location, useClass: SpyLocation },
|
|
@@ -118,17 +118,16 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
118
118
|
Compiler,
|
|
119
119
|
Injector,
|
|
120
120
|
ROUTES,
|
|
121
|
+
TitleStrategy,
|
|
121
122
|
ROUTER_CONFIGURATION,
|
|
122
123
|
[UrlHandlingStrategy, new Optional()],
|
|
123
124
|
[RouteReuseStrategy, new Optional()],
|
|
124
|
-
[DefaultTitleStrategy, new Optional()],
|
|
125
|
-
[TitleStrategy, new Optional()],
|
|
126
125
|
]
|
|
127
126
|
},
|
|
128
127
|
ɵprovidePreloading(NoPreloading),
|
|
129
128
|
provideRoutes([]),
|
|
130
129
|
], imports: [RouterModule] });
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.0", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
132
131
|
type: NgModule,
|
|
133
132
|
args: [{
|
|
134
133
|
exports: [RouterModule],
|
|
@@ -147,11 +146,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ng
|
|
|
147
146
|
Compiler,
|
|
148
147
|
Injector,
|
|
149
148
|
ROUTES,
|
|
149
|
+
TitleStrategy,
|
|
150
150
|
ROUTER_CONFIGURATION,
|
|
151
151
|
[UrlHandlingStrategy, new Optional()],
|
|
152
152
|
[RouteReuseStrategy, new Optional()],
|
|
153
|
-
[DefaultTitleStrategy, new Optional()],
|
|
154
|
-
[TitleStrategy, new Optional()],
|
|
155
153
|
]
|
|
156
154
|
},
|
|
157
155
|
ɵprovidePreloading(NoPreloading),
|
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, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, DefaultTitleStrategy, ExtraOptions, NoPreloading, PreloadingStrategy, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵprovidePreloading as providePreloading, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS} 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, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy, defaultTitleStrategy?: DefaultTitleStrategy,\n titleStrategy?: TitleStrategy) {\n return setupTestingRouter(\n urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy,\n routeReuseStrategy, titleStrategy ?? defaultTitleStrategy);\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 {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {\n provide: Router,\n useFactory: setupTestingRouterInternal,\n deps: [\n UrlSerializer,\n ChildrenOutletContexts,\n Location,\n Compiler,\n Injector,\n ROUTES,\n ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()],\n [DefaultTitleStrategy, new Optional()],\n [TitleStrategy, new Optional()],\n ]\n },\n providePreloading(NoPreloading),\n provideRoutes([]),\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(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","providePreloading"],"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,EAAE,QAAgC,EAAE,QAAkB,EAClF,QAAkB,EAAE,QAAkB,EAAE,MAAiB,EACzD,IAAuC,EAAE,mBAAyC,EAClF,kBAAuC,EAAE,oBAA2C,EACpF,aAA6B,EAAA;IAC/B,OAAO,kBAAkB,CACrB,aAAa,EAA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AAC,YAAY,CAAC;QAC/B,aAAa,CAAC,EAAE,CAAC;AAClB,KAAA,EAAA,OAAA,EAAA,CAzBS,YAAY,CAAA,EAAA,CAAA,CAAA;sGA2BX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA5B/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE;wBACTD,iBAAgB;wBAChB,8BAA8B;AAC9B,wBAAA,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAC;AAC1C,wBAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC3D,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,oBAAoB;AACpB,gCAAA,CAAC,mBAAmB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACrC,gCAAA,CAAC,kBAAkB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACpC,gCAAA,CAAC,oBAAoB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACtC,gCAAA,CAAC,aAAa,EAAE,IAAI,QAAQ,EAAE,CAAC;AAChC,6BAAA;AACF,yBAAA;wBACDC,kBAAiB,CAAC,YAAY,CAAC;wBAC/B,aAAa,CAAC,EAAE,CAAC;AAClB,qBAAA;AACF,iBAAA,CAAA;;;AC5HD;;;;;;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, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵprovidePreloading as providePreloading, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS} 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 {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\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 providePreloading(NoPreloading),\n provideRoutes([]),\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(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","providePreloading"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BA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AEG;;;;"}
|
package/fesm2020/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.
|
|
2
|
+
* @license Angular v14.2.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -70,6 +70,8 @@ export declare class ActivatedRoute {
|
|
|
70
70
|
component: Type<any> | null;
|
|
71
71
|
/** The current snapshot of this route */
|
|
72
72
|
snapshot: ActivatedRouteSnapshot;
|
|
73
|
+
/** An Observable of the resolved route title */
|
|
74
|
+
readonly title: Observable<string | undefined>;
|
|
73
75
|
/** The configuration used to match this route. */
|
|
74
76
|
get routeConfig(): Route | null;
|
|
75
77
|
/** The root of the router state. */
|
|
@@ -154,6 +156,8 @@ export declare class ActivatedRouteSnapshot {
|
|
|
154
156
|
component: Type<any> | null;
|
|
155
157
|
/** The configuration used to match this route **/
|
|
156
158
|
readonly routeConfig: Route | null;
|
|
159
|
+
/** The resolved route title */
|
|
160
|
+
readonly title?: string;
|
|
157
161
|
/** The root of the router state */
|
|
158
162
|
get root(): ActivatedRouteSnapshot;
|
|
159
163
|
/** The parent of this route in the router state tree */
|
|
@@ -741,6 +745,8 @@ export declare class ChildrenOutletContexts {
|
|
|
741
745
|
onOutletReAttached(contexts: Map<string, OutletContext>): void;
|
|
742
746
|
getOrCreateContext(childName: string): OutletContext;
|
|
743
747
|
getContext(childName: string): OutletContext | null;
|
|
748
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChildrenOutletContexts, never>;
|
|
749
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChildrenOutletContexts>;
|
|
744
750
|
}
|
|
745
751
|
|
|
746
752
|
/**
|
|
@@ -833,6 +839,23 @@ export declare class DefaultTitleStrategy extends TitleStrategy {
|
|
|
833
839
|
static ɵprov: i0.ɵɵInjectableDeclaration<DefaultTitleStrategy>;
|
|
834
840
|
}
|
|
835
841
|
|
|
842
|
+
/**
|
|
843
|
+
* Matches the route configuration (`route`) against the actual URL (`segments`).
|
|
844
|
+
*
|
|
845
|
+
* When no matcher is defined on a `Route`, this is the matcher used by the Router by default.
|
|
846
|
+
*
|
|
847
|
+
* @param segments The remaining unmatched segments in the current navigation
|
|
848
|
+
* @param segmentGroup The current segment group being matched
|
|
849
|
+
* @param route The `Route` to match against.
|
|
850
|
+
*
|
|
851
|
+
* @see UrlMatchResult
|
|
852
|
+
* @see Route
|
|
853
|
+
*
|
|
854
|
+
* @returns The resulting match information or `null` if the `route` should not match.
|
|
855
|
+
* @publicApi
|
|
856
|
+
*/
|
|
857
|
+
export declare function defaultUrlMatcher(segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult | null;
|
|
858
|
+
|
|
836
859
|
/**
|
|
837
860
|
* @description
|
|
838
861
|
*
|
|
@@ -1234,9 +1257,6 @@ declare namespace i4 {
|
|
|
1234
1257
|
* more control over when the router starts its initial navigation due to some complex
|
|
1235
1258
|
* initialization logic.
|
|
1236
1259
|
*
|
|
1237
|
-
* The following values have been [deprecated](guide/releases#deprecation-practices) since v11,
|
|
1238
|
-
* and should not be used for new applications.
|
|
1239
|
-
*
|
|
1240
1260
|
* @see `forRoot()`
|
|
1241
1261
|
*
|
|
1242
1262
|
* @publicApi
|
|
@@ -1797,7 +1817,7 @@ export declare const PRIMARY_OUTLET = "primary";
|
|
|
1797
1817
|
*
|
|
1798
1818
|
* @publicApi
|
|
1799
1819
|
*/
|
|
1800
|
-
export declare function provideRoutes(routes: Routes):
|
|
1820
|
+
export declare function provideRoutes(routes: Routes): Provider[];
|
|
1801
1821
|
|
|
1802
1822
|
/**
|
|
1803
1823
|
*
|
|
@@ -3036,7 +3056,7 @@ export declare class RouterLink implements OnChanges {
|
|
|
3036
3056
|
onClick(): boolean;
|
|
3037
3057
|
get urlTree(): UrlTree | null;
|
|
3038
3058
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLink, [null, null, { attribute: "tabindex"; }, null, null]>;
|
|
3039
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, ":not(a):not(area)[routerLink]", never, { "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never,
|
|
3059
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, ":not(a):not(area)[routerLink]", never, { "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, true>;
|
|
3040
3060
|
}
|
|
3041
3061
|
|
|
3042
3062
|
/**
|
|
@@ -3169,7 +3189,7 @@ export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterCont
|
|
|
3169
3189
|
private isLinkActive;
|
|
3170
3190
|
private hasActiveLinks;
|
|
3171
3191
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkActive, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
3172
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": "routerLinkActiveOptions"; "ariaCurrentWhenActive": "ariaCurrentWhenActive"; "routerLinkActive": "routerLinkActive"; }, { "isActiveChange": "isActiveChange"; }, ["links", "linksWithHrefs"], never,
|
|
3192
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": "routerLinkActiveOptions"; "ariaCurrentWhenActive": "ariaCurrentWhenActive"; "routerLinkActive": "routerLinkActive"; }, { "isActiveChange": "isActiveChange"; }, ["links", "linksWithHrefs"], never, true>;
|
|
3173
3193
|
}
|
|
3174
3194
|
|
|
3175
3195
|
/**
|
|
@@ -3270,7 +3290,7 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
|
|
3270
3290
|
private updateTargetUrlAndHref;
|
|
3271
3291
|
get urlTree(): UrlTree | null;
|
|
3272
3292
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkWithHref, never>;
|
|
3273
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHref, "a[routerLink],area[routerLink]", never, { "target": "target"; "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never,
|
|
3293
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHref, "a[routerLink],area[routerLink]", never, { "target": "target"; "queryParams": "queryParams"; "fragment": "fragment"; "queryParamsHandling": "queryParamsHandling"; "preserveFragment": "preserveFragment"; "skipLocationChange": "skipLocationChange"; "replaceUrl": "replaceUrl"; "state": "state"; "relativeTo": "relativeTo"; "routerLink": "routerLink"; }, {}, never, never, true>;
|
|
3274
3294
|
}
|
|
3275
3295
|
|
|
3276
3296
|
/**
|
|
@@ -3295,7 +3315,7 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
|
|
3295
3315
|
* @publicApi
|
|
3296
3316
|
*/
|
|
3297
3317
|
export declare class RouterModule {
|
|
3298
|
-
constructor(guard: any
|
|
3318
|
+
constructor(guard: any);
|
|
3299
3319
|
/**
|
|
3300
3320
|
* Creates and configures a module with all the router providers and directives.
|
|
3301
3321
|
* Optionally sets up an application listener to perform an initial navigation.
|
|
@@ -3332,8 +3352,8 @@ export declare class RouterModule {
|
|
|
3332
3352
|
*
|
|
3333
3353
|
*/
|
|
3334
3354
|
static forChild(routes: Routes): ModuleWithProviders<RouterModule>;
|
|
3335
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RouterModule, [{ optional: true; }
|
|
3336
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RouterModule, [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent],
|
|
3355
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterModule, [{ optional: true; }]>;
|
|
3356
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RouterModule, never, [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent], [typeof i1.RouterOutlet, typeof i2.RouterLink, typeof i2.RouterLinkWithHref, typeof i3.RouterLinkActive, typeof i4.ɵEmptyOutletComponent]>;
|
|
3337
3357
|
static ɵinj: i0.ɵɵInjectorDeclaration<RouterModule>;
|
|
3338
3358
|
}
|
|
3339
3359
|
|
|
@@ -3432,7 +3452,7 @@ export declare class RouterOutlet implements OnDestroy, OnInit, RouterOutletCont
|
|
|
3432
3452
|
deactivate(): void;
|
|
3433
3453
|
activateWith(activatedRoute: ActivatedRoute, resolverOrInjector?: ComponentFactoryResolver | EnvironmentInjector | null): void;
|
|
3434
3454
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterOutlet, [null, null, { attribute: "name"; }, null, null]>;
|
|
3435
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], {}, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never,
|
|
3455
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], {}, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never, true>;
|
|
3436
3456
|
}
|
|
3437
3457
|
|
|
3438
3458
|
/**
|
|
@@ -3739,6 +3759,8 @@ export declare abstract class TitleStrategy {
|
|
|
3739
3759
|
* `Route.title` property, which can either be a static string or a resolved value.
|
|
3740
3760
|
*/
|
|
3741
3761
|
getResolvedTitleForRoute(snapshot: ActivatedRouteSnapshot): any;
|
|
3762
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TitleStrategy, never>;
|
|
3763
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TitleStrategy>;
|
|
3742
3764
|
}
|
|
3743
3765
|
|
|
3744
3766
|
|
|
@@ -4021,6 +4043,8 @@ export declare abstract class UrlSerializer {
|
|
|
4021
4043
|
abstract parse(url: string): UrlTree;
|
|
4022
4044
|
/** Converts a `UrlTree` into a url */
|
|
4023
4045
|
abstract serialize(tree: UrlTree): string;
|
|
4046
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UrlSerializer, never>;
|
|
4047
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UrlSerializer>;
|
|
4024
4048
|
}
|
|
4025
4049
|
|
|
4026
4050
|
/**
|
|
@@ -4083,7 +4107,7 @@ export declare function ɵassignExtraOptionsToRouter(opts: ExtraOptions, router:
|
|
|
4083
4107
|
*/
|
|
4084
4108
|
export declare class ɵEmptyOutletComponent {
|
|
4085
4109
|
static ɵfac: i0.ɵɵFactoryDeclaration<ɵEmptyOutletComponent, never>;
|
|
4086
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ɵEmptyOutletComponent, "ng-component", never, {}, {}, never, never,
|
|
4110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ɵEmptyOutletComponent, "ng-component", never, {}, {}, never, never, true>;
|
|
4087
4111
|
}
|
|
4088
4112
|
|
|
4089
4113
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0-next.0",
|
|
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": "14.
|
|
28
|
-
"@angular/common": "14.
|
|
29
|
-
"@angular/platform-browser": "14.
|
|
27
|
+
"@angular/core": "14.2.0-next.0",
|
|
28
|
+
"@angular/common": "14.2.0-next.0",
|
|
29
|
+
"@angular/platform-browser": "14.2.0-next.0",
|
|
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 v14.
|
|
2
|
+
* @license Angular v14.2.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import { ChildrenOutletContexts } from '@angular/router';
|
|
9
9
|
import { Compiler } from '@angular/core';
|
|
10
|
-
import { DefaultTitleStrategy } from '@angular/router';
|
|
11
10
|
import { ExtraOptions } from '@angular/router';
|
|
12
11
|
import * as i0 from '@angular/core';
|
|
13
12
|
import * as i1 from '@angular/router';
|
|
@@ -65,6 +64,6 @@ export declare function setupTestingRouter(urlSerializer: UrlSerializer, context
|
|
|
65
64
|
* Router setup factory function used for testing. Only used internally to keep the factory that's
|
|
66
65
|
* marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).
|
|
67
66
|
*/
|
|
68
|
-
export declare function setupTestingRouterInternal(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy
|
|
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;
|
|
69
68
|
|
|
70
69
|
export { }
|
package/upgrade/index.d.ts
CHANGED