@angular/router 17.0.0-next.3 → 17.0.0-next.5
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/esm2022/src/components/empty_outlet.mjs +3 -3
- package/esm2022/src/directives/router_link.mjs +3 -3
- package/esm2022/src/directives/router_link_active.mjs +3 -3
- package/esm2022/src/directives/router_outlet.mjs +6 -6
- package/esm2022/src/index.mjs +2 -2
- package/esm2022/src/navigation_transition.mjs +45 -14
- package/esm2022/src/operators/prioritized_guard_value.mjs +2 -2
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/private_export.mjs +2 -1
- package/esm2022/src/provide_router.mjs +33 -1
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +7 -25
- package/esm2022/src/router_config.mjs +1 -1
- package/esm2022/src/router_config_loader.mjs +51 -43
- package/esm2022/src/router_module.mjs +7 -6
- package/esm2022/src/router_outlet_context.mjs +3 -3
- package/esm2022/src/router_preloader.mjs +9 -9
- package/esm2022/src/router_scroller.mjs +3 -3
- package/esm2022/src/shared.mjs +2 -2
- package/esm2022/src/state_manager.mjs +4 -36
- package/esm2022/src/url_handling_strategy.mjs +6 -6
- package/esm2022/src/url_tree.mjs +3 -3
- package/esm2022/src/utils/view_transition.mjs +44 -0
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/router_testing_harness.mjs +6 -6
- package/esm2022/testing/src/router_testing_module.mjs +4 -4
- package/fesm2022/router.mjs +229 -174
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +62 -27
- package/package.json +5 -5
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.5
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -109,16 +109,16 @@ class RouterTestingModule {
|
|
|
109
109
|
]
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
113
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.
|
|
114
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
113
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.5", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] }); }
|
|
114
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RouterTestingModule, providers: [
|
|
115
115
|
ɵROUTER_PROVIDERS,
|
|
116
116
|
provideLocationMocks(),
|
|
117
117
|
withPreloading(NoPreloading).ɵproviders,
|
|
118
118
|
{ provide: ROUTES, multi: true, useValue: [] },
|
|
119
119
|
], imports: [RouterModule] }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RouterTestingModule, decorators: [{
|
|
122
122
|
type: NgModule,
|
|
123
123
|
args: [{
|
|
124
124
|
exports: [RouterModule],
|
|
@@ -147,18 +147,18 @@ class RootFixtureService {
|
|
|
147
147
|
this.fixture.detectChanges();
|
|
148
148
|
return this.fixture;
|
|
149
149
|
}
|
|
150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
151
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
151
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RootFixtureService, providedIn: 'root' }); }
|
|
152
152
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RootFixtureService, decorators: [{
|
|
154
154
|
type: Injectable,
|
|
155
155
|
args: [{ providedIn: 'root' }]
|
|
156
156
|
}] });
|
|
157
157
|
class RootCmp {
|
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.5", type: RootCmp, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "outlet", first: true, predicate: RouterOutlet, descendants: true }], ngImport: i0, template: '<router-outlet></router-outlet>', isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
160
160
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.5", ngImport: i0, type: RootCmp, decorators: [{
|
|
162
162
|
type: Component,
|
|
163
163
|
args: [{
|
|
164
164
|
standalone: true,
|
package/fesm2022/upgrade.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.5
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1030,6 +1030,15 @@ export declare interface ExtraOptions extends InMemoryScrollingOptions, RouterCo
|
|
|
1030
1030
|
* component in `Route` configurations.
|
|
1031
1031
|
*/
|
|
1032
1032
|
bindToComponentInputs?: boolean;
|
|
1033
|
+
/**
|
|
1034
|
+
* When true, enables view transitions in the Router by running the route activation and
|
|
1035
|
+
* deactivation inside of `document.startViewTransition`.
|
|
1036
|
+
*
|
|
1037
|
+
* @see https://developer.chrome.com/docs/web-platform/view-transitions/
|
|
1038
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
|
|
1039
|
+
* @experimental
|
|
1040
|
+
*/
|
|
1041
|
+
enableViewTransitions?: boolean;
|
|
1033
1042
|
/**
|
|
1034
1043
|
* A custom error handler for failed navigations.
|
|
1035
1044
|
* If the handler returns a value, the navigation Promise is resolved with this value.
|
|
@@ -1052,19 +1061,6 @@ export declare interface ExtraOptions extends InMemoryScrollingOptions, RouterCo
|
|
|
1052
1061
|
* it restores scroll position.
|
|
1053
1062
|
*/
|
|
1054
1063
|
scrollOffset?: [number, number] | (() => [number, number]);
|
|
1055
|
-
/**
|
|
1056
|
-
* A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains
|
|
1057
|
-
* invalid character sequences.
|
|
1058
|
-
* The default implementation is to redirect to the root URL, dropping
|
|
1059
|
-
* any path or parameter information. The function takes three parameters:
|
|
1060
|
-
*
|
|
1061
|
-
* - `'URIError'` - Error thrown when parsing a bad URL.
|
|
1062
|
-
* - `'UrlSerializer'` - UrlSerializer that’s configured with the router.
|
|
1063
|
-
* - `'url'` - The malformed URL that caused the URIError
|
|
1064
|
-
*
|
|
1065
|
-
* @deprecated URI parsing errors should be handled in the `UrlSerializer` instead.
|
|
1066
|
-
* */
|
|
1067
|
-
malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
|
1068
1064
|
}
|
|
1069
1065
|
|
|
1070
1066
|
/**
|
|
@@ -2701,7 +2697,6 @@ declare class RoutedComponentInputBinder {
|
|
|
2701
2697
|
export declare class Router {
|
|
2702
2698
|
private get currentUrlTree();
|
|
2703
2699
|
private get rawUrlTree();
|
|
2704
|
-
private get browserUrlTree();
|
|
2705
2700
|
private disposed;
|
|
2706
2701
|
private locationSubscription?;
|
|
2707
2702
|
private isNgZoneEnabled;
|
|
@@ -2736,15 +2731,6 @@ export declare class Router {
|
|
|
2736
2731
|
* @see {@link withNavigationErrorHandler}
|
|
2737
2732
|
*/
|
|
2738
2733
|
errorHandler: (error: any) => any;
|
|
2739
|
-
/**
|
|
2740
|
-
* A handler for errors thrown by `Router.parseUrl(url)`
|
|
2741
|
-
* when `url` contains an invalid character.
|
|
2742
|
-
* The most common case is a `%` sign
|
|
2743
|
-
* that's not encoded and is not part of a percent encoded sequence.
|
|
2744
|
-
*
|
|
2745
|
-
* @see {@link RouterModule}
|
|
2746
|
-
*/
|
|
2747
|
-
private malformedUriErrorHandler;
|
|
2748
2734
|
/**
|
|
2749
2735
|
* True if at least one navigation event has occurred,
|
|
2750
2736
|
* false otherwise.
|
|
@@ -2983,7 +2969,6 @@ declare class RouterConfigLoader {
|
|
|
2983
2969
|
private readonly compiler;
|
|
2984
2970
|
loadComponent(route: Route): Observable<Type<unknown>>;
|
|
2985
2971
|
loadChildren(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig>;
|
|
2986
|
-
private loadModuleFactoryOrRoutes;
|
|
2987
2972
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterConfigLoader, never>;
|
|
2988
2973
|
static ɵprov: i0.ɵɵInjectableDeclaration<RouterConfigLoader>;
|
|
2989
2974
|
}
|
|
@@ -3143,7 +3128,8 @@ declare const enum RouterFeatureKind {
|
|
|
3143
3128
|
RouterConfigurationFeature = 5,
|
|
3144
3129
|
RouterHashLocationFeature = 6,
|
|
3145
3130
|
NavigationErrorHandlerFeature = 7,
|
|
3146
|
-
ComponentInputBindingFeature = 8
|
|
3131
|
+
ComponentInputBindingFeature = 8,
|
|
3132
|
+
ViewTransitionsFeature = 9
|
|
3147
3133
|
}
|
|
3148
3134
|
|
|
3149
3135
|
/**
|
|
@@ -3156,7 +3142,7 @@ declare const enum RouterFeatureKind {
|
|
|
3156
3142
|
*
|
|
3157
3143
|
* @publicApi
|
|
3158
3144
|
*/
|
|
3159
|
-
export declare type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature;
|
|
3145
|
+
export declare type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature;
|
|
3160
3146
|
|
|
3161
3147
|
/**
|
|
3162
3148
|
* A type alias for providers returned by `withHashLocation` for use with `provideRouter`.
|
|
@@ -4334,6 +4320,16 @@ export declare class UrlTree {
|
|
|
4334
4320
|
*/
|
|
4335
4321
|
export declare const VERSION: Version;
|
|
4336
4322
|
|
|
4323
|
+
/**
|
|
4324
|
+
* A type alias for providers returned by `withViewTransitions` for use with `provideRouter`.
|
|
4325
|
+
*
|
|
4326
|
+
* @see {@link withViewTransitions}
|
|
4327
|
+
* @see {@link provideRouter}
|
|
4328
|
+
*
|
|
4329
|
+
* @publicApi
|
|
4330
|
+
*/
|
|
4331
|
+
export declare type ViewTransitionsFeature = RouterFeature<RouterFeatureKind.ViewTransitionsFeature>;
|
|
4332
|
+
|
|
4337
4333
|
/**
|
|
4338
4334
|
* Enables binding information from the `Router` state directly to the inputs of the component in
|
|
4339
4335
|
* `Route` configurations.
|
|
@@ -4579,6 +4575,35 @@ export declare function withPreloading(preloadingStrategy: Type<PreloadingStrate
|
|
|
4579
4575
|
*/
|
|
4580
4576
|
export declare function withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature;
|
|
4581
4577
|
|
|
4578
|
+
/**
|
|
4579
|
+
* Enables view transitions in the Router by running the route activation and deactivation inside of
|
|
4580
|
+
* `document.startViewTransition`.
|
|
4581
|
+
*
|
|
4582
|
+
* Note: The View Transitions API is not available in all browsers. If the browser does not support
|
|
4583
|
+
* view transitions, the Router will not attempt to start a view transition and continue processing
|
|
4584
|
+
* the navigation as usual.
|
|
4585
|
+
*
|
|
4586
|
+
* @usageNotes
|
|
4587
|
+
*
|
|
4588
|
+
* Basic example of how you can enable the feature:
|
|
4589
|
+
* ```
|
|
4590
|
+
* const appRoutes: Routes = [];
|
|
4591
|
+
* bootstrapApplication(AppComponent,
|
|
4592
|
+
* {
|
|
4593
|
+
* providers: [
|
|
4594
|
+
* provideRouter(appRoutes, withViewTransitions())
|
|
4595
|
+
* ]
|
|
4596
|
+
* }
|
|
4597
|
+
* );
|
|
4598
|
+
* ```
|
|
4599
|
+
*
|
|
4600
|
+
* @returns A set of providers for use with `provideRouter`.
|
|
4601
|
+
* @see https://developer.chrome.com/docs/web-platform/view-transitions/
|
|
4602
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
|
|
4603
|
+
* @experimental
|
|
4604
|
+
*/
|
|
4605
|
+
export declare function withViewTransitions(): ViewTransitionsFeature;
|
|
4606
|
+
|
|
4582
4607
|
/**
|
|
4583
4608
|
* Performs the given action once the router finishes its next/current navigation.
|
|
4584
4609
|
*
|
|
@@ -4606,6 +4631,16 @@ export declare class ɵEmptyOutletComponent {
|
|
|
4606
4631
|
static ɵcmp: i0.ɵɵComponentDeclaration<ɵEmptyOutletComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
4607
4632
|
}
|
|
4608
4633
|
|
|
4634
|
+
/**
|
|
4635
|
+
* Executes a `route.loadChildren` callback and converts the result to an array of child routes and
|
|
4636
|
+
* an injector if that callback returned a module.
|
|
4637
|
+
*
|
|
4638
|
+
* This function is used for the route discovery during prerendering
|
|
4639
|
+
* in @angular-devkit/build-angular. If there are any updates to the contract here, it will require
|
|
4640
|
+
* an update to the extractor.
|
|
4641
|
+
*/
|
|
4642
|
+
export declare function ɵloadChildren(route: Route, compiler: Compiler, parentInjector: Injector, onLoadEndListener?: (r: Route) => void): Observable<LoadedRouterConfig>;
|
|
4643
|
+
|
|
4609
4644
|
export declare type ɵRestoredState = {
|
|
4610
4645
|
[k: string]: any;
|
|
4611
4646
|
navigationId: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "17.0.0-next.
|
|
3
|
+
"version": "17.0.0-next.5",
|
|
4
4
|
"description": "Angular - the routing library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "angular",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": "
|
|
17
|
+
"node": ">=18.13.0"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/angular/angular/issues"
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"tslib": "^2.3.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@angular/core": "17.0.0-next.
|
|
28
|
-
"@angular/common": "17.0.0-next.
|
|
29
|
-
"@angular/platform-browser": "17.0.0-next.
|
|
27
|
+
"@angular/core": "17.0.0-next.5",
|
|
28
|
+
"@angular/common": "17.0.0-next.5",
|
|
29
|
+
"@angular/platform-browser": "17.0.0-next.5",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
package/testing/index.d.ts
CHANGED
package/upgrade/index.d.ts
CHANGED