@angular/router 22.0.0-next.8 → 22.0.0-rc.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/fesm2022/_router-chunk.mjs +175 -177
- package/fesm2022/_router-chunk.mjs.map +1 -1
- package/fesm2022/_router_module-chunk.mjs +58 -68
- 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 +17 -21
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +1 -1
- package/package.json +5 -5
- package/types/_router_module-chunk.d.ts +31 -30
- package/types/router.d.ts +5 -3
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-
|
|
2
|
+
* @license Angular v22.0.0-rc.0
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as i3 from '@angular/common';
|
|
8
8
|
import { ViewportScroller, PlatformNavigation, PlatformLocation, ɵPRECOMMIT_HANDLER_SUPPORTED as _PRECOMMIT_HANDLER_SUPPORTED, LOCATION_INITIALIZED, Location, ɵNavigationAdapterForLocation as _NavigationAdapterForLocation, HashLocationStrategy, LocationStrategy, PathLocationStrategy } from '@angular/common';
|
|
9
9
|
import * as i0 from '@angular/core';
|
|
10
|
-
import { inject, HostAttributeToken, linkedSignal, untracked, signal, input, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, effect, ɵRuntimeError as _RuntimeError, computed, booleanAttribute,
|
|
10
|
+
import { inject, HostAttributeToken, linkedSignal, untracked, signal, input, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, effect, ɵRuntimeError as _RuntimeError, computed, booleanAttribute, Service, HostListener, Input, Attribute, Directive, EventEmitter, Output, ContentChildren, createEnvironmentInjector, Injectable, InjectionToken, NgZone, EnvironmentInjector, DestroyRef, afterNextRender, ɵpromiseWithResolvers as _promiseWithResolvers, ɵpublishExternalGlobalUtil as _publishExternalGlobalUtil, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, provideAppInitializer, ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as _IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, Injector, provideEnvironmentInitializer, ɵperformanceMarkFeature as _performanceMarkFeature, ApplicationRef, ENVIRONMENT_INITIALIZER, NgModule } from '@angular/core';
|
|
11
11
|
import { ROUTER_CONFIGURATION, isUrlTree, Router, ActivatedRoute, StateManager, UrlSerializer, NavigationEnd, UrlTree, isActive, exactMatchOptions, subsetMatchOptions, RouterConfigLoader, IMPERATIVE_NAVIGATION, NavigationTransitions, NavigationStart, NavigationSkipped, NavigationSkippedCode, Scroll, BeforeRoutesRecognized, BeforeActivateRoutes, NavigationCancel, NavigationError, isRedirectingEvent, NavigationCancellationCode, ROUTES, afterNextNavigation, NAVIGATION_ERROR_HANDLER, routeInjectorCleanup, ROUTE_INJECTOR_CLEANUP, RoutedComponentInputBinder, INPUT_BINDER, createViewTransition, CREATE_VIEW_TRANSITION, VIEW_TRANSITION_OPTIONS, stringifyEvent, DefaultUrlSerializer, ChildrenOutletContexts, RouterOutlet, ɵEmptyOutletComponent as _EmptyOutletComponent } from './_router-chunk.mjs';
|
|
12
12
|
import { Subject, of, from } from 'rxjs';
|
|
13
13
|
import { mergeAll, catchError, filter, concatMap, mergeMap } from 'rxjs/operators';
|
|
@@ -45,30 +45,26 @@ class ReactiveRouterState {
|
|
|
45
45
|
}
|
|
46
46
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
47
47
|
minVersion: "12.0.0",
|
|
48
|
-
version: "22.0.0-
|
|
48
|
+
version: "22.0.0-rc.0",
|
|
49
49
|
ngImport: i0,
|
|
50
50
|
type: ReactiveRouterState,
|
|
51
51
|
deps: [],
|
|
52
|
-
target: i0.ɵɵFactoryTarget.
|
|
52
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
53
53
|
});
|
|
54
|
-
static ɵprov = i0.ɵɵ
|
|
55
|
-
minVersion: "
|
|
56
|
-
version: "22.0.0-
|
|
54
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
55
|
+
minVersion: "22.0.0",
|
|
56
|
+
version: "22.0.0-rc.0",
|
|
57
57
|
ngImport: i0,
|
|
58
|
-
type: ReactiveRouterState
|
|
59
|
-
providedIn: 'root'
|
|
58
|
+
type: ReactiveRouterState
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
i0.ɵɵngDeclareClassMetadata({
|
|
63
62
|
minVersion: "12.0.0",
|
|
64
|
-
version: "22.0.0-
|
|
63
|
+
version: "22.0.0-rc.0",
|
|
65
64
|
ngImport: i0,
|
|
66
65
|
type: ReactiveRouterState,
|
|
67
66
|
decorators: [{
|
|
68
|
-
type:
|
|
69
|
-
args: [{
|
|
70
|
-
providedIn: 'root'
|
|
71
|
-
}]
|
|
67
|
+
type: Service
|
|
72
68
|
}],
|
|
73
69
|
ctorParameters: () => []
|
|
74
70
|
});
|
|
@@ -321,7 +317,7 @@ class RouterLink {
|
|
|
321
317
|
}
|
|
322
318
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
323
319
|
minVersion: "12.0.0",
|
|
324
|
-
version: "22.0.0-
|
|
320
|
+
version: "22.0.0-rc.0",
|
|
325
321
|
ngImport: i0,
|
|
326
322
|
type: RouterLink,
|
|
327
323
|
deps: [{
|
|
@@ -342,7 +338,7 @@ class RouterLink {
|
|
|
342
338
|
});
|
|
343
339
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
344
340
|
minVersion: "17.1.0",
|
|
345
|
-
version: "22.0.0-
|
|
341
|
+
version: "22.0.0-rc.0",
|
|
346
342
|
type: RouterLink,
|
|
347
343
|
isStandalone: true,
|
|
348
344
|
selector: "[routerLink]",
|
|
@@ -447,7 +443,7 @@ class RouterLink {
|
|
|
447
443
|
}
|
|
448
444
|
i0.ɵɵngDeclareClassMetadata({
|
|
449
445
|
minVersion: "12.0.0",
|
|
450
|
-
version: "22.0.0-
|
|
446
|
+
version: "22.0.0-rc.0",
|
|
451
447
|
ngImport: i0,
|
|
452
448
|
type: RouterLink,
|
|
453
449
|
decorators: [{
|
|
@@ -633,7 +629,7 @@ class RouterLinkActive {
|
|
|
633
629
|
}
|
|
634
630
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
635
631
|
minVersion: "12.0.0",
|
|
636
|
-
version: "22.0.0-
|
|
632
|
+
version: "22.0.0-rc.0",
|
|
637
633
|
ngImport: i0,
|
|
638
634
|
type: RouterLinkActive,
|
|
639
635
|
deps: [{
|
|
@@ -649,7 +645,7 @@ class RouterLinkActive {
|
|
|
649
645
|
});
|
|
650
646
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
651
647
|
minVersion: "14.0.0",
|
|
652
|
-
version: "22.0.0-
|
|
648
|
+
version: "22.0.0-rc.0",
|
|
653
649
|
type: RouterLinkActive,
|
|
654
650
|
isStandalone: true,
|
|
655
651
|
selector: "[routerLinkActive]",
|
|
@@ -673,7 +669,7 @@ class RouterLinkActive {
|
|
|
673
669
|
}
|
|
674
670
|
i0.ɵɵngDeclareClassMetadata({
|
|
675
671
|
minVersion: "12.0.0",
|
|
676
|
-
version: "22.0.0-
|
|
672
|
+
version: "22.0.0-rc.0",
|
|
677
673
|
ngImport: i0,
|
|
678
674
|
type: RouterLinkActive,
|
|
679
675
|
decorators: [{
|
|
@@ -725,30 +721,26 @@ class PreloadAllModules {
|
|
|
725
721
|
}
|
|
726
722
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
727
723
|
minVersion: "12.0.0",
|
|
728
|
-
version: "22.0.0-
|
|
724
|
+
version: "22.0.0-rc.0",
|
|
729
725
|
ngImport: i0,
|
|
730
726
|
type: PreloadAllModules,
|
|
731
727
|
deps: [],
|
|
732
|
-
target: i0.ɵɵFactoryTarget.
|
|
728
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
733
729
|
});
|
|
734
|
-
static ɵprov = i0.ɵɵ
|
|
735
|
-
minVersion: "
|
|
736
|
-
version: "22.0.0-
|
|
730
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
731
|
+
minVersion: "22.0.0",
|
|
732
|
+
version: "22.0.0-rc.0",
|
|
737
733
|
ngImport: i0,
|
|
738
|
-
type: PreloadAllModules
|
|
739
|
-
providedIn: 'root'
|
|
734
|
+
type: PreloadAllModules
|
|
740
735
|
});
|
|
741
736
|
}
|
|
742
737
|
i0.ɵɵngDeclareClassMetadata({
|
|
743
738
|
minVersion: "12.0.0",
|
|
744
|
-
version: "22.0.0-
|
|
739
|
+
version: "22.0.0-rc.0",
|
|
745
740
|
ngImport: i0,
|
|
746
741
|
type: PreloadAllModules,
|
|
747
742
|
decorators: [{
|
|
748
|
-
type:
|
|
749
|
-
args: [{
|
|
750
|
-
providedIn: 'root'
|
|
751
|
-
}]
|
|
743
|
+
type: Service
|
|
752
744
|
}]
|
|
753
745
|
});
|
|
754
746
|
class NoPreloading {
|
|
@@ -757,30 +749,26 @@ class NoPreloading {
|
|
|
757
749
|
}
|
|
758
750
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
759
751
|
minVersion: "12.0.0",
|
|
760
|
-
version: "22.0.0-
|
|
752
|
+
version: "22.0.0-rc.0",
|
|
761
753
|
ngImport: i0,
|
|
762
754
|
type: NoPreloading,
|
|
763
755
|
deps: [],
|
|
764
|
-
target: i0.ɵɵFactoryTarget.
|
|
756
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
765
757
|
});
|
|
766
|
-
static ɵprov = i0.ɵɵ
|
|
767
|
-
minVersion: "
|
|
768
|
-
version: "22.0.0-
|
|
758
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
759
|
+
minVersion: "22.0.0",
|
|
760
|
+
version: "22.0.0-rc.0",
|
|
769
761
|
ngImport: i0,
|
|
770
|
-
type: NoPreloading
|
|
771
|
-
providedIn: 'root'
|
|
762
|
+
type: NoPreloading
|
|
772
763
|
});
|
|
773
764
|
}
|
|
774
765
|
i0.ɵɵngDeclareClassMetadata({
|
|
775
766
|
minVersion: "12.0.0",
|
|
776
|
-
version: "22.0.0-
|
|
767
|
+
version: "22.0.0-rc.0",
|
|
777
768
|
ngImport: i0,
|
|
778
769
|
type: NoPreloading,
|
|
779
770
|
decorators: [{
|
|
780
|
-
type:
|
|
781
|
-
args: [{
|
|
782
|
-
providedIn: 'root'
|
|
783
|
-
}]
|
|
771
|
+
type: Service
|
|
784
772
|
}]
|
|
785
773
|
});
|
|
786
774
|
class RouterPreloader {
|
|
@@ -854,7 +842,7 @@ class RouterPreloader {
|
|
|
854
842
|
}
|
|
855
843
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
856
844
|
minVersion: "12.0.0",
|
|
857
|
-
version: "22.0.0-
|
|
845
|
+
version: "22.0.0-rc.0",
|
|
858
846
|
ngImport: i0,
|
|
859
847
|
type: RouterPreloader,
|
|
860
848
|
deps: [{
|
|
@@ -870,7 +858,7 @@ class RouterPreloader {
|
|
|
870
858
|
});
|
|
871
859
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
872
860
|
minVersion: "12.0.0",
|
|
873
|
-
version: "22.0.0-
|
|
861
|
+
version: "22.0.0-rc.0",
|
|
874
862
|
ngImport: i0,
|
|
875
863
|
type: RouterPreloader,
|
|
876
864
|
providedIn: 'root'
|
|
@@ -878,7 +866,7 @@ class RouterPreloader {
|
|
|
878
866
|
}
|
|
879
867
|
i0.ɵɵngDeclareClassMetadata({
|
|
880
868
|
minVersion: "12.0.0",
|
|
881
|
-
version: "22.0.0-
|
|
869
|
+
version: "22.0.0-rc.0",
|
|
882
870
|
ngImport: i0,
|
|
883
871
|
type: RouterPreloader,
|
|
884
872
|
decorators: [{
|
|
@@ -980,7 +968,7 @@ class RouterScroller {
|
|
|
980
968
|
}
|
|
981
969
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
982
970
|
minVersion: "12.0.0",
|
|
983
|
-
version: "22.0.0-
|
|
971
|
+
version: "22.0.0-rc.0",
|
|
984
972
|
ngImport: i0,
|
|
985
973
|
type: RouterScroller,
|
|
986
974
|
deps: "invalid",
|
|
@@ -988,14 +976,14 @@ class RouterScroller {
|
|
|
988
976
|
});
|
|
989
977
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
990
978
|
minVersion: "12.0.0",
|
|
991
|
-
version: "22.0.0-
|
|
979
|
+
version: "22.0.0-rc.0",
|
|
992
980
|
ngImport: i0,
|
|
993
981
|
type: RouterScroller
|
|
994
982
|
});
|
|
995
983
|
}
|
|
996
984
|
i0.ɵɵngDeclareClassMetadata({
|
|
997
985
|
minVersion: "12.0.0",
|
|
998
|
-
version: "22.0.0-
|
|
986
|
+
version: "22.0.0-rc.0",
|
|
999
987
|
ngImport: i0,
|
|
1000
988
|
type: RouterScroller,
|
|
1001
989
|
decorators: [{
|
|
@@ -1132,7 +1120,7 @@ class NavigationStateManager extends StateManager {
|
|
|
1132
1120
|
const path = transition.extras.skipLocationChange ? this.navigation.currentEntry.url : this.location.prepareExternalUrl(internalPath);
|
|
1133
1121
|
const state = {
|
|
1134
1122
|
...transition.extras.state,
|
|
1135
|
-
|
|
1123
|
+
...this.generateNgRouterState(transition)
|
|
1136
1124
|
};
|
|
1137
1125
|
const info = {
|
|
1138
1126
|
ɵrouterInfo: {
|
|
@@ -1269,7 +1257,7 @@ class NavigationStateManager extends StateManager {
|
|
|
1269
1257
|
const history = this.location.isCurrentPathEqualTo(internalPath) || !!transition.extras.replaceUrl ? 'replace' : 'push';
|
|
1270
1258
|
const state = {
|
|
1271
1259
|
...transition.extras.state,
|
|
1272
|
-
|
|
1260
|
+
...this.generateNgRouterState(transition)
|
|
1273
1261
|
};
|
|
1274
1262
|
const pathOrUrl = this.location.prepareExternalUrl(internalPath);
|
|
1275
1263
|
(await redirect)(pathOrUrl, {
|
|
@@ -1300,35 +1288,37 @@ class NavigationStateManager extends StateManager {
|
|
|
1300
1288
|
const routerDestination = this.location.prepareExternalUrl(internalPath);
|
|
1301
1289
|
return new URL(routerDestination, eventDestination.origin).href === eventDestination.href;
|
|
1302
1290
|
}
|
|
1291
|
+
generateNgRouterState(transition) {
|
|
1292
|
+
return {
|
|
1293
|
+
...this.routerUrlState(transition),
|
|
1294
|
+
navigationId: transition.id
|
|
1295
|
+
};
|
|
1296
|
+
}
|
|
1303
1297
|
deferredCommitSupported(event) {
|
|
1304
1298
|
return this.precommitHandlerSupported && event.cancelable;
|
|
1305
1299
|
}
|
|
1306
1300
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1307
1301
|
minVersion: "12.0.0",
|
|
1308
|
-
version: "22.0.0-
|
|
1302
|
+
version: "22.0.0-rc.0",
|
|
1309
1303
|
ngImport: i0,
|
|
1310
1304
|
type: NavigationStateManager,
|
|
1311
1305
|
deps: [],
|
|
1312
|
-
target: i0.ɵɵFactoryTarget.
|
|
1306
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
1313
1307
|
});
|
|
1314
|
-
static ɵprov = i0.ɵɵ
|
|
1315
|
-
minVersion: "
|
|
1316
|
-
version: "22.0.0-
|
|
1308
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
1309
|
+
minVersion: "22.0.0",
|
|
1310
|
+
version: "22.0.0-rc.0",
|
|
1317
1311
|
ngImport: i0,
|
|
1318
|
-
type: NavigationStateManager
|
|
1319
|
-
providedIn: 'root'
|
|
1312
|
+
type: NavigationStateManager
|
|
1320
1313
|
});
|
|
1321
1314
|
}
|
|
1322
1315
|
i0.ɵɵngDeclareClassMetadata({
|
|
1323
1316
|
minVersion: "12.0.0",
|
|
1324
|
-
version: "22.0.0-
|
|
1317
|
+
version: "22.0.0-rc.0",
|
|
1325
1318
|
ngImport: i0,
|
|
1326
1319
|
type: NavigationStateManager,
|
|
1327
1320
|
decorators: [{
|
|
1328
|
-
type:
|
|
1329
|
-
args: [{
|
|
1330
|
-
providedIn: 'root'
|
|
1331
|
-
}]
|
|
1321
|
+
type: Service
|
|
1332
1322
|
}],
|
|
1333
1323
|
ctorParameters: () => []
|
|
1334
1324
|
});
|
|
@@ -1593,7 +1583,7 @@ class RouterModule {
|
|
|
1593
1583
|
}
|
|
1594
1584
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1595
1585
|
minVersion: "12.0.0",
|
|
1596
|
-
version: "22.0.0-
|
|
1586
|
+
version: "22.0.0-rc.0",
|
|
1597
1587
|
ngImport: i0,
|
|
1598
1588
|
type: RouterModule,
|
|
1599
1589
|
deps: [],
|
|
@@ -1601,7 +1591,7 @@ class RouterModule {
|
|
|
1601
1591
|
});
|
|
1602
1592
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1603
1593
|
minVersion: "14.0.0",
|
|
1604
|
-
version: "22.0.0-
|
|
1594
|
+
version: "22.0.0-rc.0",
|
|
1605
1595
|
ngImport: i0,
|
|
1606
1596
|
type: RouterModule,
|
|
1607
1597
|
imports: [RouterOutlet, RouterLink, RouterLinkActive, _EmptyOutletComponent],
|
|
@@ -1609,14 +1599,14 @@ class RouterModule {
|
|
|
1609
1599
|
});
|
|
1610
1600
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
1611
1601
|
minVersion: "12.0.0",
|
|
1612
|
-
version: "22.0.0-
|
|
1602
|
+
version: "22.0.0-rc.0",
|
|
1613
1603
|
ngImport: i0,
|
|
1614
1604
|
type: RouterModule
|
|
1615
1605
|
});
|
|
1616
1606
|
}
|
|
1617
1607
|
i0.ɵɵngDeclareClassMetadata({
|
|
1618
1608
|
minVersion: "12.0.0",
|
|
1619
|
-
version: "22.0.0-
|
|
1609
|
+
version: "22.0.0-rc.0",
|
|
1620
1610
|
ngImport: i0,
|
|
1621
1611
|
type: RouterModule,
|
|
1622
1612
|
decorators: [{
|