@angular/router 14.0.0-next.9 → 14.0.0-rc.2
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/apply_redirects.mjs +52 -48
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/create_url_tree.mjs +25 -11
- package/esm2020/src/directives/router_link.mjs +6 -6
- package/esm2020/src/directives/router_link_active.mjs +22 -4
- package/esm2020/src/directives/router_outlet.mjs +25 -16
- package/esm2020/src/events.mjs +57 -1
- package/esm2020/src/index.mjs +1 -1
- package/esm2020/src/models.mjs +2 -7
- package/esm2020/src/operators/activate_routes.mjs +7 -14
- package/esm2020/src/operators/apply_redirects.mjs +3 -3
- package/esm2020/src/operators/resolve_data.mjs +14 -24
- package/esm2020/src/page_title_strategy.mjs +3 -3
- package/esm2020/src/recognize.mjs +24 -6
- package/esm2020/src/router.mjs +43 -25
- package/esm2020/src/router_config_loader.mjs +74 -27
- package/esm2020/src/router_module.mjs +14 -14
- package/esm2020/src/router_outlet_context.mjs +6 -1
- package/esm2020/src/router_preloader.mjs +48 -32
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/router_state.mjs +4 -4
- package/esm2020/src/url_tree.mjs +1 -1
- package/esm2020/src/utils/config.mjs +86 -11
- package/esm2020/src/utils/config_matching.mjs +4 -1
- package/esm2020/src/utils/preactivation.mjs +5 -14
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +927 -670
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +912 -673
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/{router.d.ts → index.d.ts} +3858 -3730
- package/package.json +9 -9
- package/testing/{testing.d.ts → index.d.ts} +65 -64
- package/upgrade/{upgrade.d.ts → index.d.ts} +51 -50
- package/testing/package.json +0 -9
- package/upgrade/package.json +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "14.0.0-
|
|
3
|
+
"version": "14.0.0-rc.2",
|
|
4
4
|
"description": "Angular - the routing library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/angular/angular/issues"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://github.com/angular/angular/tree/
|
|
22
|
+
"homepage": "https://github.com/angular/angular/tree/main/packages/router",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"tslib": "^2.3.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@angular/core": "14.0.0-
|
|
28
|
-
"@angular/common": "14.0.0-
|
|
29
|
-
"@angular/platform-browser": "14.0.0-
|
|
27
|
+
"@angular/core": "14.0.0-rc.2",
|
|
28
|
+
"@angular/common": "14.0.0-rc.2",
|
|
29
|
+
"@angular/platform-browser": "14.0.0-rc.2",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"fesm2020": "./fesm2020/router.mjs",
|
|
54
54
|
"fesm2015": "./fesm2015/router.mjs",
|
|
55
55
|
"esm2020": "./esm2020/router.mjs",
|
|
56
|
-
"typings": "./
|
|
56
|
+
"typings": "./index.d.ts",
|
|
57
57
|
"module": "./fesm2015/router.mjs",
|
|
58
58
|
"es2020": "./fesm2020/router.mjs",
|
|
59
59
|
"type": "module",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"default": "./package.json"
|
|
63
63
|
},
|
|
64
64
|
".": {
|
|
65
|
-
"types": "./
|
|
65
|
+
"types": "./index.d.ts",
|
|
66
66
|
"esm2020": "./esm2020/router.mjs",
|
|
67
67
|
"es2020": "./fesm2020/router.mjs",
|
|
68
68
|
"es2015": "./fesm2015/router.mjs",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"default": "./fesm2020/router.mjs"
|
|
71
71
|
},
|
|
72
72
|
"./testing": {
|
|
73
|
-
"types": "./testing/
|
|
73
|
+
"types": "./testing/index.d.ts",
|
|
74
74
|
"esm2020": "./esm2020/testing/testing.mjs",
|
|
75
75
|
"es2020": "./fesm2020/testing.mjs",
|
|
76
76
|
"es2015": "./fesm2015/testing.mjs",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"default": "./fesm2020/testing.mjs"
|
|
79
79
|
},
|
|
80
80
|
"./upgrade": {
|
|
81
|
-
"types": "./upgrade/
|
|
81
|
+
"types": "./upgrade/index.d.ts",
|
|
82
82
|
"esm2020": "./esm2020/upgrade/upgrade.mjs",
|
|
83
83
|
"es2020": "./fesm2020/upgrade.mjs",
|
|
84
84
|
"es2015": "./fesm2015/upgrade.mjs",
|
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-
|
|
2
|
+
* @license Angular v14.0.0-rc.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
static
|
|
52
|
-
static
|
|
53
|
-
static
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
7
|
+
|
|
8
|
+
import { ChildrenOutletContexts } from '@angular/router';
|
|
9
|
+
import { Compiler } from '@angular/core';
|
|
10
|
+
import { DefaultTitleStrategy } from '@angular/router';
|
|
11
|
+
import { ExtraOptions } from '@angular/router';
|
|
12
|
+
import * as i0 from '@angular/core';
|
|
13
|
+
import * as i1 from '@angular/router';
|
|
14
|
+
import { Injector } from '@angular/core';
|
|
15
|
+
import { Location as Location_2 } from '@angular/common';
|
|
16
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
17
|
+
import { Route } from '@angular/router';
|
|
18
|
+
import { Router } from '@angular/router';
|
|
19
|
+
import { RouteReuseStrategy } from '@angular/router';
|
|
20
|
+
import { Routes } from '@angular/router';
|
|
21
|
+
import { TitleStrategy } from '@angular/router';
|
|
22
|
+
import { UrlHandlingStrategy } from '@angular/router';
|
|
23
|
+
import { UrlSerializer } from '@angular/router';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
*
|
|
28
|
+
* Sets up the router to be used for testing.
|
|
29
|
+
*
|
|
30
|
+
* The modules sets up the router to be used for testing.
|
|
31
|
+
* It provides spy implementations of `Location` and `LocationStrategy`.
|
|
32
|
+
*
|
|
33
|
+
* @usageNotes
|
|
34
|
+
* ### Example
|
|
35
|
+
*
|
|
36
|
+
* ```
|
|
37
|
+
* beforeEach(() => {
|
|
38
|
+
* TestBed.configureTestingModule({
|
|
39
|
+
* imports: [
|
|
40
|
+
* RouterTestingModule.withRoutes(
|
|
41
|
+
* [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]
|
|
42
|
+
* )
|
|
43
|
+
* ]
|
|
44
|
+
* });
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @publicApi
|
|
49
|
+
*/
|
|
50
|
+
export declare class RouterTestingModule {
|
|
51
|
+
static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>;
|
|
53
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof i1.RouterModule]>;
|
|
54
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Router setup factory function used for testing.
|
|
59
|
+
*
|
|
60
|
+
* @publicApi
|
|
61
|
+
*/
|
|
62
|
+
export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy): Router;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Router setup factory function used for testing. Only used internally to keep the factory that's
|
|
66
|
+
* marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).
|
|
67
|
+
*/
|
|
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, defaultTitleStrategy?: DefaultTitleStrategy, titleStrategy?: TitleStrategy): Router;
|
|
69
|
+
|
|
70
|
+
export { }
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-
|
|
2
|
+
* @license Angular v14.0.0-rc.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @param
|
|
48
|
-
* @
|
|
49
|
-
* @see `
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
7
|
+
|
|
8
|
+
import { ComponentRef } from '@angular/core';
|
|
9
|
+
import { InjectionToken } from '@angular/core';
|
|
10
|
+
import { UpgradeModule } from '@angular/upgrade/static';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates an initializer that sets up `ngRoute` integration
|
|
14
|
+
* along with setting up the Angular router.
|
|
15
|
+
*
|
|
16
|
+
* @usageNotes
|
|
17
|
+
*
|
|
18
|
+
* <code-example language="typescript">
|
|
19
|
+
* @NgModule({
|
|
20
|
+
* imports: [
|
|
21
|
+
* RouterModule.forRoot(SOME_ROUTES),
|
|
22
|
+
* UpgradeModule
|
|
23
|
+
* ],
|
|
24
|
+
* providers: [
|
|
25
|
+
* RouterUpgradeInitializer
|
|
26
|
+
* ]
|
|
27
|
+
* })
|
|
28
|
+
* export class AppModule {
|
|
29
|
+
* ngDoBootstrap() {}
|
|
30
|
+
* }
|
|
31
|
+
* </code-example>
|
|
32
|
+
*
|
|
33
|
+
* @publicApi
|
|
34
|
+
*/
|
|
35
|
+
export declare const RouterUpgradeInitializer: {
|
|
36
|
+
provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
|
37
|
+
multi: boolean;
|
|
38
|
+
useFactory: (ngUpgrade: UpgradeModule) => () => void;
|
|
39
|
+
deps: (typeof UpgradeModule)[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Sets up a location change listener to trigger `history.pushState`.
|
|
44
|
+
* Works around the problem that `onPopState` does not trigger `history.pushState`.
|
|
45
|
+
* Must be called *after* calling `UpgradeModule.bootstrap`.
|
|
46
|
+
*
|
|
47
|
+
* @param ngUpgrade The upgrade NgModule.
|
|
48
|
+
* @param urlType The location strategy.
|
|
49
|
+
* @see `HashLocationStrategy`
|
|
50
|
+
* @see `PathLocationStrategy`
|
|
51
|
+
*
|
|
52
|
+
* @publicApi
|
|
53
|
+
*/
|
|
54
|
+
export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
|
|
55
|
+
|
|
56
|
+
export { }
|
package/testing/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@angular/router/testing",
|
|
3
|
-
"fesm2020": "../fesm2020/testing.mjs",
|
|
4
|
-
"fesm2015": "../fesm2015/testing.mjs",
|
|
5
|
-
"esm2020": "../esm2020/testing/testing.mjs",
|
|
6
|
-
"typings": "./testing.d.ts",
|
|
7
|
-
"module": "../fesm2015/testing.mjs",
|
|
8
|
-
"es2020": "../fesm2020/testing.mjs"
|
|
9
|
-
}
|
package/upgrade/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@angular/router/upgrade",
|
|
3
|
-
"sideEffects": false,
|
|
4
|
-
"fesm2020": "../fesm2020/upgrade.mjs",
|
|
5
|
-
"fesm2015": "../fesm2015/upgrade.mjs",
|
|
6
|
-
"esm2020": "../esm2020/upgrade/upgrade.mjs",
|
|
7
|
-
"typings": "./upgrade.d.ts",
|
|
8
|
-
"module": "../fesm2015/upgrade.mjs",
|
|
9
|
-
"es2020": "../fesm2020/upgrade.mjs"
|
|
10
|
-
}
|