@angular/router 22.0.0-next.1 → 22.0.0-next.10
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/fesm2022/_router-chunk.mjs +110 -73
- package/fesm2022/_router-chunk.mjs.map +1 -1
- package/fesm2022/_router_module-chunk.mjs +44 -38
- package/fesm2022/_router_module-chunk.mjs.map +1 -1
- package/fesm2022/router.mjs +2 -2
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +18 -16
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +1 -1
- package/fesm2022/upgrade.mjs.map +1 -1
- package/package.json +4 -4
- package/types/_router_module-chunk.d.ts +293 -268
- package/types/router.d.ts +22 -7
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.10
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { DOCUMENT, Location } from '@angular/common';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { ɵisPromise as _isPromise,
|
|
9
|
+
import { ɵisPromise as _isPromise, ɵRuntimeError as _RuntimeError, computed, Injectable, InjectionToken, EventEmitter, input, inject, ViewContainerRef, ChangeDetectorRef, Output, Input, Directive, reflectComponentType, ChangeDetectionStrategy, Component, runInInjectionContext, ɵisInjectable as _isInjectable, ɵisNgModule as _isNgModule, isStandalone, createEnvironmentInjector, Compiler, NgModuleFactory, ɵresolveComponentResources as _resolveComponentResources, afterNextRender, signal, EnvironmentInjector, DestroyRef, untracked, ɵConsole as _Console, ɵPendingTasksInternal as _PendingTasksInternal, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵformatRuntimeError as _formatRuntimeError } from '@angular/core';
|
|
10
10
|
import { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, Observable, concat, defer, pipe, EMPTY, throwError, Subject, Subscription } from 'rxjs';
|
|
11
11
|
import { first, map, switchMap, take, startWith, filter, takeUntil, mergeMap, concatMap, tap, takeLast, catchError, finalize } from 'rxjs/operators';
|
|
12
12
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -327,7 +327,7 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
327
327
|
class UrlSerializer {
|
|
328
328
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
329
329
|
minVersion: "12.0.0",
|
|
330
|
-
version: "22.0.0-next.
|
|
330
|
+
version: "22.0.0-next.10",
|
|
331
331
|
ngImport: i0,
|
|
332
332
|
type: UrlSerializer,
|
|
333
333
|
deps: [],
|
|
@@ -335,7 +335,7 @@ class UrlSerializer {
|
|
|
335
335
|
});
|
|
336
336
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
337
337
|
minVersion: "12.0.0",
|
|
338
|
-
version: "22.0.0-next.
|
|
338
|
+
version: "22.0.0-next.10",
|
|
339
339
|
ngImport: i0,
|
|
340
340
|
type: UrlSerializer,
|
|
341
341
|
providedIn: 'root',
|
|
@@ -344,7 +344,7 @@ class UrlSerializer {
|
|
|
344
344
|
}
|
|
345
345
|
i0.ɵɵngDeclareClassMetadata({
|
|
346
346
|
minVersion: "12.0.0",
|
|
347
|
-
version: "22.0.0-next.
|
|
347
|
+
version: "22.0.0-next.10",
|
|
348
348
|
ngImport: i0,
|
|
349
349
|
type: UrlSerializer,
|
|
350
350
|
decorators: [{
|
|
@@ -455,7 +455,7 @@ class UrlParser {
|
|
|
455
455
|
this.remaining = url;
|
|
456
456
|
}
|
|
457
457
|
parseRootSegment() {
|
|
458
|
-
this.consumeOptional('/')
|
|
458
|
+
while (this.consumeOptional('/')) {}
|
|
459
459
|
if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {
|
|
460
460
|
return new UrlSegmentGroup([], {});
|
|
461
461
|
}
|
|
@@ -1301,7 +1301,7 @@ class ChildrenOutletContexts {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1303
1303
|
minVersion: "12.0.0",
|
|
1304
|
-
version: "22.0.0-next.
|
|
1304
|
+
version: "22.0.0-next.10",
|
|
1305
1305
|
ngImport: i0,
|
|
1306
1306
|
type: ChildrenOutletContexts,
|
|
1307
1307
|
deps: [{
|
|
@@ -1311,7 +1311,7 @@ class ChildrenOutletContexts {
|
|
|
1311
1311
|
});
|
|
1312
1312
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1313
1313
|
minVersion: "12.0.0",
|
|
1314
|
-
version: "22.0.0-next.
|
|
1314
|
+
version: "22.0.0-next.10",
|
|
1315
1315
|
ngImport: i0,
|
|
1316
1316
|
type: ChildrenOutletContexts,
|
|
1317
1317
|
providedIn: 'root'
|
|
@@ -1319,7 +1319,7 @@ class ChildrenOutletContexts {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
i0.ɵɵngDeclareClassMetadata({
|
|
1321
1321
|
minVersion: "12.0.0",
|
|
1322
|
-
version: "22.0.0-next.
|
|
1322
|
+
version: "22.0.0-next.10",
|
|
1323
1323
|
ngImport: i0,
|
|
1324
1324
|
type: ChildrenOutletContexts,
|
|
1325
1325
|
decorators: [{
|
|
@@ -1496,7 +1496,8 @@ class ActivatedRoute {
|
|
|
1496
1496
|
return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
|
|
1499
|
+
const DEFAULT_PARAMS_INHERITANCE_STRATEGY = 'always';
|
|
1500
|
+
function getInherited(route, parent, paramsInheritanceStrategy) {
|
|
1500
1501
|
let inherited;
|
|
1501
1502
|
const {
|
|
1502
1503
|
routeConfig
|
|
@@ -1776,7 +1777,7 @@ class RouterOutlet {
|
|
|
1776
1777
|
}
|
|
1777
1778
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1778
1779
|
minVersion: "12.0.0",
|
|
1779
|
-
version: "22.0.0-next.
|
|
1780
|
+
version: "22.0.0-next.10",
|
|
1780
1781
|
ngImport: i0,
|
|
1781
1782
|
type: RouterOutlet,
|
|
1782
1783
|
deps: [],
|
|
@@ -1784,7 +1785,7 @@ class RouterOutlet {
|
|
|
1784
1785
|
});
|
|
1785
1786
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1786
1787
|
minVersion: "17.1.0",
|
|
1787
|
-
version: "22.0.0-next.
|
|
1788
|
+
version: "22.0.0-next.10",
|
|
1788
1789
|
type: RouterOutlet,
|
|
1789
1790
|
isStandalone: true,
|
|
1790
1791
|
selector: "router-outlet",
|
|
@@ -1817,7 +1818,7 @@ class RouterOutlet {
|
|
|
1817
1818
|
}
|
|
1818
1819
|
i0.ɵɵngDeclareClassMetadata({
|
|
1819
1820
|
minVersion: "12.0.0",
|
|
1820
|
-
version: "22.0.0-next.
|
|
1821
|
+
version: "22.0.0-next.10",
|
|
1821
1822
|
ngImport: i0,
|
|
1822
1823
|
type: RouterOutlet,
|
|
1823
1824
|
decorators: [{
|
|
@@ -1883,7 +1884,12 @@ class OutletInjector {
|
|
|
1883
1884
|
}
|
|
1884
1885
|
const INPUT_BINDER = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Router Input Binder' : '');
|
|
1885
1886
|
class RoutedComponentInputBinder {
|
|
1887
|
+
options;
|
|
1886
1888
|
outletDataSubscriptions = new Map();
|
|
1889
|
+
constructor(options) {
|
|
1890
|
+
this.options = options;
|
|
1891
|
+
this.options.queryParams ??= true;
|
|
1892
|
+
}
|
|
1887
1893
|
bindActivatedRouteToOutletComponent(outlet) {
|
|
1888
1894
|
this.unsubscribeFromRouteData(outlet);
|
|
1889
1895
|
this.subscribeToRouteData(outlet);
|
|
@@ -1896,7 +1902,7 @@ class RoutedComponentInputBinder {
|
|
|
1896
1902
|
const {
|
|
1897
1903
|
activatedRoute
|
|
1898
1904
|
} = outlet;
|
|
1899
|
-
const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {
|
|
1905
|
+
const dataSubscription = combineLatest([this.options.queryParams ? activatedRoute.queryParams : of({}), activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {
|
|
1900
1906
|
data = {
|
|
1901
1907
|
...queryParams,
|
|
1902
1908
|
...params,
|
|
@@ -1926,33 +1932,36 @@ class RoutedComponentInputBinder {
|
|
|
1926
1932
|
}
|
|
1927
1933
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1928
1934
|
minVersion: "12.0.0",
|
|
1929
|
-
version: "22.0.0-next.
|
|
1935
|
+
version: "22.0.0-next.10",
|
|
1930
1936
|
ngImport: i0,
|
|
1931
1937
|
type: RoutedComponentInputBinder,
|
|
1932
|
-
deps:
|
|
1938
|
+
deps: "invalid",
|
|
1933
1939
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
1934
1940
|
});
|
|
1935
1941
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1936
1942
|
minVersion: "12.0.0",
|
|
1937
|
-
version: "22.0.0-next.
|
|
1943
|
+
version: "22.0.0-next.10",
|
|
1938
1944
|
ngImport: i0,
|
|
1939
1945
|
type: RoutedComponentInputBinder
|
|
1940
1946
|
});
|
|
1941
1947
|
}
|
|
1942
1948
|
i0.ɵɵngDeclareClassMetadata({
|
|
1943
1949
|
minVersion: "12.0.0",
|
|
1944
|
-
version: "22.0.0-next.
|
|
1950
|
+
version: "22.0.0-next.10",
|
|
1945
1951
|
ngImport: i0,
|
|
1946
1952
|
type: RoutedComponentInputBinder,
|
|
1947
1953
|
decorators: [{
|
|
1948
1954
|
type: Injectable
|
|
1955
|
+
}],
|
|
1956
|
+
ctorParameters: () => [{
|
|
1957
|
+
type: undefined
|
|
1949
1958
|
}]
|
|
1950
1959
|
});
|
|
1951
1960
|
|
|
1952
1961
|
class ɵEmptyOutletComponent {
|
|
1953
1962
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1954
1963
|
minVersion: "12.0.0",
|
|
1955
|
-
version: "22.0.0-next.
|
|
1964
|
+
version: "22.0.0-next.10",
|
|
1956
1965
|
ngImport: i0,
|
|
1957
1966
|
type: ɵEmptyOutletComponent,
|
|
1958
1967
|
deps: [],
|
|
@@ -1960,7 +1969,7 @@ class ɵEmptyOutletComponent {
|
|
|
1960
1969
|
});
|
|
1961
1970
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1962
1971
|
minVersion: "14.0.0",
|
|
1963
|
-
version: "22.0.0-next.
|
|
1972
|
+
version: "22.0.0-next.10",
|
|
1964
1973
|
type: ɵEmptyOutletComponent,
|
|
1965
1974
|
isStandalone: true,
|
|
1966
1975
|
selector: "ng-component",
|
|
@@ -1975,12 +1984,13 @@ class ɵEmptyOutletComponent {
|
|
|
1975
1984
|
inputs: ["name", "routerOutletData"],
|
|
1976
1985
|
outputs: ["activate", "deactivate", "attach", "detach"],
|
|
1977
1986
|
exportAs: ["outlet"]
|
|
1978
|
-
}]
|
|
1987
|
+
}],
|
|
1988
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1979
1989
|
});
|
|
1980
1990
|
}
|
|
1981
1991
|
i0.ɵɵngDeclareClassMetadata({
|
|
1982
1992
|
minVersion: "12.0.0",
|
|
1983
|
-
version: "22.0.0-next.
|
|
1993
|
+
version: "22.0.0-next.10",
|
|
1984
1994
|
ngImport: i0,
|
|
1985
1995
|
type: ɵEmptyOutletComponent,
|
|
1986
1996
|
decorators: [{
|
|
@@ -1988,7 +1998,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1988
1998
|
args: [{
|
|
1989
1999
|
template: `<router-outlet />`,
|
|
1990
2000
|
imports: [RouterOutlet],
|
|
1991
|
-
exportAs: 'emptyRouterOutlet'
|
|
2001
|
+
exportAs: 'emptyRouterOutlet',
|
|
2002
|
+
changeDetection: ChangeDetectionStrategy.Eager
|
|
1992
2003
|
}]
|
|
1993
2004
|
}]
|
|
1994
2005
|
});
|
|
@@ -2821,8 +2832,8 @@ function match(segmentGroup, route, segments) {
|
|
|
2821
2832
|
positionalParamSegments: res.posParams ?? {}
|
|
2822
2833
|
};
|
|
2823
2834
|
}
|
|
2824
|
-
function split(segmentGroup, consumedSegments, slicedSegments, config) {
|
|
2825
|
-
if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {
|
|
2835
|
+
function split(segmentGroup, consumedSegments, slicedSegments, config, outlet) {
|
|
2836
|
+
if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config, outlet)) {
|
|
2826
2837
|
const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));
|
|
2827
2838
|
return {
|
|
2828
2839
|
segmentGroup: s,
|
|
@@ -2866,8 +2877,15 @@ function createChildrenForEmptyPaths(routes, primarySegment) {
|
|
|
2866
2877
|
}
|
|
2867
2878
|
return res;
|
|
2868
2879
|
}
|
|
2869
|
-
function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {
|
|
2870
|
-
return routes.some(r =>
|
|
2880
|
+
function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes, outlet) {
|
|
2881
|
+
return routes.some(r => {
|
|
2882
|
+
const matchesEmpty = emptyPathMatch(segmentGroup, slicedSegments, r);
|
|
2883
|
+
if (!matchesEmpty) return false;
|
|
2884
|
+
const isNamedOutlet = getOutlet(r) !== PRIMARY_OUTLET;
|
|
2885
|
+
if (!isNamedOutlet) return false;
|
|
2886
|
+
const isSelfEvaluating = outlet !== undefined && getOutlet(r) === outlet;
|
|
2887
|
+
return !isSelfEvaluating;
|
|
2888
|
+
});
|
|
2871
2889
|
}
|
|
2872
2890
|
function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {
|
|
2873
2891
|
return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));
|
|
@@ -2883,7 +2901,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
|
|
|
2883
2901
|
}
|
|
2884
2902
|
|
|
2885
2903
|
class NoLeftoversInUrl {}
|
|
2886
|
-
async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy
|
|
2904
|
+
async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy, abortSignal) {
|
|
2887
2905
|
return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer, abortSignal).recognize();
|
|
2888
2906
|
}
|
|
2889
2907
|
const MAX_ALLOWED_REDIRECTS = 31;
|
|
@@ -3069,7 +3087,7 @@ class Recognizer {
|
|
|
3069
3087
|
const {
|
|
3070
3088
|
segmentGroup,
|
|
3071
3089
|
slicedSegments
|
|
3072
|
-
} = split(rawSegment, consumedSegments, remainingSegments, childConfig);
|
|
3090
|
+
} = split(rawSegment, consumedSegments, remainingSegments, childConfig, outlet);
|
|
3073
3091
|
if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
|
|
3074
3092
|
const children = await this.processChildren(childInjector, childConfig, segmentGroup, snapshot);
|
|
3075
3093
|
return new TreeNode(snapshot, children);
|
|
@@ -3283,7 +3301,7 @@ class TitleStrategy {
|
|
|
3283
3301
|
}
|
|
3284
3302
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3285
3303
|
minVersion: "12.0.0",
|
|
3286
|
-
version: "22.0.0-next.
|
|
3304
|
+
version: "22.0.0-next.10",
|
|
3287
3305
|
ngImport: i0,
|
|
3288
3306
|
type: TitleStrategy,
|
|
3289
3307
|
deps: [],
|
|
@@ -3291,7 +3309,7 @@ class TitleStrategy {
|
|
|
3291
3309
|
});
|
|
3292
3310
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3293
3311
|
minVersion: "12.0.0",
|
|
3294
|
-
version: "22.0.0-next.
|
|
3312
|
+
version: "22.0.0-next.10",
|
|
3295
3313
|
ngImport: i0,
|
|
3296
3314
|
type: TitleStrategy,
|
|
3297
3315
|
providedIn: 'root',
|
|
@@ -3300,7 +3318,7 @@ class TitleStrategy {
|
|
|
3300
3318
|
}
|
|
3301
3319
|
i0.ɵɵngDeclareClassMetadata({
|
|
3302
3320
|
minVersion: "12.0.0",
|
|
3303
|
-
version: "22.0.0-next.
|
|
3321
|
+
version: "22.0.0-next.10",
|
|
3304
3322
|
ngImport: i0,
|
|
3305
3323
|
type: TitleStrategy,
|
|
3306
3324
|
decorators: [{
|
|
@@ -3325,7 +3343,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3325
3343
|
}
|
|
3326
3344
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3327
3345
|
minVersion: "12.0.0",
|
|
3328
|
-
version: "22.0.0-next.
|
|
3346
|
+
version: "22.0.0-next.10",
|
|
3329
3347
|
ngImport: i0,
|
|
3330
3348
|
type: DefaultTitleStrategy,
|
|
3331
3349
|
deps: [{
|
|
@@ -3335,7 +3353,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3335
3353
|
});
|
|
3336
3354
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3337
3355
|
minVersion: "12.0.0",
|
|
3338
|
-
version: "22.0.0-next.
|
|
3356
|
+
version: "22.0.0-next.10",
|
|
3339
3357
|
ngImport: i0,
|
|
3340
3358
|
type: DefaultTitleStrategy,
|
|
3341
3359
|
providedIn: 'root'
|
|
@@ -3343,7 +3361,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3343
3361
|
}
|
|
3344
3362
|
i0.ɵɵngDeclareClassMetadata({
|
|
3345
3363
|
minVersion: "12.0.0",
|
|
3346
|
-
version: "22.0.0-next.
|
|
3364
|
+
version: "22.0.0-next.10",
|
|
3347
3365
|
ngImport: i0,
|
|
3348
3366
|
type: DefaultTitleStrategy,
|
|
3349
3367
|
decorators: [{
|
|
@@ -3422,7 +3440,7 @@ class RouterConfigLoader {
|
|
|
3422
3440
|
}
|
|
3423
3441
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3424
3442
|
minVersion: "12.0.0",
|
|
3425
|
-
version: "22.0.0-next.
|
|
3443
|
+
version: "22.0.0-next.10",
|
|
3426
3444
|
ngImport: i0,
|
|
3427
3445
|
type: RouterConfigLoader,
|
|
3428
3446
|
deps: [],
|
|
@@ -3430,7 +3448,7 @@ class RouterConfigLoader {
|
|
|
3430
3448
|
});
|
|
3431
3449
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3432
3450
|
minVersion: "12.0.0",
|
|
3433
|
-
version: "22.0.0-next.
|
|
3451
|
+
version: "22.0.0-next.10",
|
|
3434
3452
|
ngImport: i0,
|
|
3435
3453
|
type: RouterConfigLoader,
|
|
3436
3454
|
providedIn: 'root'
|
|
@@ -3438,7 +3456,7 @@ class RouterConfigLoader {
|
|
|
3438
3456
|
}
|
|
3439
3457
|
i0.ɵɵngDeclareClassMetadata({
|
|
3440
3458
|
minVersion: "12.0.0",
|
|
3441
|
-
version: "22.0.0-next.
|
|
3459
|
+
version: "22.0.0-next.10",
|
|
3442
3460
|
ngImport: i0,
|
|
3443
3461
|
type: RouterConfigLoader,
|
|
3444
3462
|
decorators: [{
|
|
@@ -3503,7 +3521,7 @@ async function maybeResolveResources(value) {
|
|
|
3503
3521
|
class UrlHandlingStrategy {
|
|
3504
3522
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3505
3523
|
minVersion: "12.0.0",
|
|
3506
|
-
version: "22.0.0-next.
|
|
3524
|
+
version: "22.0.0-next.10",
|
|
3507
3525
|
ngImport: i0,
|
|
3508
3526
|
type: UrlHandlingStrategy,
|
|
3509
3527
|
deps: [],
|
|
@@ -3511,7 +3529,7 @@ class UrlHandlingStrategy {
|
|
|
3511
3529
|
});
|
|
3512
3530
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3513
3531
|
minVersion: "12.0.0",
|
|
3514
|
-
version: "22.0.0-next.
|
|
3532
|
+
version: "22.0.0-next.10",
|
|
3515
3533
|
ngImport: i0,
|
|
3516
3534
|
type: UrlHandlingStrategy,
|
|
3517
3535
|
providedIn: 'root',
|
|
@@ -3520,7 +3538,7 @@ class UrlHandlingStrategy {
|
|
|
3520
3538
|
}
|
|
3521
3539
|
i0.ɵɵngDeclareClassMetadata({
|
|
3522
3540
|
minVersion: "12.0.0",
|
|
3523
|
-
version: "22.0.0-next.
|
|
3541
|
+
version: "22.0.0-next.10",
|
|
3524
3542
|
ngImport: i0,
|
|
3525
3543
|
type: UrlHandlingStrategy,
|
|
3526
3544
|
decorators: [{
|
|
@@ -3543,7 +3561,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3543
3561
|
}
|
|
3544
3562
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3545
3563
|
minVersion: "12.0.0",
|
|
3546
|
-
version: "22.0.0-next.
|
|
3564
|
+
version: "22.0.0-next.10",
|
|
3547
3565
|
ngImport: i0,
|
|
3548
3566
|
type: DefaultUrlHandlingStrategy,
|
|
3549
3567
|
deps: [],
|
|
@@ -3551,7 +3569,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3551
3569
|
});
|
|
3552
3570
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3553
3571
|
minVersion: "12.0.0",
|
|
3554
|
-
version: "22.0.0-next.
|
|
3572
|
+
version: "22.0.0-next.10",
|
|
3555
3573
|
ngImport: i0,
|
|
3556
3574
|
type: DefaultUrlHandlingStrategy,
|
|
3557
3575
|
providedIn: 'root'
|
|
@@ -3559,7 +3577,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3559
3577
|
}
|
|
3560
3578
|
i0.ɵɵngDeclareClassMetadata({
|
|
3561
3579
|
minVersion: "12.0.0",
|
|
3562
|
-
version: "22.0.0-next.
|
|
3580
|
+
version: "22.0.0-next.10",
|
|
3563
3581
|
ngImport: i0,
|
|
3564
3582
|
type: DefaultUrlHandlingStrategy,
|
|
3565
3583
|
decorators: [{
|
|
@@ -3652,7 +3670,7 @@ class NavigationTransitions {
|
|
|
3652
3670
|
options = inject(ROUTER_CONFIGURATION, {
|
|
3653
3671
|
optional: true
|
|
3654
3672
|
}) || {};
|
|
3655
|
-
paramsInheritanceStrategy = this.options.paramsInheritanceStrategy ||
|
|
3673
|
+
paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || DEFAULT_PARAMS_INHERITANCE_STRATEGY;
|
|
3656
3674
|
urlHandlingStrategy = inject(UrlHandlingStrategy);
|
|
3657
3675
|
createViewTransition = inject(CREATE_VIEW_TRANSITION, {
|
|
3658
3676
|
optional: true
|
|
@@ -3958,7 +3976,7 @@ class NavigationTransitions {
|
|
|
3958
3976
|
}
|
|
3959
3977
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3960
3978
|
minVersion: "12.0.0",
|
|
3961
|
-
version: "22.0.0-next.
|
|
3979
|
+
version: "22.0.0-next.10",
|
|
3962
3980
|
ngImport: i0,
|
|
3963
3981
|
type: NavigationTransitions,
|
|
3964
3982
|
deps: [],
|
|
@@ -3966,7 +3984,7 @@ class NavigationTransitions {
|
|
|
3966
3984
|
});
|
|
3967
3985
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3968
3986
|
minVersion: "12.0.0",
|
|
3969
|
-
version: "22.0.0-next.
|
|
3987
|
+
version: "22.0.0-next.10",
|
|
3970
3988
|
ngImport: i0,
|
|
3971
3989
|
type: NavigationTransitions,
|
|
3972
3990
|
providedIn: 'root'
|
|
@@ -3974,7 +3992,7 @@ class NavigationTransitions {
|
|
|
3974
3992
|
}
|
|
3975
3993
|
i0.ɵɵngDeclareClassMetadata({
|
|
3976
3994
|
minVersion: "12.0.0",
|
|
3977
|
-
version: "22.0.0-next.
|
|
3995
|
+
version: "22.0.0-next.10",
|
|
3978
3996
|
ngImport: i0,
|
|
3979
3997
|
type: NavigationTransitions,
|
|
3980
3998
|
decorators: [{
|
|
@@ -4047,7 +4065,7 @@ function destroyDetachedRouteHandle(handle) {
|
|
|
4047
4065
|
class RouteReuseStrategy {
|
|
4048
4066
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4049
4067
|
minVersion: "12.0.0",
|
|
4050
|
-
version: "22.0.0-next.
|
|
4068
|
+
version: "22.0.0-next.10",
|
|
4051
4069
|
ngImport: i0,
|
|
4052
4070
|
type: RouteReuseStrategy,
|
|
4053
4071
|
deps: [],
|
|
@@ -4055,7 +4073,7 @@ class RouteReuseStrategy {
|
|
|
4055
4073
|
});
|
|
4056
4074
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4057
4075
|
minVersion: "12.0.0",
|
|
4058
|
-
version: "22.0.0-next.
|
|
4076
|
+
version: "22.0.0-next.10",
|
|
4059
4077
|
ngImport: i0,
|
|
4060
4078
|
type: RouteReuseStrategy,
|
|
4061
4079
|
providedIn: 'root',
|
|
@@ -4064,7 +4082,7 @@ class RouteReuseStrategy {
|
|
|
4064
4082
|
}
|
|
4065
4083
|
i0.ɵɵngDeclareClassMetadata({
|
|
4066
4084
|
minVersion: "12.0.0",
|
|
4067
|
-
version: "22.0.0-next.
|
|
4085
|
+
version: "22.0.0-next.10",
|
|
4068
4086
|
ngImport: i0,
|
|
4069
4087
|
type: RouteReuseStrategy,
|
|
4070
4088
|
decorators: [{
|
|
@@ -4096,7 +4114,7 @@ class BaseRouteReuseStrategy {
|
|
|
4096
4114
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4097
4115
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4098
4116
|
minVersion: "12.0.0",
|
|
4099
|
-
version: "22.0.0-next.
|
|
4117
|
+
version: "22.0.0-next.10",
|
|
4100
4118
|
ngImport: i0,
|
|
4101
4119
|
type: DefaultRouteReuseStrategy,
|
|
4102
4120
|
deps: null,
|
|
@@ -4104,7 +4122,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
|
4104
4122
|
});
|
|
4105
4123
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4106
4124
|
minVersion: "12.0.0",
|
|
4107
|
-
version: "22.0.0-next.
|
|
4125
|
+
version: "22.0.0-next.10",
|
|
4108
4126
|
ngImport: i0,
|
|
4109
4127
|
type: DefaultRouteReuseStrategy,
|
|
4110
4128
|
providedIn: 'root'
|
|
@@ -4112,7 +4130,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
|
4112
4130
|
}
|
|
4113
4131
|
i0.ɵɵngDeclareClassMetadata({
|
|
4114
4132
|
minVersion: "12.0.0",
|
|
4115
|
-
version: "22.0.0-next.
|
|
4133
|
+
version: "22.0.0-next.10",
|
|
4116
4134
|
ngImport: i0,
|
|
4117
4135
|
type: DefaultRouteReuseStrategy,
|
|
4118
4136
|
decorators: [{
|
|
@@ -4150,6 +4168,14 @@ class StateManager {
|
|
|
4150
4168
|
const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;
|
|
4151
4169
|
return path;
|
|
4152
4170
|
}
|
|
4171
|
+
routerUrlState(navigation) {
|
|
4172
|
+
if (navigation?.targetBrowserUrl === undefined || navigation?.finalUrl === undefined) {
|
|
4173
|
+
return {};
|
|
4174
|
+
}
|
|
4175
|
+
return {
|
|
4176
|
+
ɵrouterUrl: this.urlSerializer.serialize(navigation.finalUrl)
|
|
4177
|
+
};
|
|
4178
|
+
}
|
|
4153
4179
|
commitTransition({
|
|
4154
4180
|
targetRouterState,
|
|
4155
4181
|
finalUrl,
|
|
@@ -4186,7 +4212,7 @@ class StateManager {
|
|
|
4186
4212
|
}
|
|
4187
4213
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4188
4214
|
minVersion: "12.0.0",
|
|
4189
|
-
version: "22.0.0-next.
|
|
4215
|
+
version: "22.0.0-next.10",
|
|
4190
4216
|
ngImport: i0,
|
|
4191
4217
|
type: StateManager,
|
|
4192
4218
|
deps: [],
|
|
@@ -4194,7 +4220,7 @@ class StateManager {
|
|
|
4194
4220
|
});
|
|
4195
4221
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4196
4222
|
minVersion: "12.0.0",
|
|
4197
|
-
version: "22.0.0-next.
|
|
4223
|
+
version: "22.0.0-next.10",
|
|
4198
4224
|
ngImport: i0,
|
|
4199
4225
|
type: StateManager,
|
|
4200
4226
|
providedIn: 'root',
|
|
@@ -4203,7 +4229,7 @@ class StateManager {
|
|
|
4203
4229
|
}
|
|
4204
4230
|
i0.ɵɵngDeclareClassMetadata({
|
|
4205
4231
|
minVersion: "12.0.0",
|
|
4206
|
-
version: "22.0.0-next.
|
|
4232
|
+
version: "22.0.0-next.10",
|
|
4207
4233
|
ngImport: i0,
|
|
4208
4234
|
type: StateManager,
|
|
4209
4235
|
decorators: [{
|
|
@@ -4259,10 +4285,11 @@ class HistoryStateManager extends StateManager {
|
|
|
4259
4285
|
this.currentPageId = this.browserPageId;
|
|
4260
4286
|
}
|
|
4261
4287
|
}
|
|
4262
|
-
setBrowserUrl(path, {
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4288
|
+
setBrowserUrl(path, navigation) {
|
|
4289
|
+
const {
|
|
4290
|
+
extras,
|
|
4291
|
+
id
|
|
4292
|
+
} = navigation;
|
|
4266
4293
|
const {
|
|
4267
4294
|
replaceUrl,
|
|
4268
4295
|
state
|
|
@@ -4271,13 +4298,13 @@ class HistoryStateManager extends StateManager {
|
|
|
4271
4298
|
const currentBrowserPageId = this.browserPageId;
|
|
4272
4299
|
const newState = {
|
|
4273
4300
|
...state,
|
|
4274
|
-
...this.generateNgRouterState(id, currentBrowserPageId)
|
|
4301
|
+
...this.generateNgRouterState(id, currentBrowserPageId, navigation)
|
|
4275
4302
|
};
|
|
4276
4303
|
this.location.replaceState(path, '', newState);
|
|
4277
4304
|
} else {
|
|
4278
4305
|
const newState = {
|
|
4279
4306
|
...state,
|
|
4280
|
-
...this.generateNgRouterState(id, this.browserPageId + 1)
|
|
4307
|
+
...this.generateNgRouterState(id, this.browserPageId + 1, navigation)
|
|
4281
4308
|
};
|
|
4282
4309
|
this.location.go(path, '', newState);
|
|
4283
4310
|
}
|
|
@@ -4309,20 +4336,22 @@ class HistoryStateManager extends StateManager {
|
|
|
4309
4336
|
resetUrlToCurrentUrlTree() {
|
|
4310
4337
|
this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
|
|
4311
4338
|
}
|
|
4312
|
-
generateNgRouterState(navigationId, routerPageId) {
|
|
4339
|
+
generateNgRouterState(navigationId, routerPageId, navigation) {
|
|
4313
4340
|
if (this.canceledNavigationResolution === 'computed') {
|
|
4314
4341
|
return {
|
|
4315
4342
|
navigationId,
|
|
4316
|
-
ɵrouterPageId: routerPageId
|
|
4343
|
+
ɵrouterPageId: routerPageId,
|
|
4344
|
+
...this.routerUrlState(navigation)
|
|
4317
4345
|
};
|
|
4318
4346
|
}
|
|
4319
4347
|
return {
|
|
4320
|
-
navigationId
|
|
4348
|
+
navigationId,
|
|
4349
|
+
...this.routerUrlState(navigation)
|
|
4321
4350
|
};
|
|
4322
4351
|
}
|
|
4323
4352
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4324
4353
|
minVersion: "12.0.0",
|
|
4325
|
-
version: "22.0.0-next.
|
|
4354
|
+
version: "22.0.0-next.10",
|
|
4326
4355
|
ngImport: i0,
|
|
4327
4356
|
type: HistoryStateManager,
|
|
4328
4357
|
deps: null,
|
|
@@ -4330,7 +4359,7 @@ class HistoryStateManager extends StateManager {
|
|
|
4330
4359
|
});
|
|
4331
4360
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4332
4361
|
minVersion: "12.0.0",
|
|
4333
|
-
version: "22.0.0-next.
|
|
4362
|
+
version: "22.0.0-next.10",
|
|
4334
4363
|
ngImport: i0,
|
|
4335
4364
|
type: HistoryStateManager,
|
|
4336
4365
|
providedIn: 'root'
|
|
@@ -4338,7 +4367,7 @@ class HistoryStateManager extends StateManager {
|
|
|
4338
4367
|
}
|
|
4339
4368
|
i0.ɵɵngDeclareClassMetadata({
|
|
4340
4369
|
minVersion: "12.0.0",
|
|
4341
|
-
version: "22.0.0-next.
|
|
4370
|
+
version: "22.0.0-next.10",
|
|
4342
4371
|
ngImport: i0,
|
|
4343
4372
|
type: HistoryStateManager,
|
|
4344
4373
|
decorators: [{
|
|
@@ -4468,17 +4497,25 @@ class Router {
|
|
|
4468
4497
|
}
|
|
4469
4498
|
navigateToSyncWithBrowser(url, source, state, extras) {
|
|
4470
4499
|
const restoredState = state?.navigationId ? state : null;
|
|
4500
|
+
const routerUrl = state?.ɵrouterUrl ?? url;
|
|
4501
|
+
if (state?.ɵrouterUrl) {
|
|
4502
|
+
extras = {
|
|
4503
|
+
...extras,
|
|
4504
|
+
browserUrl: url
|
|
4505
|
+
};
|
|
4506
|
+
}
|
|
4471
4507
|
if (state) {
|
|
4472
4508
|
const stateCopy = {
|
|
4473
4509
|
...state
|
|
4474
4510
|
};
|
|
4475
4511
|
delete stateCopy.navigationId;
|
|
4476
4512
|
delete stateCopy.ɵrouterPageId;
|
|
4513
|
+
delete stateCopy.ɵrouterUrl;
|
|
4477
4514
|
if (Object.keys(stateCopy).length !== 0) {
|
|
4478
4515
|
extras.state = stateCopy;
|
|
4479
4516
|
}
|
|
4480
4517
|
}
|
|
4481
|
-
const urlTree = this.parseUrl(
|
|
4518
|
+
const urlTree = this.parseUrl(routerUrl);
|
|
4482
4519
|
this.scheduleNavigation(urlTree, source, restoredState, extras).catch(e => {
|
|
4483
4520
|
if (this.disposed) {
|
|
4484
4521
|
return;
|
|
@@ -4641,7 +4678,7 @@ class Router {
|
|
|
4641
4678
|
}
|
|
4642
4679
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4643
4680
|
minVersion: "12.0.0",
|
|
4644
|
-
version: "22.0.0-next.
|
|
4681
|
+
version: "22.0.0-next.10",
|
|
4645
4682
|
ngImport: i0,
|
|
4646
4683
|
type: Router,
|
|
4647
4684
|
deps: [],
|
|
@@ -4649,7 +4686,7 @@ class Router {
|
|
|
4649
4686
|
});
|
|
4650
4687
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4651
4688
|
minVersion: "12.0.0",
|
|
4652
|
-
version: "22.0.0-next.
|
|
4689
|
+
version: "22.0.0-next.10",
|
|
4653
4690
|
ngImport: i0,
|
|
4654
4691
|
type: Router,
|
|
4655
4692
|
providedIn: 'root'
|
|
@@ -4657,7 +4694,7 @@ class Router {
|
|
|
4657
4694
|
}
|
|
4658
4695
|
i0.ɵɵngDeclareClassMetadata({
|
|
4659
4696
|
minVersion: "12.0.0",
|
|
4660
|
-
version: "22.0.0-next.
|
|
4697
|
+
version: "22.0.0-next.10",
|
|
4661
4698
|
ngImport: i0,
|
|
4662
4699
|
type: Router,
|
|
4663
4700
|
decorators: [{
|