@angular/router 22.0.0-next.1 → 22.0.0-next.11
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 +127 -82
- 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 +5 -5
- package/types/_router_module-chunk.d.ts +303 -283
- package/types/router.d.ts +24 -8
- 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.11
|
|
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, ɵmaybeUnwrapDefaultExport as _maybeUnwrapDefaultExport, 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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
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.11",
|
|
1821
1822
|
ngImport: i0,
|
|
1822
1823
|
type: RouterOutlet,
|
|
1823
1824
|
decorators: [{
|
|
@@ -1883,7 +1884,13 @@ 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
|
+
outletSeenKeys = new Map();
|
|
1890
|
+
constructor(options) {
|
|
1891
|
+
this.options = options;
|
|
1892
|
+
this.options.queryParams ??= true;
|
|
1893
|
+
}
|
|
1887
1894
|
bindActivatedRouteToOutletComponent(outlet) {
|
|
1888
1895
|
this.unsubscribeFromRouteData(outlet);
|
|
1889
1896
|
this.subscribeToRouteData(outlet);
|
|
@@ -1891,12 +1898,13 @@ class RoutedComponentInputBinder {
|
|
|
1891
1898
|
unsubscribeFromRouteData(outlet) {
|
|
1892
1899
|
this.outletDataSubscriptions.get(outlet)?.unsubscribe();
|
|
1893
1900
|
this.outletDataSubscriptions.delete(outlet);
|
|
1901
|
+
this.outletSeenKeys.delete(outlet);
|
|
1894
1902
|
}
|
|
1895
1903
|
subscribeToRouteData(outlet) {
|
|
1896
1904
|
const {
|
|
1897
1905
|
activatedRoute
|
|
1898
1906
|
} = outlet;
|
|
1899
|
-
const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {
|
|
1907
|
+
const dataSubscription = combineLatest([this.options.queryParams ? activatedRoute.queryParams : of({}), activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {
|
|
1900
1908
|
data = {
|
|
1901
1909
|
...queryParams,
|
|
1902
1910
|
...params,
|
|
@@ -1916,43 +1924,58 @@ class RoutedComponentInputBinder {
|
|
|
1916
1924
|
this.unsubscribeFromRouteData(outlet);
|
|
1917
1925
|
return;
|
|
1918
1926
|
}
|
|
1927
|
+
let seenKeys = this.outletSeenKeys.get(outlet);
|
|
1928
|
+
if (!seenKeys) {
|
|
1929
|
+
seenKeys = new Set();
|
|
1930
|
+
this.outletSeenKeys.set(outlet, seenKeys);
|
|
1931
|
+
}
|
|
1932
|
+
for (const key of Object.keys(data)) {
|
|
1933
|
+
seenKeys.add(key);
|
|
1934
|
+
}
|
|
1935
|
+
const behavior = this.options.unmatchedInputBehavior ?? 'alwaysUndefined';
|
|
1919
1936
|
for (const {
|
|
1920
1937
|
templateName
|
|
1921
1938
|
} of mirror.inputs) {
|
|
1922
|
-
|
|
1939
|
+
const value = data[templateName];
|
|
1940
|
+
if (value !== undefined || behavior === 'alwaysUndefined' || seenKeys.has(templateName)) {
|
|
1941
|
+
outlet.activatedComponentRef.setInput(templateName, value);
|
|
1942
|
+
}
|
|
1923
1943
|
}
|
|
1924
1944
|
});
|
|
1925
1945
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
1926
1946
|
}
|
|
1927
1947
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1928
1948
|
minVersion: "12.0.0",
|
|
1929
|
-
version: "22.0.0-next.
|
|
1949
|
+
version: "22.0.0-next.11",
|
|
1930
1950
|
ngImport: i0,
|
|
1931
1951
|
type: RoutedComponentInputBinder,
|
|
1932
|
-
deps:
|
|
1952
|
+
deps: "invalid",
|
|
1933
1953
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
1934
1954
|
});
|
|
1935
1955
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1936
1956
|
minVersion: "12.0.0",
|
|
1937
|
-
version: "22.0.0-next.
|
|
1957
|
+
version: "22.0.0-next.11",
|
|
1938
1958
|
ngImport: i0,
|
|
1939
1959
|
type: RoutedComponentInputBinder
|
|
1940
1960
|
});
|
|
1941
1961
|
}
|
|
1942
1962
|
i0.ɵɵngDeclareClassMetadata({
|
|
1943
1963
|
minVersion: "12.0.0",
|
|
1944
|
-
version: "22.0.0-next.
|
|
1964
|
+
version: "22.0.0-next.11",
|
|
1945
1965
|
ngImport: i0,
|
|
1946
1966
|
type: RoutedComponentInputBinder,
|
|
1947
1967
|
decorators: [{
|
|
1948
1968
|
type: Injectable
|
|
1969
|
+
}],
|
|
1970
|
+
ctorParameters: () => [{
|
|
1971
|
+
type: undefined
|
|
1949
1972
|
}]
|
|
1950
1973
|
});
|
|
1951
1974
|
|
|
1952
1975
|
class ɵEmptyOutletComponent {
|
|
1953
1976
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1954
1977
|
minVersion: "12.0.0",
|
|
1955
|
-
version: "22.0.0-next.
|
|
1978
|
+
version: "22.0.0-next.11",
|
|
1956
1979
|
ngImport: i0,
|
|
1957
1980
|
type: ɵEmptyOutletComponent,
|
|
1958
1981
|
deps: [],
|
|
@@ -1960,7 +1983,7 @@ class ɵEmptyOutletComponent {
|
|
|
1960
1983
|
});
|
|
1961
1984
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1962
1985
|
minVersion: "14.0.0",
|
|
1963
|
-
version: "22.0.0-next.
|
|
1986
|
+
version: "22.0.0-next.11",
|
|
1964
1987
|
type: ɵEmptyOutletComponent,
|
|
1965
1988
|
isStandalone: true,
|
|
1966
1989
|
selector: "ng-component",
|
|
@@ -1975,12 +1998,13 @@ class ɵEmptyOutletComponent {
|
|
|
1975
1998
|
inputs: ["name", "routerOutletData"],
|
|
1976
1999
|
outputs: ["activate", "deactivate", "attach", "detach"],
|
|
1977
2000
|
exportAs: ["outlet"]
|
|
1978
|
-
}]
|
|
2001
|
+
}],
|
|
2002
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1979
2003
|
});
|
|
1980
2004
|
}
|
|
1981
2005
|
i0.ɵɵngDeclareClassMetadata({
|
|
1982
2006
|
minVersion: "12.0.0",
|
|
1983
|
-
version: "22.0.0-next.
|
|
2007
|
+
version: "22.0.0-next.11",
|
|
1984
2008
|
ngImport: i0,
|
|
1985
2009
|
type: ɵEmptyOutletComponent,
|
|
1986
2010
|
decorators: [{
|
|
@@ -1988,7 +2012,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1988
2012
|
args: [{
|
|
1989
2013
|
template: `<router-outlet />`,
|
|
1990
2014
|
imports: [RouterOutlet],
|
|
1991
|
-
exportAs: 'emptyRouterOutlet'
|
|
2015
|
+
exportAs: 'emptyRouterOutlet',
|
|
2016
|
+
changeDetection: ChangeDetectionStrategy.Eager
|
|
1992
2017
|
}]
|
|
1993
2018
|
}]
|
|
1994
2019
|
});
|
|
@@ -2821,8 +2846,8 @@ function match(segmentGroup, route, segments) {
|
|
|
2821
2846
|
positionalParamSegments: res.posParams ?? {}
|
|
2822
2847
|
};
|
|
2823
2848
|
}
|
|
2824
|
-
function split(segmentGroup, consumedSegments, slicedSegments, config) {
|
|
2825
|
-
if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {
|
|
2849
|
+
function split(segmentGroup, consumedSegments, slicedSegments, config, outlet) {
|
|
2850
|
+
if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config, outlet)) {
|
|
2826
2851
|
const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));
|
|
2827
2852
|
return {
|
|
2828
2853
|
segmentGroup: s,
|
|
@@ -2866,8 +2891,15 @@ function createChildrenForEmptyPaths(routes, primarySegment) {
|
|
|
2866
2891
|
}
|
|
2867
2892
|
return res;
|
|
2868
2893
|
}
|
|
2869
|
-
function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {
|
|
2870
|
-
return routes.some(r =>
|
|
2894
|
+
function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes, outlet) {
|
|
2895
|
+
return routes.some(r => {
|
|
2896
|
+
const matchesEmpty = emptyPathMatch(segmentGroup, slicedSegments, r);
|
|
2897
|
+
if (!matchesEmpty) return false;
|
|
2898
|
+
const isNamedOutlet = getOutlet(r) !== PRIMARY_OUTLET;
|
|
2899
|
+
if (!isNamedOutlet) return false;
|
|
2900
|
+
const isSelfEvaluating = outlet !== undefined && getOutlet(r) === outlet;
|
|
2901
|
+
return !isSelfEvaluating;
|
|
2902
|
+
});
|
|
2871
2903
|
}
|
|
2872
2904
|
function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {
|
|
2873
2905
|
return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));
|
|
@@ -2883,7 +2915,7 @@ function noLeftoversInUrl(segmentGroup, segments, outlet) {
|
|
|
2883
2915
|
}
|
|
2884
2916
|
|
|
2885
2917
|
class NoLeftoversInUrl {}
|
|
2886
|
-
async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy
|
|
2918
|
+
async function recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy, abortSignal) {
|
|
2887
2919
|
return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer, abortSignal).recognize();
|
|
2888
2920
|
}
|
|
2889
2921
|
const MAX_ALLOWED_REDIRECTS = 31;
|
|
@@ -3069,7 +3101,7 @@ class Recognizer {
|
|
|
3069
3101
|
const {
|
|
3070
3102
|
segmentGroup,
|
|
3071
3103
|
slicedSegments
|
|
3072
|
-
} = split(rawSegment, consumedSegments, remainingSegments, childConfig);
|
|
3104
|
+
} = split(rawSegment, consumedSegments, remainingSegments, childConfig, outlet);
|
|
3073
3105
|
if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
|
|
3074
3106
|
const children = await this.processChildren(childInjector, childConfig, segmentGroup, snapshot);
|
|
3075
3107
|
return new TreeNode(snapshot, children);
|
|
@@ -3283,7 +3315,7 @@ class TitleStrategy {
|
|
|
3283
3315
|
}
|
|
3284
3316
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3285
3317
|
minVersion: "12.0.0",
|
|
3286
|
-
version: "22.0.0-next.
|
|
3318
|
+
version: "22.0.0-next.11",
|
|
3287
3319
|
ngImport: i0,
|
|
3288
3320
|
type: TitleStrategy,
|
|
3289
3321
|
deps: [],
|
|
@@ -3291,7 +3323,7 @@ class TitleStrategy {
|
|
|
3291
3323
|
});
|
|
3292
3324
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3293
3325
|
minVersion: "12.0.0",
|
|
3294
|
-
version: "22.0.0-next.
|
|
3326
|
+
version: "22.0.0-next.11",
|
|
3295
3327
|
ngImport: i0,
|
|
3296
3328
|
type: TitleStrategy,
|
|
3297
3329
|
providedIn: 'root',
|
|
@@ -3300,7 +3332,7 @@ class TitleStrategy {
|
|
|
3300
3332
|
}
|
|
3301
3333
|
i0.ɵɵngDeclareClassMetadata({
|
|
3302
3334
|
minVersion: "12.0.0",
|
|
3303
|
-
version: "22.0.0-next.
|
|
3335
|
+
version: "22.0.0-next.11",
|
|
3304
3336
|
ngImport: i0,
|
|
3305
3337
|
type: TitleStrategy,
|
|
3306
3338
|
decorators: [{
|
|
@@ -3325,7 +3357,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3325
3357
|
}
|
|
3326
3358
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3327
3359
|
minVersion: "12.0.0",
|
|
3328
|
-
version: "22.0.0-next.
|
|
3360
|
+
version: "22.0.0-next.11",
|
|
3329
3361
|
ngImport: i0,
|
|
3330
3362
|
type: DefaultTitleStrategy,
|
|
3331
3363
|
deps: [{
|
|
@@ -3335,7 +3367,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3335
3367
|
});
|
|
3336
3368
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3337
3369
|
minVersion: "12.0.0",
|
|
3338
|
-
version: "22.0.0-next.
|
|
3370
|
+
version: "22.0.0-next.11",
|
|
3339
3371
|
ngImport: i0,
|
|
3340
3372
|
type: DefaultTitleStrategy,
|
|
3341
3373
|
providedIn: 'root'
|
|
@@ -3343,7 +3375,7 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
3343
3375
|
}
|
|
3344
3376
|
i0.ɵɵngDeclareClassMetadata({
|
|
3345
3377
|
minVersion: "12.0.0",
|
|
3346
|
-
version: "22.0.0-next.
|
|
3378
|
+
version: "22.0.0-next.11",
|
|
3347
3379
|
ngImport: i0,
|
|
3348
3380
|
type: DefaultTitleStrategy,
|
|
3349
3381
|
decorators: [{
|
|
@@ -3380,7 +3412,7 @@ class RouterConfigLoader {
|
|
|
3380
3412
|
const loader = (async () => {
|
|
3381
3413
|
try {
|
|
3382
3414
|
const loaded = await wrapIntoPromise(runInInjectionContext(injector, () => route.loadComponent()));
|
|
3383
|
-
const component = await maybeResolveResources(
|
|
3415
|
+
const component = await maybeResolveResources(_maybeUnwrapDefaultExport(loaded));
|
|
3384
3416
|
if (this.onLoadEndListener) {
|
|
3385
3417
|
this.onLoadEndListener(route);
|
|
3386
3418
|
}
|
|
@@ -3422,7 +3454,7 @@ class RouterConfigLoader {
|
|
|
3422
3454
|
}
|
|
3423
3455
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3424
3456
|
minVersion: "12.0.0",
|
|
3425
|
-
version: "22.0.0-next.
|
|
3457
|
+
version: "22.0.0-next.11",
|
|
3426
3458
|
ngImport: i0,
|
|
3427
3459
|
type: RouterConfigLoader,
|
|
3428
3460
|
deps: [],
|
|
@@ -3430,7 +3462,7 @@ class RouterConfigLoader {
|
|
|
3430
3462
|
});
|
|
3431
3463
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3432
3464
|
minVersion: "12.0.0",
|
|
3433
|
-
version: "22.0.0-next.
|
|
3465
|
+
version: "22.0.0-next.11",
|
|
3434
3466
|
ngImport: i0,
|
|
3435
3467
|
type: RouterConfigLoader,
|
|
3436
3468
|
providedIn: 'root'
|
|
@@ -3438,7 +3470,7 @@ class RouterConfigLoader {
|
|
|
3438
3470
|
}
|
|
3439
3471
|
i0.ɵɵngDeclareClassMetadata({
|
|
3440
3472
|
minVersion: "12.0.0",
|
|
3441
|
-
version: "22.0.0-next.
|
|
3473
|
+
version: "22.0.0-next.11",
|
|
3442
3474
|
ngImport: i0,
|
|
3443
3475
|
type: RouterConfigLoader,
|
|
3444
3476
|
decorators: [{
|
|
@@ -3450,7 +3482,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3450
3482
|
});
|
|
3451
3483
|
async function loadChildren(route, compiler, parentInjector, onLoadEndListener) {
|
|
3452
3484
|
const loaded = await wrapIntoPromise(runInInjectionContext(parentInjector, () => route.loadChildren()));
|
|
3453
|
-
const t = await maybeResolveResources(
|
|
3485
|
+
const t = await maybeResolveResources(_maybeUnwrapDefaultExport(loaded));
|
|
3454
3486
|
let factoryOrRoutes;
|
|
3455
3487
|
if (t instanceof NgModuleFactory || Array.isArray(t)) {
|
|
3456
3488
|
factoryOrRoutes = t;
|
|
@@ -3483,12 +3515,6 @@ async function loadChildren(route, compiler, parentInjector, onLoadEndListener)
|
|
|
3483
3515
|
factory
|
|
3484
3516
|
};
|
|
3485
3517
|
}
|
|
3486
|
-
function isWrappedDefaultExport(value) {
|
|
3487
|
-
return value && typeof value === 'object' && 'default' in value;
|
|
3488
|
-
}
|
|
3489
|
-
function maybeUnwrapDefaultExport(input) {
|
|
3490
|
-
return isWrappedDefaultExport(input) ? input['default'] : input;
|
|
3491
|
-
}
|
|
3492
3518
|
async function maybeResolveResources(value) {
|
|
3493
3519
|
if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') {
|
|
3494
3520
|
try {
|
|
@@ -3503,7 +3529,7 @@ async function maybeResolveResources(value) {
|
|
|
3503
3529
|
class UrlHandlingStrategy {
|
|
3504
3530
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3505
3531
|
minVersion: "12.0.0",
|
|
3506
|
-
version: "22.0.0-next.
|
|
3532
|
+
version: "22.0.0-next.11",
|
|
3507
3533
|
ngImport: i0,
|
|
3508
3534
|
type: UrlHandlingStrategy,
|
|
3509
3535
|
deps: [],
|
|
@@ -3511,7 +3537,7 @@ class UrlHandlingStrategy {
|
|
|
3511
3537
|
});
|
|
3512
3538
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3513
3539
|
minVersion: "12.0.0",
|
|
3514
|
-
version: "22.0.0-next.
|
|
3540
|
+
version: "22.0.0-next.11",
|
|
3515
3541
|
ngImport: i0,
|
|
3516
3542
|
type: UrlHandlingStrategy,
|
|
3517
3543
|
providedIn: 'root',
|
|
@@ -3520,7 +3546,7 @@ class UrlHandlingStrategy {
|
|
|
3520
3546
|
}
|
|
3521
3547
|
i0.ɵɵngDeclareClassMetadata({
|
|
3522
3548
|
minVersion: "12.0.0",
|
|
3523
|
-
version: "22.0.0-next.
|
|
3549
|
+
version: "22.0.0-next.11",
|
|
3524
3550
|
ngImport: i0,
|
|
3525
3551
|
type: UrlHandlingStrategy,
|
|
3526
3552
|
decorators: [{
|
|
@@ -3543,7 +3569,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3543
3569
|
}
|
|
3544
3570
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3545
3571
|
minVersion: "12.0.0",
|
|
3546
|
-
version: "22.0.0-next.
|
|
3572
|
+
version: "22.0.0-next.11",
|
|
3547
3573
|
ngImport: i0,
|
|
3548
3574
|
type: DefaultUrlHandlingStrategy,
|
|
3549
3575
|
deps: [],
|
|
@@ -3551,7 +3577,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3551
3577
|
});
|
|
3552
3578
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3553
3579
|
minVersion: "12.0.0",
|
|
3554
|
-
version: "22.0.0-next.
|
|
3580
|
+
version: "22.0.0-next.11",
|
|
3555
3581
|
ngImport: i0,
|
|
3556
3582
|
type: DefaultUrlHandlingStrategy,
|
|
3557
3583
|
providedIn: 'root'
|
|
@@ -3559,7 +3585,7 @@ class DefaultUrlHandlingStrategy {
|
|
|
3559
3585
|
}
|
|
3560
3586
|
i0.ɵɵngDeclareClassMetadata({
|
|
3561
3587
|
minVersion: "12.0.0",
|
|
3562
|
-
version: "22.0.0-next.
|
|
3588
|
+
version: "22.0.0-next.11",
|
|
3563
3589
|
ngImport: i0,
|
|
3564
3590
|
type: DefaultUrlHandlingStrategy,
|
|
3565
3591
|
decorators: [{
|
|
@@ -3652,7 +3678,7 @@ class NavigationTransitions {
|
|
|
3652
3678
|
options = inject(ROUTER_CONFIGURATION, {
|
|
3653
3679
|
optional: true
|
|
3654
3680
|
}) || {};
|
|
3655
|
-
paramsInheritanceStrategy = this.options.paramsInheritanceStrategy ||
|
|
3681
|
+
paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || DEFAULT_PARAMS_INHERITANCE_STRATEGY;
|
|
3656
3682
|
urlHandlingStrategy = inject(UrlHandlingStrategy);
|
|
3657
3683
|
createViewTransition = inject(CREATE_VIEW_TRANSITION, {
|
|
3658
3684
|
optional: true
|
|
@@ -3958,7 +3984,7 @@ class NavigationTransitions {
|
|
|
3958
3984
|
}
|
|
3959
3985
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3960
3986
|
minVersion: "12.0.0",
|
|
3961
|
-
version: "22.0.0-next.
|
|
3987
|
+
version: "22.0.0-next.11",
|
|
3962
3988
|
ngImport: i0,
|
|
3963
3989
|
type: NavigationTransitions,
|
|
3964
3990
|
deps: [],
|
|
@@ -3966,7 +3992,7 @@ class NavigationTransitions {
|
|
|
3966
3992
|
});
|
|
3967
3993
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3968
3994
|
minVersion: "12.0.0",
|
|
3969
|
-
version: "22.0.0-next.
|
|
3995
|
+
version: "22.0.0-next.11",
|
|
3970
3996
|
ngImport: i0,
|
|
3971
3997
|
type: NavigationTransitions,
|
|
3972
3998
|
providedIn: 'root'
|
|
@@ -3974,7 +4000,7 @@ class NavigationTransitions {
|
|
|
3974
4000
|
}
|
|
3975
4001
|
i0.ɵɵngDeclareClassMetadata({
|
|
3976
4002
|
minVersion: "12.0.0",
|
|
3977
|
-
version: "22.0.0-next.
|
|
4003
|
+
version: "22.0.0-next.11",
|
|
3978
4004
|
ngImport: i0,
|
|
3979
4005
|
type: NavigationTransitions,
|
|
3980
4006
|
decorators: [{
|
|
@@ -4047,7 +4073,7 @@ function destroyDetachedRouteHandle(handle) {
|
|
|
4047
4073
|
class RouteReuseStrategy {
|
|
4048
4074
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4049
4075
|
minVersion: "12.0.0",
|
|
4050
|
-
version: "22.0.0-next.
|
|
4076
|
+
version: "22.0.0-next.11",
|
|
4051
4077
|
ngImport: i0,
|
|
4052
4078
|
type: RouteReuseStrategy,
|
|
4053
4079
|
deps: [],
|
|
@@ -4055,7 +4081,7 @@ class RouteReuseStrategy {
|
|
|
4055
4081
|
});
|
|
4056
4082
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4057
4083
|
minVersion: "12.0.0",
|
|
4058
|
-
version: "22.0.0-next.
|
|
4084
|
+
version: "22.0.0-next.11",
|
|
4059
4085
|
ngImport: i0,
|
|
4060
4086
|
type: RouteReuseStrategy,
|
|
4061
4087
|
providedIn: 'root',
|
|
@@ -4064,7 +4090,7 @@ class RouteReuseStrategy {
|
|
|
4064
4090
|
}
|
|
4065
4091
|
i0.ɵɵngDeclareClassMetadata({
|
|
4066
4092
|
minVersion: "12.0.0",
|
|
4067
|
-
version: "22.0.0-next.
|
|
4093
|
+
version: "22.0.0-next.11",
|
|
4068
4094
|
ngImport: i0,
|
|
4069
4095
|
type: RouteReuseStrategy,
|
|
4070
4096
|
decorators: [{
|
|
@@ -4096,7 +4122,7 @@ class BaseRouteReuseStrategy {
|
|
|
4096
4122
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4097
4123
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4098
4124
|
minVersion: "12.0.0",
|
|
4099
|
-
version: "22.0.0-next.
|
|
4125
|
+
version: "22.0.0-next.11",
|
|
4100
4126
|
ngImport: i0,
|
|
4101
4127
|
type: DefaultRouteReuseStrategy,
|
|
4102
4128
|
deps: null,
|
|
@@ -4104,7 +4130,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
|
4104
4130
|
});
|
|
4105
4131
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4106
4132
|
minVersion: "12.0.0",
|
|
4107
|
-
version: "22.0.0-next.
|
|
4133
|
+
version: "22.0.0-next.11",
|
|
4108
4134
|
ngImport: i0,
|
|
4109
4135
|
type: DefaultRouteReuseStrategy,
|
|
4110
4136
|
providedIn: 'root'
|
|
@@ -4112,7 +4138,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
|
4112
4138
|
}
|
|
4113
4139
|
i0.ɵɵngDeclareClassMetadata({
|
|
4114
4140
|
minVersion: "12.0.0",
|
|
4115
|
-
version: "22.0.0-next.
|
|
4141
|
+
version: "22.0.0-next.11",
|
|
4116
4142
|
ngImport: i0,
|
|
4117
4143
|
type: DefaultRouteReuseStrategy,
|
|
4118
4144
|
decorators: [{
|
|
@@ -4150,6 +4176,14 @@ class StateManager {
|
|
|
4150
4176
|
const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;
|
|
4151
4177
|
return path;
|
|
4152
4178
|
}
|
|
4179
|
+
routerUrlState(navigation) {
|
|
4180
|
+
if (navigation?.targetBrowserUrl === undefined || navigation?.finalUrl === undefined) {
|
|
4181
|
+
return {};
|
|
4182
|
+
}
|
|
4183
|
+
return {
|
|
4184
|
+
ɵrouterUrl: this.urlSerializer.serialize(navigation.finalUrl)
|
|
4185
|
+
};
|
|
4186
|
+
}
|
|
4153
4187
|
commitTransition({
|
|
4154
4188
|
targetRouterState,
|
|
4155
4189
|
finalUrl,
|
|
@@ -4186,7 +4220,7 @@ class StateManager {
|
|
|
4186
4220
|
}
|
|
4187
4221
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4188
4222
|
minVersion: "12.0.0",
|
|
4189
|
-
version: "22.0.0-next.
|
|
4223
|
+
version: "22.0.0-next.11",
|
|
4190
4224
|
ngImport: i0,
|
|
4191
4225
|
type: StateManager,
|
|
4192
4226
|
deps: [],
|
|
@@ -4194,7 +4228,7 @@ class StateManager {
|
|
|
4194
4228
|
});
|
|
4195
4229
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4196
4230
|
minVersion: "12.0.0",
|
|
4197
|
-
version: "22.0.0-next.
|
|
4231
|
+
version: "22.0.0-next.11",
|
|
4198
4232
|
ngImport: i0,
|
|
4199
4233
|
type: StateManager,
|
|
4200
4234
|
providedIn: 'root',
|
|
@@ -4203,7 +4237,7 @@ class StateManager {
|
|
|
4203
4237
|
}
|
|
4204
4238
|
i0.ɵɵngDeclareClassMetadata({
|
|
4205
4239
|
minVersion: "12.0.0",
|
|
4206
|
-
version: "22.0.0-next.
|
|
4240
|
+
version: "22.0.0-next.11",
|
|
4207
4241
|
ngImport: i0,
|
|
4208
4242
|
type: StateManager,
|
|
4209
4243
|
decorators: [{
|
|
@@ -4259,10 +4293,11 @@ class HistoryStateManager extends StateManager {
|
|
|
4259
4293
|
this.currentPageId = this.browserPageId;
|
|
4260
4294
|
}
|
|
4261
4295
|
}
|
|
4262
|
-
setBrowserUrl(path, {
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4296
|
+
setBrowserUrl(path, navigation) {
|
|
4297
|
+
const {
|
|
4298
|
+
extras,
|
|
4299
|
+
id
|
|
4300
|
+
} = navigation;
|
|
4266
4301
|
const {
|
|
4267
4302
|
replaceUrl,
|
|
4268
4303
|
state
|
|
@@ -4271,13 +4306,13 @@ class HistoryStateManager extends StateManager {
|
|
|
4271
4306
|
const currentBrowserPageId = this.browserPageId;
|
|
4272
4307
|
const newState = {
|
|
4273
4308
|
...state,
|
|
4274
|
-
...this.generateNgRouterState(id, currentBrowserPageId)
|
|
4309
|
+
...this.generateNgRouterState(id, currentBrowserPageId, navigation)
|
|
4275
4310
|
};
|
|
4276
4311
|
this.location.replaceState(path, '', newState);
|
|
4277
4312
|
} else {
|
|
4278
4313
|
const newState = {
|
|
4279
4314
|
...state,
|
|
4280
|
-
...this.generateNgRouterState(id, this.browserPageId + 1)
|
|
4315
|
+
...this.generateNgRouterState(id, this.browserPageId + 1, navigation)
|
|
4281
4316
|
};
|
|
4282
4317
|
this.location.go(path, '', newState);
|
|
4283
4318
|
}
|
|
@@ -4309,20 +4344,22 @@ class HistoryStateManager extends StateManager {
|
|
|
4309
4344
|
resetUrlToCurrentUrlTree() {
|
|
4310
4345
|
this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
|
|
4311
4346
|
}
|
|
4312
|
-
generateNgRouterState(navigationId, routerPageId) {
|
|
4347
|
+
generateNgRouterState(navigationId, routerPageId, navigation) {
|
|
4313
4348
|
if (this.canceledNavigationResolution === 'computed') {
|
|
4314
4349
|
return {
|
|
4315
4350
|
navigationId,
|
|
4316
|
-
ɵrouterPageId: routerPageId
|
|
4351
|
+
ɵrouterPageId: routerPageId,
|
|
4352
|
+
...this.routerUrlState(navigation)
|
|
4317
4353
|
};
|
|
4318
4354
|
}
|
|
4319
4355
|
return {
|
|
4320
|
-
navigationId
|
|
4356
|
+
navigationId,
|
|
4357
|
+
...this.routerUrlState(navigation)
|
|
4321
4358
|
};
|
|
4322
4359
|
}
|
|
4323
4360
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4324
4361
|
minVersion: "12.0.0",
|
|
4325
|
-
version: "22.0.0-next.
|
|
4362
|
+
version: "22.0.0-next.11",
|
|
4326
4363
|
ngImport: i0,
|
|
4327
4364
|
type: HistoryStateManager,
|
|
4328
4365
|
deps: null,
|
|
@@ -4330,7 +4367,7 @@ class HistoryStateManager extends StateManager {
|
|
|
4330
4367
|
});
|
|
4331
4368
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4332
4369
|
minVersion: "12.0.0",
|
|
4333
|
-
version: "22.0.0-next.
|
|
4370
|
+
version: "22.0.0-next.11",
|
|
4334
4371
|
ngImport: i0,
|
|
4335
4372
|
type: HistoryStateManager,
|
|
4336
4373
|
providedIn: 'root'
|
|
@@ -4338,7 +4375,7 @@ class HistoryStateManager extends StateManager {
|
|
|
4338
4375
|
}
|
|
4339
4376
|
i0.ɵɵngDeclareClassMetadata({
|
|
4340
4377
|
minVersion: "12.0.0",
|
|
4341
|
-
version: "22.0.0-next.
|
|
4378
|
+
version: "22.0.0-next.11",
|
|
4342
4379
|
ngImport: i0,
|
|
4343
4380
|
type: HistoryStateManager,
|
|
4344
4381
|
decorators: [{
|
|
@@ -4468,17 +4505,25 @@ class Router {
|
|
|
4468
4505
|
}
|
|
4469
4506
|
navigateToSyncWithBrowser(url, source, state, extras) {
|
|
4470
4507
|
const restoredState = state?.navigationId ? state : null;
|
|
4508
|
+
const routerUrl = state?.ɵrouterUrl ?? url;
|
|
4509
|
+
if (state?.ɵrouterUrl) {
|
|
4510
|
+
extras = {
|
|
4511
|
+
...extras,
|
|
4512
|
+
browserUrl: url
|
|
4513
|
+
};
|
|
4514
|
+
}
|
|
4471
4515
|
if (state) {
|
|
4472
4516
|
const stateCopy = {
|
|
4473
4517
|
...state
|
|
4474
4518
|
};
|
|
4475
4519
|
delete stateCopy.navigationId;
|
|
4476
4520
|
delete stateCopy.ɵrouterPageId;
|
|
4521
|
+
delete stateCopy.ɵrouterUrl;
|
|
4477
4522
|
if (Object.keys(stateCopy).length !== 0) {
|
|
4478
4523
|
extras.state = stateCopy;
|
|
4479
4524
|
}
|
|
4480
4525
|
}
|
|
4481
|
-
const urlTree = this.parseUrl(
|
|
4526
|
+
const urlTree = this.parseUrl(routerUrl);
|
|
4482
4527
|
this.scheduleNavigation(urlTree, source, restoredState, extras).catch(e => {
|
|
4483
4528
|
if (this.disposed) {
|
|
4484
4529
|
return;
|
|
@@ -4641,7 +4686,7 @@ class Router {
|
|
|
4641
4686
|
}
|
|
4642
4687
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4643
4688
|
minVersion: "12.0.0",
|
|
4644
|
-
version: "22.0.0-next.
|
|
4689
|
+
version: "22.0.0-next.11",
|
|
4645
4690
|
ngImport: i0,
|
|
4646
4691
|
type: Router,
|
|
4647
4692
|
deps: [],
|
|
@@ -4649,7 +4694,7 @@ class Router {
|
|
|
4649
4694
|
});
|
|
4650
4695
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
4651
4696
|
minVersion: "12.0.0",
|
|
4652
|
-
version: "22.0.0-next.
|
|
4697
|
+
version: "22.0.0-next.11",
|
|
4653
4698
|
ngImport: i0,
|
|
4654
4699
|
type: Router,
|
|
4655
4700
|
providedIn: 'root'
|
|
@@ -4657,7 +4702,7 @@ class Router {
|
|
|
4657
4702
|
}
|
|
4658
4703
|
i0.ɵɵngDeclareClassMetadata({
|
|
4659
4704
|
minVersion: "12.0.0",
|
|
4660
|
-
version: "22.0.0-next.
|
|
4705
|
+
version: "22.0.0-next.11",
|
|
4661
4706
|
ngImport: i0,
|
|
4662
4707
|
type: Router,
|
|
4663
4708
|
decorators: [{
|