@angular/router 16.0.0-next.0 → 16.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/apply_redirects.mjs +3 -4
- package/esm2020/src/components/empty_outlet.mjs +6 -5
- package/esm2020/src/create_url_tree.mjs +9 -9
- package/esm2020/src/create_url_tree_strategy.mjs +17 -14
- package/esm2020/src/directives/router_link.mjs +6 -5
- package/esm2020/src/directives/router_link_active.mjs +6 -5
- package/esm2020/src/directives/router_outlet.mjs +6 -5
- package/esm2020/src/index.mjs +2 -1
- package/esm2020/src/models.mjs +1 -1
- package/esm2020/src/navigation_transition.mjs +6 -5
- package/esm2020/src/operators/activate_routes.mjs +2 -3
- package/esm2020/src/page_title_strategy.mjs +11 -9
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/route_reuse_strategy.mjs +11 -9
- package/esm2020/src/router.mjs +14 -7
- package/esm2020/src/router_config_loader.mjs +8 -7
- package/esm2020/src/router_module.mjs +7 -6
- package/esm2020/src/router_outlet_context.mjs +6 -5
- package/esm2020/src/router_preloader.mjs +16 -13
- package/esm2020/src/router_scroller.mjs +6 -5
- package/esm2020/src/url_handling_strategy.mjs +11 -9
- package/esm2020/src/url_tree.mjs +11 -10
- package/esm2020/src/utils/collection.mjs +3 -22
- package/esm2020/src/utils/config.mjs +7 -3
- package/esm2020/src/utils/config_matching.mjs +2 -3
- package/esm2020/src/utils/functional_guards.mjs +69 -0
- package/esm2020/src/utils/preactivation.mjs +5 -4
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_harness.mjs +11 -9
- package/esm2020/testing/src/router_testing_module.mjs +7 -6
- package/fesm2015/router.mjs +173 -119
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +11 -11
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +170 -116
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +11 -11
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +94 -26
- package/package.json +5 -5
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2020/router.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import {
|
|
9
|
-
import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
8
|
+
import { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
|
|
9
|
+
import { isObservable, from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
10
10
|
import * as i3 from '@angular/common';
|
|
11
11
|
import { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
|
|
12
12
|
import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
|
|
@@ -143,33 +143,14 @@ function equalArraysOrString(a, b) {
|
|
|
143
143
|
return a === b;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Flattens single-level nested arrays.
|
|
148
|
-
*/
|
|
149
|
-
function flatten(arr) {
|
|
150
|
-
return Array.prototype.concat.apply([], arr);
|
|
151
|
-
}
|
|
152
146
|
/**
|
|
153
147
|
* Return the last element of an array.
|
|
154
148
|
*/
|
|
155
149
|
function last(a) {
|
|
156
150
|
return a.length > 0 ? a[a.length - 1] : null;
|
|
157
151
|
}
|
|
158
|
-
/**
|
|
159
|
-
* Verifys all booleans in an array are `true`.
|
|
160
|
-
*/
|
|
161
|
-
function and(bools) {
|
|
162
|
-
return !bools.some(v => !v);
|
|
163
|
-
}
|
|
164
|
-
function forEach(map, callback) {
|
|
165
|
-
for (const prop in map) {
|
|
166
|
-
if (map.hasOwnProperty(prop)) {
|
|
167
|
-
callback(map[prop], prop);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
152
|
function wrapIntoObservable(value) {
|
|
172
|
-
if (
|
|
153
|
+
if (isObservable(value)) {
|
|
173
154
|
return value;
|
|
174
155
|
}
|
|
175
156
|
if (ɵisPromise(value)) {
|
|
@@ -343,7 +324,7 @@ class UrlSegmentGroup {
|
|
|
343
324
|
this.children = children;
|
|
344
325
|
/** The parent node in the url tree */
|
|
345
326
|
this.parent = null;
|
|
346
|
-
|
|
327
|
+
Object.values(children).forEach((v) => (v.parent = this));
|
|
347
328
|
}
|
|
348
329
|
/** Whether the segment has child segments */
|
|
349
330
|
hasChildren() {
|
|
@@ -414,12 +395,12 @@ function equalPath(as, bs) {
|
|
|
414
395
|
}
|
|
415
396
|
function mapChildrenIntoArray(segment, fn) {
|
|
416
397
|
let res = [];
|
|
417
|
-
|
|
398
|
+
Object.entries(segment.children).forEach(([childOutlet, child]) => {
|
|
418
399
|
if (childOutlet === PRIMARY_OUTLET) {
|
|
419
400
|
res = res.concat(fn(child, childOutlet));
|
|
420
401
|
}
|
|
421
402
|
});
|
|
422
|
-
|
|
403
|
+
Object.entries(segment.children).forEach(([childOutlet, child]) => {
|
|
423
404
|
if (childOutlet !== PRIMARY_OUTLET) {
|
|
424
405
|
res = res.concat(fn(child, childOutlet));
|
|
425
406
|
}
|
|
@@ -440,9 +421,9 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
440
421
|
*/
|
|
441
422
|
class UrlSerializer {
|
|
442
423
|
}
|
|
443
|
-
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
444
|
-
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
424
|
+
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
425
|
+
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
446
427
|
type: Injectable,
|
|
447
428
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
448
429
|
}] });
|
|
@@ -491,7 +472,7 @@ function serializeSegment(segment, root) {
|
|
|
491
472
|
serializeSegment(segment.children[PRIMARY_OUTLET], false) :
|
|
492
473
|
'';
|
|
493
474
|
const children = [];
|
|
494
|
-
|
|
475
|
+
Object.entries(segment.children).forEach(([k, v]) => {
|
|
495
476
|
if (k !== PRIMARY_OUTLET) {
|
|
496
477
|
children.push(`${k}:${serializeSegment(v, false)}`);
|
|
497
478
|
}
|
|
@@ -930,7 +911,7 @@ function isCommandWithOutlets(command) {
|
|
|
930
911
|
function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {
|
|
931
912
|
let qp = {};
|
|
932
913
|
if (queryParams) {
|
|
933
|
-
forEach(
|
|
914
|
+
Object.entries(queryParams).forEach(([name, value]) => {
|
|
934
915
|
qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;
|
|
935
916
|
});
|
|
936
917
|
}
|
|
@@ -953,7 +934,7 @@ function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment)
|
|
|
953
934
|
*/
|
|
954
935
|
function replaceSegment(current, oldSegment, newSegment) {
|
|
955
936
|
const children = {};
|
|
956
|
-
|
|
937
|
+
Object.entries(current.children).forEach(([outletName, c]) => {
|
|
957
938
|
if (c === oldSegment) {
|
|
958
939
|
children[outletName] = newSegment;
|
|
959
940
|
}
|
|
@@ -991,7 +972,7 @@ function computeNavigation(commands) {
|
|
|
991
972
|
if (typeof cmd === 'object' && cmd != null) {
|
|
992
973
|
if (cmd.outlets) {
|
|
993
974
|
const outlets = {};
|
|
994
|
-
|
|
975
|
+
Object.entries(cmd.outlets).forEach(([name, commands]) => {
|
|
995
976
|
outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;
|
|
996
977
|
});
|
|
997
978
|
return [...res, { outlets }];
|
|
@@ -1144,7 +1125,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1144
1125
|
segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {
|
|
1145
1126
|
return updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);
|
|
1146
1127
|
}
|
|
1147
|
-
forEach(
|
|
1128
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1148
1129
|
if (typeof commands === 'string') {
|
|
1149
1130
|
commands = [commands];
|
|
1150
1131
|
}
|
|
@@ -1152,7 +1133,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1152
1133
|
children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);
|
|
1153
1134
|
}
|
|
1154
1135
|
});
|
|
1155
|
-
|
|
1136
|
+
Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {
|
|
1156
1137
|
if (outlets[childOutlet] === undefined) {
|
|
1157
1138
|
children[childOutlet] = child;
|
|
1158
1139
|
}
|
|
@@ -1224,7 +1205,7 @@ function createNewSegmentGroup(segmentGroup, startIndex, commands) {
|
|
|
1224
1205
|
}
|
|
1225
1206
|
function createNewSegmentChildren(outlets) {
|
|
1226
1207
|
const children = {};
|
|
1227
|
-
forEach(
|
|
1208
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1228
1209
|
if (typeof commands === 'string') {
|
|
1229
1210
|
commands = [commands];
|
|
1230
1211
|
}
|
|
@@ -1236,7 +1217,7 @@ function createNewSegmentChildren(outlets) {
|
|
|
1236
1217
|
}
|
|
1237
1218
|
function stringify(params) {
|
|
1238
1219
|
const res = {};
|
|
1239
|
-
forEach(
|
|
1220
|
+
Object.entries(params).forEach(([k, v]) => res[k] = `${v}`);
|
|
1240
1221
|
return res;
|
|
1241
1222
|
}
|
|
1242
1223
|
function compare(path, params, segment) {
|
|
@@ -1762,9 +1743,9 @@ class LegacyCreateUrlTree {
|
|
|
1762
1743
|
return tree;
|
|
1763
1744
|
}
|
|
1764
1745
|
}
|
|
1765
|
-
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1766
|
-
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1746
|
+
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1747
|
+
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree });
|
|
1748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
|
|
1768
1749
|
type: Injectable
|
|
1769
1750
|
}] });
|
|
1770
1751
|
class CreateUrlTreeUsingSnapshot {
|
|
@@ -1795,18 +1776,18 @@ class CreateUrlTreeUsingSnapshot {
|
|
|
1795
1776
|
return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
|
|
1796
1777
|
}
|
|
1797
1778
|
}
|
|
1798
|
-
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1799
|
-
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1779
|
+
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1780
|
+
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
|
|
1781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
|
|
1801
1782
|
type: Injectable
|
|
1802
1783
|
}] });
|
|
1803
1784
|
class CreateUrlTreeStrategy {
|
|
1804
1785
|
}
|
|
1805
|
-
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1806
|
-
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1786
|
+
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1787
|
+
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot });
|
|
1788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
|
|
1808
1789
|
type: Injectable,
|
|
1809
|
-
args: [{ providedIn: 'root', useClass:
|
|
1790
|
+
args: [{ providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot }]
|
|
1810
1791
|
}] });
|
|
1811
1792
|
|
|
1812
1793
|
class Tree {
|
|
@@ -2431,9 +2412,9 @@ class ChildrenOutletContexts {
|
|
|
2431
2412
|
return this.contexts.get(childName) || null;
|
|
2432
2413
|
}
|
|
2433
2414
|
}
|
|
2434
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2435
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2415
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2416
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2437
2418
|
type: Injectable,
|
|
2438
2419
|
args: [{ providedIn: 'root' }]
|
|
2439
2420
|
}] });
|
|
@@ -2646,9 +2627,9 @@ class RouterOutlet {
|
|
|
2646
2627
|
this.activateEvents.emit(this.activated.instance);
|
|
2647
2628
|
}
|
|
2648
2629
|
}
|
|
2649
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2650
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2630
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2631
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
|
|
2632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2652
2633
|
type: Directive,
|
|
2653
2634
|
args: [{
|
|
2654
2635
|
selector: 'router-outlet',
|
|
@@ -2701,9 +2682,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2701
2682
|
*/
|
|
2702
2683
|
class ɵEmptyOutletComponent {
|
|
2703
2684
|
}
|
|
2704
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2705
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2685
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2686
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.2", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", 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"] }] });
|
|
2687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2707
2688
|
type: Component,
|
|
2708
2689
|
args: [{
|
|
2709
2690
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -2748,7 +2729,11 @@ function validateConfig(config, parentPath = '', requireStandaloneComponents = f
|
|
|
2748
2729
|
}
|
|
2749
2730
|
}
|
|
2750
2731
|
function assertStandalone(fullPath, component) {
|
|
2751
|
-
if (component &&
|
|
2732
|
+
if (component && ɵisNgModule(component)) {
|
|
2733
|
+
throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +
|
|
2734
|
+
`but it must be used with standalone components. Use 'loadChildren' instead.`);
|
|
2735
|
+
}
|
|
2736
|
+
else if (component && !isStandalone(component)) {
|
|
2752
2737
|
throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
|
|
2753
2738
|
}
|
|
2754
2739
|
}
|
|
@@ -2924,7 +2909,7 @@ class ActivateRoutes {
|
|
|
2924
2909
|
delete children[childOutletName];
|
|
2925
2910
|
});
|
|
2926
2911
|
// De-activate the routes that will not be re-used
|
|
2927
|
-
|
|
2912
|
+
Object.values(children).forEach((v) => {
|
|
2928
2913
|
this.deactivateRouteAndItsChildren(v, contexts);
|
|
2929
2914
|
});
|
|
2930
2915
|
}
|
|
@@ -3112,7 +3097,8 @@ function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks
|
|
|
3112
3097
|
delete prevChildren[c.value.outlet];
|
|
3113
3098
|
});
|
|
3114
3099
|
// Process any children left from the current route (not active for the future route)
|
|
3115
|
-
|
|
3100
|
+
Object.entries(prevChildren)
|
|
3101
|
+
.forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));
|
|
3116
3102
|
return checks;
|
|
3117
3103
|
}
|
|
3118
3104
|
function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {
|
|
@@ -3184,7 +3170,7 @@ function shouldRunGuardsAndResolvers(curr, future, mode) {
|
|
|
3184
3170
|
function deactivateRouteAndItsChildren(route, context, checks) {
|
|
3185
3171
|
const children = nodeChildrenAsMap(route);
|
|
3186
3172
|
const r = route.value;
|
|
3187
|
-
forEach(
|
|
3173
|
+
Object.entries(children).forEach(([childName, node]) => {
|
|
3188
3174
|
if (!r.component) {
|
|
3189
3175
|
deactivateRouteAndItsChildren(node, context, checks);
|
|
3190
3176
|
}
|
|
@@ -3455,7 +3441,7 @@ function match(segmentGroup, route, segments) {
|
|
|
3455
3441
|
if (!res)
|
|
3456
3442
|
return { ...noMatch$1 };
|
|
3457
3443
|
const posParams = {};
|
|
3458
|
-
|
|
3444
|
+
Object.entries(res.posParams ?? {}).forEach(([k, v]) => {
|
|
3459
3445
|
posParams[k] = v.path;
|
|
3460
3446
|
});
|
|
3461
3447
|
const parameters = res.consumed.length > 0 ?
|
|
@@ -3829,7 +3815,7 @@ class ApplyRedirects {
|
|
|
3829
3815
|
}
|
|
3830
3816
|
createQueryParams(redirectToParams, actualParams) {
|
|
3831
3817
|
const res = {};
|
|
3832
|
-
forEach(
|
|
3818
|
+
Object.entries(redirectToParams).forEach(([k, v]) => {
|
|
3833
3819
|
const copySourceValue = typeof v === 'string' && v.startsWith(':');
|
|
3834
3820
|
if (copySourceValue) {
|
|
3835
3821
|
const sourceName = v.substring(1);
|
|
@@ -3844,7 +3830,7 @@ class ApplyRedirects {
|
|
|
3844
3830
|
createSegmentGroup(redirectTo, group, segments, posParams) {
|
|
3845
3831
|
const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);
|
|
3846
3832
|
let children = {};
|
|
3847
|
-
|
|
3833
|
+
Object.entries(group.children).forEach(([name, child]) => {
|
|
3848
3834
|
children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);
|
|
3849
3835
|
});
|
|
3850
3836
|
return new UrlSegmentGroup(updatedSegments, children);
|
|
@@ -4311,7 +4297,7 @@ class RouterConfigLoader {
|
|
|
4311
4297
|
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
4312
4298
|
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
4313
4299
|
// for it's parent module instead.
|
|
4314
|
-
rawRoutes =
|
|
4300
|
+
rawRoutes = injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional).flat();
|
|
4315
4301
|
}
|
|
4316
4302
|
const routes = rawRoutes.map(standardizeConfig);
|
|
4317
4303
|
NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);
|
|
@@ -4341,9 +4327,9 @@ class RouterConfigLoader {
|
|
|
4341
4327
|
}));
|
|
4342
4328
|
}
|
|
4343
4329
|
}
|
|
4344
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4345
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4330
|
+
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4331
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4347
4333
|
type: Injectable,
|
|
4348
4334
|
args: [{ providedIn: 'root' }]
|
|
4349
4335
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -4722,9 +4708,9 @@ class NavigationTransitions {
|
|
|
4722
4708
|
t.resolve(false);
|
|
4723
4709
|
}
|
|
4724
4710
|
}
|
|
4725
|
-
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4726
|
-
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4711
|
+
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4712
|
+
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
4713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4728
4714
|
type: Injectable,
|
|
4729
4715
|
args: [{ providedIn: 'root' }]
|
|
4730
4716
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4776,9 +4762,9 @@ class TitleStrategy {
|
|
|
4776
4762
|
return snapshot.data[RouteTitleKey];
|
|
4777
4763
|
}
|
|
4778
4764
|
}
|
|
4779
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4780
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4781
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4765
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4766
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4782
4768
|
type: Injectable,
|
|
4783
4769
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4784
4770
|
}] });
|
|
@@ -4802,9 +4788,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4802
4788
|
}
|
|
4803
4789
|
}
|
|
4804
4790
|
}
|
|
4805
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4806
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4791
|
+
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4792
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4808
4794
|
type: Injectable,
|
|
4809
4795
|
args: [{ providedIn: 'root' }]
|
|
4810
4796
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4818,9 +4804,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
|
|
|
4818
4804
|
*/
|
|
4819
4805
|
class RouteReuseStrategy {
|
|
4820
4806
|
}
|
|
4821
|
-
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4822
|
-
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4807
|
+
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4808
|
+
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
4809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4824
4810
|
type: Injectable,
|
|
4825
4811
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4826
4812
|
}] });
|
|
@@ -4872,9 +4858,9 @@ class BaseRouteReuseStrategy {
|
|
|
4872
4858
|
}
|
|
4873
4859
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4874
4860
|
}
|
|
4875
|
-
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4876
|
-
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4861
|
+
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4862
|
+
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
4863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4878
4864
|
type: Injectable,
|
|
4879
4865
|
args: [{ providedIn: 'root' }]
|
|
4880
4866
|
}] });
|
|
@@ -4899,9 +4885,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
|
|
|
4899
4885
|
*/
|
|
4900
4886
|
class UrlHandlingStrategy {
|
|
4901
4887
|
}
|
|
4902
|
-
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4903
|
-
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4904
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4888
|
+
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4889
|
+
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
4890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4905
4891
|
type: Injectable,
|
|
4906
4892
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4907
4893
|
}] });
|
|
@@ -4919,9 +4905,9 @@ class DefaultUrlHandlingStrategy {
|
|
|
4919
4905
|
return newUrlPart;
|
|
4920
4906
|
}
|
|
4921
4907
|
}
|
|
4922
|
-
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4923
|
-
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4908
|
+
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4909
|
+
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
4910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4925
4911
|
type: Injectable,
|
|
4926
4912
|
args: [{ providedIn: 'root' }]
|
|
4927
4913
|
}] });
|
|
@@ -5117,7 +5103,7 @@ class Router {
|
|
|
5117
5103
|
* @see `RouterModule`
|
|
5118
5104
|
*/
|
|
5119
5105
|
this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
|
|
5120
|
-
this.config =
|
|
5106
|
+
this.config = inject(ROUTES, { optional: true })?.flat() ?? [];
|
|
5121
5107
|
this.navigationTransitions = inject(NavigationTransitions);
|
|
5122
5108
|
this.urlSerializer = inject(UrlSerializer);
|
|
5123
5109
|
this.location = inject(Location);
|
|
@@ -5214,6 +5200,13 @@ class Router {
|
|
|
5214
5200
|
getCurrentNavigation() {
|
|
5215
5201
|
return this.navigationTransitions.currentNavigation;
|
|
5216
5202
|
}
|
|
5203
|
+
/**
|
|
5204
|
+
* The `Navigation` object of the most recent navigation to succeed and `null` if there
|
|
5205
|
+
* has not been a successful navigation yet.
|
|
5206
|
+
*/
|
|
5207
|
+
get lastSuccessfulNavigation() {
|
|
5208
|
+
return this.navigationTransitions.lastSuccessfulNavigation;
|
|
5209
|
+
}
|
|
5217
5210
|
/**
|
|
5218
5211
|
* Resets the route configuration used for navigation and generating links.
|
|
5219
5212
|
*
|
|
@@ -5571,9 +5564,9 @@ class Router {
|
|
|
5571
5564
|
return { navigationId };
|
|
5572
5565
|
}
|
|
5573
5566
|
}
|
|
5574
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5575
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5567
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5568
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, decorators: [{
|
|
5577
5570
|
type: Injectable,
|
|
5578
5571
|
args: [{ providedIn: 'root' }]
|
|
5579
5572
|
}], ctorParameters: function () { return []; } });
|
|
@@ -5859,9 +5852,9 @@ class RouterLink {
|
|
|
5859
5852
|
});
|
|
5860
5853
|
}
|
|
5861
5854
|
}
|
|
5862
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5863
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
5864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5855
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5856
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
|
5857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLink, decorators: [{
|
|
5865
5858
|
type: Directive,
|
|
5866
5859
|
args: [{
|
|
5867
5860
|
selector: '[routerLink]',
|
|
@@ -6082,9 +6075,9 @@ class RouterLinkActive {
|
|
|
6082
6075
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6083
6076
|
}
|
|
6084
6077
|
}
|
|
6085
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6086
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
6087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6078
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6079
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
6080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6088
6081
|
type: Directive,
|
|
6089
6082
|
args: [{
|
|
6090
6083
|
selector: '[routerLinkActive]',
|
|
@@ -6137,9 +6130,9 @@ class PreloadAllModules {
|
|
|
6137
6130
|
return fn().pipe(catchError(() => of(null)));
|
|
6138
6131
|
}
|
|
6139
6132
|
}
|
|
6140
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6141
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6133
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6134
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6143
6136
|
type: Injectable,
|
|
6144
6137
|
args: [{ providedIn: 'root' }]
|
|
6145
6138
|
}] });
|
|
@@ -6157,9 +6150,9 @@ class NoPreloading {
|
|
|
6157
6150
|
return of(null);
|
|
6158
6151
|
}
|
|
6159
6152
|
}
|
|
6160
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6161
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6153
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6154
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6163
6156
|
type: Injectable,
|
|
6164
6157
|
args: [{ providedIn: 'root' }]
|
|
6165
6158
|
}] });
|
|
@@ -6253,9 +6246,9 @@ class RouterPreloader {
|
|
|
6253
6246
|
});
|
|
6254
6247
|
}
|
|
6255
6248
|
}
|
|
6256
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6257
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6249
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6250
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6259
6252
|
type: Injectable,
|
|
6260
6253
|
args: [{ providedIn: 'root' }]
|
|
6261
6254
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6349,9 +6342,9 @@ class RouterScroller {
|
|
|
6349
6342
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6350
6343
|
}
|
|
6351
6344
|
}
|
|
6352
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6353
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6345
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6346
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller });
|
|
6347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6355
6348
|
type: Injectable
|
|
6356
6349
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6357
6350
|
|
|
@@ -6958,10 +6951,10 @@ class RouterModule {
|
|
|
6958
6951
|
};
|
|
6959
6952
|
}
|
|
6960
6953
|
}
|
|
6961
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6962
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
6963
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6954
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6955
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
6956
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
6957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, decorators: [{
|
|
6965
6958
|
type: NgModule,
|
|
6966
6959
|
args: [{
|
|
6967
6960
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7037,6 +7030,67 @@ function provideRouterInitializer() {
|
|
|
7037
7030
|
];
|
|
7038
7031
|
}
|
|
7039
7032
|
|
|
7033
|
+
/**
|
|
7034
|
+
* Maps an array of injectable classes with canMatch functions to an array of equivalent
|
|
7035
|
+
* `CanMatchFn` for use in a `Route` definition.
|
|
7036
|
+
*
|
|
7037
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7038
|
+
*
|
|
7039
|
+
* @publicApi
|
|
7040
|
+
* @see Route
|
|
7041
|
+
*/
|
|
7042
|
+
function mapToCanMatch(providers) {
|
|
7043
|
+
return providers.map(provider => (...params) => inject(provider).canMatch(...params));
|
|
7044
|
+
}
|
|
7045
|
+
/**
|
|
7046
|
+
* Maps an array of injectable classes with canActivate functions to an array of equivalent
|
|
7047
|
+
* `CanActivateFn` for use in a `Route` definition.
|
|
7048
|
+
*
|
|
7049
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7050
|
+
*
|
|
7051
|
+
* @publicApi
|
|
7052
|
+
* @see Route
|
|
7053
|
+
*/
|
|
7054
|
+
function mapToCanActivate(providers) {
|
|
7055
|
+
return providers.map(provider => (...params) => inject(provider).canActivate(...params));
|
|
7056
|
+
}
|
|
7057
|
+
/**
|
|
7058
|
+
* Maps an array of injectable classes with canActivateChild functions to an array of equivalent
|
|
7059
|
+
* `CanActivateChildFn` for use in a `Route` definition.
|
|
7060
|
+
*
|
|
7061
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7062
|
+
*
|
|
7063
|
+
* @publicApi
|
|
7064
|
+
* @see Route
|
|
7065
|
+
*/
|
|
7066
|
+
function mapToCanActivateChild(providers) {
|
|
7067
|
+
return providers.map(provider => (...params) => inject(provider).canActivateChild(...params));
|
|
7068
|
+
}
|
|
7069
|
+
/**
|
|
7070
|
+
* Maps an array of injectable classes with canDeactivate functions to an array of equivalent
|
|
7071
|
+
* `CanDeactivateFn` for use in a `Route` definition.
|
|
7072
|
+
*
|
|
7073
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7074
|
+
*
|
|
7075
|
+
* @publicApi
|
|
7076
|
+
* @see Route
|
|
7077
|
+
*/
|
|
7078
|
+
function mapToCanDeactivate(providers) {
|
|
7079
|
+
return providers.map(provider => (...params) => inject(provider).canDeactivate(...params));
|
|
7080
|
+
}
|
|
7081
|
+
/**
|
|
7082
|
+
* Maps an injectable class with a resolve function to an equivalent `ResolveFn`
|
|
7083
|
+
* for use in a `Route` definition.
|
|
7084
|
+
*
|
|
7085
|
+
* Usage {@example router/utils/functional_guards.ts region='Resolve'}
|
|
7086
|
+
*
|
|
7087
|
+
* @publicApi
|
|
7088
|
+
* @see Route
|
|
7089
|
+
*/
|
|
7090
|
+
function mapToResolve(provider) {
|
|
7091
|
+
return (...params) => inject(provider).resolve(...params);
|
|
7092
|
+
}
|
|
7093
|
+
|
|
7040
7094
|
/**
|
|
7041
7095
|
* @module
|
|
7042
7096
|
* @description
|
|
@@ -7045,7 +7099,7 @@ function provideRouterInitializer() {
|
|
|
7045
7099
|
/**
|
|
7046
7100
|
* @publicApi
|
|
7047
7101
|
*/
|
|
7048
|
-
const VERSION = new Version('16.0.0-next.
|
|
7102
|
+
const VERSION = new Version('16.0.0-next.2');
|
|
7049
7103
|
|
|
7050
7104
|
/**
|
|
7051
7105
|
* @module
|
|
@@ -7060,5 +7114,5 @@ const VERSION = new Version('16.0.0-next.0');
|
|
|
7060
7114
|
* Generated bundle index. Do not edit.
|
|
7061
7115
|
*/
|
|
7062
7116
|
|
|
7063
|
-
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation,
|
|
7117
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, withPreloading as ɵwithPreloading };
|
|
7064
7118
|
//# sourceMappingURL=router.mjs.map
|