@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/fesm2015/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
|
}
|
|
@@ -932,7 +913,7 @@ function isCommandWithOutlets(command) {
|
|
|
932
913
|
function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {
|
|
933
914
|
let qp = {};
|
|
934
915
|
if (queryParams) {
|
|
935
|
-
forEach(
|
|
916
|
+
Object.entries(queryParams).forEach(([name, value]) => {
|
|
936
917
|
qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;
|
|
937
918
|
});
|
|
938
919
|
}
|
|
@@ -955,7 +936,7 @@ function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment)
|
|
|
955
936
|
*/
|
|
956
937
|
function replaceSegment(current, oldSegment, newSegment) {
|
|
957
938
|
const children = {};
|
|
958
|
-
|
|
939
|
+
Object.entries(current.children).forEach(([outletName, c]) => {
|
|
959
940
|
if (c === oldSegment) {
|
|
960
941
|
children[outletName] = newSegment;
|
|
961
942
|
}
|
|
@@ -993,7 +974,7 @@ function computeNavigation(commands) {
|
|
|
993
974
|
if (typeof cmd === 'object' && cmd != null) {
|
|
994
975
|
if (cmd.outlets) {
|
|
995
976
|
const outlets = {};
|
|
996
|
-
|
|
977
|
+
Object.entries(cmd.outlets).forEach(([name, commands]) => {
|
|
997
978
|
outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;
|
|
998
979
|
});
|
|
999
980
|
return [...res, { outlets }];
|
|
@@ -1146,7 +1127,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1146
1127
|
segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {
|
|
1147
1128
|
return updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);
|
|
1148
1129
|
}
|
|
1149
|
-
forEach(
|
|
1130
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1150
1131
|
if (typeof commands === 'string') {
|
|
1151
1132
|
commands = [commands];
|
|
1152
1133
|
}
|
|
@@ -1154,7 +1135,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1154
1135
|
children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);
|
|
1155
1136
|
}
|
|
1156
1137
|
});
|
|
1157
|
-
|
|
1138
|
+
Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {
|
|
1158
1139
|
if (outlets[childOutlet] === undefined) {
|
|
1159
1140
|
children[childOutlet] = child;
|
|
1160
1141
|
}
|
|
@@ -1226,7 +1207,7 @@ function createNewSegmentGroup(segmentGroup, startIndex, commands) {
|
|
|
1226
1207
|
}
|
|
1227
1208
|
function createNewSegmentChildren(outlets) {
|
|
1228
1209
|
const children = {};
|
|
1229
|
-
forEach(
|
|
1210
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1230
1211
|
if (typeof commands === 'string') {
|
|
1231
1212
|
commands = [commands];
|
|
1232
1213
|
}
|
|
@@ -1238,7 +1219,7 @@ function createNewSegmentChildren(outlets) {
|
|
|
1238
1219
|
}
|
|
1239
1220
|
function stringify(params) {
|
|
1240
1221
|
const res = {};
|
|
1241
|
-
forEach(
|
|
1222
|
+
Object.entries(params).forEach(([k, v]) => res[k] = `${v}`);
|
|
1242
1223
|
return res;
|
|
1243
1224
|
}
|
|
1244
1225
|
function compare(path, params, segment) {
|
|
@@ -1765,9 +1746,9 @@ class LegacyCreateUrlTree {
|
|
|
1765
1746
|
return tree;
|
|
1766
1747
|
}
|
|
1767
1748
|
}
|
|
1768
|
-
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1769
|
-
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1749
|
+
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1750
|
+
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree });
|
|
1751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
|
|
1771
1752
|
type: Injectable
|
|
1772
1753
|
}] });
|
|
1773
1754
|
class CreateUrlTreeUsingSnapshot {
|
|
@@ -1798,18 +1779,18 @@ class CreateUrlTreeUsingSnapshot {
|
|
|
1798
1779
|
return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
|
|
1799
1780
|
}
|
|
1800
1781
|
}
|
|
1801
|
-
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1802
|
-
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1782
|
+
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1783
|
+
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
|
|
1784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
|
|
1804
1785
|
type: Injectable
|
|
1805
1786
|
}] });
|
|
1806
1787
|
class CreateUrlTreeStrategy {
|
|
1807
1788
|
}
|
|
1808
|
-
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1809
|
-
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1789
|
+
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1790
|
+
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot });
|
|
1791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
|
|
1811
1792
|
type: Injectable,
|
|
1812
|
-
args: [{ providedIn: 'root', useClass:
|
|
1793
|
+
args: [{ providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot }]
|
|
1813
1794
|
}] });
|
|
1814
1795
|
|
|
1815
1796
|
class Tree {
|
|
@@ -2437,9 +2418,9 @@ class ChildrenOutletContexts {
|
|
|
2437
2418
|
return this.contexts.get(childName) || null;
|
|
2438
2419
|
}
|
|
2439
2420
|
}
|
|
2440
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2441
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2421
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2422
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2443
2424
|
type: Injectable,
|
|
2444
2425
|
args: [{ providedIn: 'root' }]
|
|
2445
2426
|
}] });
|
|
@@ -2653,9 +2634,9 @@ class RouterOutlet {
|
|
|
2653
2634
|
this.activateEvents.emit(this.activated.instance);
|
|
2654
2635
|
}
|
|
2655
2636
|
}
|
|
2656
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2657
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2637
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2638
|
+
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 });
|
|
2639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2659
2640
|
type: Directive,
|
|
2660
2641
|
args: [{
|
|
2661
2642
|
selector: 'router-outlet',
|
|
@@ -2708,9 +2689,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2708
2689
|
*/
|
|
2709
2690
|
class ɵEmptyOutletComponent {
|
|
2710
2691
|
}
|
|
2711
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2712
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2692
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2693
|
+
ɵ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"] }] });
|
|
2694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2714
2695
|
type: Component,
|
|
2715
2696
|
args: [{
|
|
2716
2697
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -2756,7 +2737,11 @@ function validateConfig(config, parentPath = '', requireStandaloneComponents = f
|
|
|
2756
2737
|
}
|
|
2757
2738
|
}
|
|
2758
2739
|
function assertStandalone(fullPath, component) {
|
|
2759
|
-
if (component &&
|
|
2740
|
+
if (component && ɵisNgModule(component)) {
|
|
2741
|
+
throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +
|
|
2742
|
+
`but it must be used with standalone components. Use 'loadChildren' instead.`);
|
|
2743
|
+
}
|
|
2744
|
+
else if (component && !isStandalone(component)) {
|
|
2760
2745
|
throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
|
|
2761
2746
|
}
|
|
2762
2747
|
}
|
|
@@ -2933,7 +2918,7 @@ class ActivateRoutes {
|
|
|
2933
2918
|
delete children[childOutletName];
|
|
2934
2919
|
});
|
|
2935
2920
|
// De-activate the routes that will not be re-used
|
|
2936
|
-
|
|
2921
|
+
Object.values(children).forEach((v) => {
|
|
2937
2922
|
this.deactivateRouteAndItsChildren(v, contexts);
|
|
2938
2923
|
});
|
|
2939
2924
|
}
|
|
@@ -3122,7 +3107,8 @@ function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks
|
|
|
3122
3107
|
delete prevChildren[c.value.outlet];
|
|
3123
3108
|
});
|
|
3124
3109
|
// Process any children left from the current route (not active for the future route)
|
|
3125
|
-
|
|
3110
|
+
Object.entries(prevChildren)
|
|
3111
|
+
.forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));
|
|
3126
3112
|
return checks;
|
|
3127
3113
|
}
|
|
3128
3114
|
function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {
|
|
@@ -3194,7 +3180,7 @@ function shouldRunGuardsAndResolvers(curr, future, mode) {
|
|
|
3194
3180
|
function deactivateRouteAndItsChildren(route, context, checks) {
|
|
3195
3181
|
const children = nodeChildrenAsMap(route);
|
|
3196
3182
|
const r = route.value;
|
|
3197
|
-
forEach(
|
|
3183
|
+
Object.entries(children).forEach(([childName, node]) => {
|
|
3198
3184
|
if (!r.component) {
|
|
3199
3185
|
deactivateRouteAndItsChildren(node, context, checks);
|
|
3200
3186
|
}
|
|
@@ -3451,7 +3437,7 @@ function matchWithChecks(segmentGroup, route, segments, injector, urlSerializer)
|
|
|
3451
3437
|
.pipe(map((v) => v === true ? result : Object.assign({}, noMatch$1)));
|
|
3452
3438
|
}
|
|
3453
3439
|
function match(segmentGroup, route, segments) {
|
|
3454
|
-
var _a;
|
|
3440
|
+
var _a, _b;
|
|
3455
3441
|
if (route.path === '') {
|
|
3456
3442
|
if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
|
|
3457
3443
|
return Object.assign({}, noMatch$1);
|
|
@@ -3469,7 +3455,7 @@ function match(segmentGroup, route, segments) {
|
|
|
3469
3455
|
if (!res)
|
|
3470
3456
|
return Object.assign({}, noMatch$1);
|
|
3471
3457
|
const posParams = {};
|
|
3472
|
-
|
|
3458
|
+
Object.entries((_a = res.posParams) !== null && _a !== void 0 ? _a : {}).forEach(([k, v]) => {
|
|
3473
3459
|
posParams[k] = v.path;
|
|
3474
3460
|
});
|
|
3475
3461
|
const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) :
|
|
@@ -3480,7 +3466,7 @@ function match(segmentGroup, route, segments) {
|
|
|
3480
3466
|
remainingSegments: segments.slice(res.consumed.length),
|
|
3481
3467
|
// TODO(atscott): investigate combining parameters and positionalParamSegments
|
|
3482
3468
|
parameters,
|
|
3483
|
-
positionalParamSegments: (
|
|
3469
|
+
positionalParamSegments: (_b = res.posParams) !== null && _b !== void 0 ? _b : {}
|
|
3484
3470
|
};
|
|
3485
3471
|
}
|
|
3486
3472
|
function split(segmentGroup, consumedSegments, slicedSegments, config) {
|
|
@@ -3844,7 +3830,7 @@ class ApplyRedirects {
|
|
|
3844
3830
|
}
|
|
3845
3831
|
createQueryParams(redirectToParams, actualParams) {
|
|
3846
3832
|
const res = {};
|
|
3847
|
-
forEach(
|
|
3833
|
+
Object.entries(redirectToParams).forEach(([k, v]) => {
|
|
3848
3834
|
const copySourceValue = typeof v === 'string' && v.startsWith(':');
|
|
3849
3835
|
if (copySourceValue) {
|
|
3850
3836
|
const sourceName = v.substring(1);
|
|
@@ -3859,7 +3845,7 @@ class ApplyRedirects {
|
|
|
3859
3845
|
createSegmentGroup(redirectTo, group, segments, posParams) {
|
|
3860
3846
|
const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);
|
|
3861
3847
|
let children = {};
|
|
3862
|
-
|
|
3848
|
+
Object.entries(group.children).forEach(([name, child]) => {
|
|
3863
3849
|
children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);
|
|
3864
3850
|
});
|
|
3865
3851
|
return new UrlSegmentGroup(updatedSegments, children);
|
|
@@ -4334,7 +4320,7 @@ class RouterConfigLoader {
|
|
|
4334
4320
|
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
4335
4321
|
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
4336
4322
|
// for it's parent module instead.
|
|
4337
|
-
rawRoutes =
|
|
4323
|
+
rawRoutes = injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional).flat();
|
|
4338
4324
|
}
|
|
4339
4325
|
const routes = rawRoutes.map(standardizeConfig);
|
|
4340
4326
|
NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);
|
|
@@ -4364,9 +4350,9 @@ class RouterConfigLoader {
|
|
|
4364
4350
|
}));
|
|
4365
4351
|
}
|
|
4366
4352
|
}
|
|
4367
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4368
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4353
|
+
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 });
|
|
4354
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4370
4356
|
type: Injectable,
|
|
4371
4357
|
args: [{ providedIn: 'root' }]
|
|
4372
4358
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -4739,9 +4725,9 @@ class NavigationTransitions {
|
|
|
4739
4725
|
t.resolve(false);
|
|
4740
4726
|
}
|
|
4741
4727
|
}
|
|
4742
|
-
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4743
|
-
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4728
|
+
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4729
|
+
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
4730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4745
4731
|
type: Injectable,
|
|
4746
4732
|
args: [{ providedIn: 'root' }]
|
|
4747
4733
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4794,9 +4780,9 @@ class TitleStrategy {
|
|
|
4794
4780
|
return snapshot.data[RouteTitleKey];
|
|
4795
4781
|
}
|
|
4796
4782
|
}
|
|
4797
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4798
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4799
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4783
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4784
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4800
4786
|
type: Injectable,
|
|
4801
4787
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4802
4788
|
}] });
|
|
@@ -4820,9 +4806,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4820
4806
|
}
|
|
4821
4807
|
}
|
|
4822
4808
|
}
|
|
4823
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4824
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4809
|
+
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 });
|
|
4810
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4826
4812
|
type: Injectable,
|
|
4827
4813
|
args: [{ providedIn: 'root' }]
|
|
4828
4814
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4836,9 +4822,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
|
|
|
4836
4822
|
*/
|
|
4837
4823
|
class RouteReuseStrategy {
|
|
4838
4824
|
}
|
|
4839
|
-
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4840
|
-
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4841
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4825
|
+
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4826
|
+
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
4827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4842
4828
|
type: Injectable,
|
|
4843
4829
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4844
4830
|
}] });
|
|
@@ -4890,9 +4876,9 @@ class BaseRouteReuseStrategy {
|
|
|
4890
4876
|
}
|
|
4891
4877
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4892
4878
|
}
|
|
4893
|
-
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4894
|
-
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4879
|
+
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4880
|
+
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
4881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4896
4882
|
type: Injectable,
|
|
4897
4883
|
args: [{ providedIn: 'root' }]
|
|
4898
4884
|
}] });
|
|
@@ -4917,9 +4903,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
|
|
|
4917
4903
|
*/
|
|
4918
4904
|
class UrlHandlingStrategy {
|
|
4919
4905
|
}
|
|
4920
|
-
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4921
|
-
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4906
|
+
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4907
|
+
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
4908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4923
4909
|
type: Injectable,
|
|
4924
4910
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4925
4911
|
}] });
|
|
@@ -4937,9 +4923,9 @@ class DefaultUrlHandlingStrategy {
|
|
|
4937
4923
|
return newUrlPart;
|
|
4938
4924
|
}
|
|
4939
4925
|
}
|
|
4940
|
-
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4941
|
-
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4926
|
+
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4927
|
+
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
4928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4943
4929
|
type: Injectable,
|
|
4944
4930
|
args: [{ providedIn: 'root' }]
|
|
4945
4931
|
}] });
|
|
@@ -5009,7 +4995,7 @@ class Router {
|
|
|
5009
4995
|
return this.navigationTransitions.events;
|
|
5010
4996
|
}
|
|
5011
4997
|
constructor() {
|
|
5012
|
-
var _a;
|
|
4998
|
+
var _a, _b;
|
|
5013
4999
|
this.disposed = false;
|
|
5014
5000
|
/**
|
|
5015
5001
|
* The id of the currently active page in the router.
|
|
@@ -5137,7 +5123,7 @@ class Router {
|
|
|
5137
5123
|
* @see `RouterModule`
|
|
5138
5124
|
*/
|
|
5139
5125
|
this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
|
|
5140
|
-
this.config =
|
|
5126
|
+
this.config = (_b = (_a = inject(ROUTES, { optional: true })) === null || _a === void 0 ? void 0 : _a.flat()) !== null && _b !== void 0 ? _b : [];
|
|
5141
5127
|
this.navigationTransitions = inject(NavigationTransitions);
|
|
5142
5128
|
this.urlSerializer = inject(UrlSerializer);
|
|
5143
5129
|
this.location = inject(Location);
|
|
@@ -5234,6 +5220,13 @@ class Router {
|
|
|
5234
5220
|
getCurrentNavigation() {
|
|
5235
5221
|
return this.navigationTransitions.currentNavigation;
|
|
5236
5222
|
}
|
|
5223
|
+
/**
|
|
5224
|
+
* The `Navigation` object of the most recent navigation to succeed and `null` if there
|
|
5225
|
+
* has not been a successful navigation yet.
|
|
5226
|
+
*/
|
|
5227
|
+
get lastSuccessfulNavigation() {
|
|
5228
|
+
return this.navigationTransitions.lastSuccessfulNavigation;
|
|
5229
|
+
}
|
|
5237
5230
|
/**
|
|
5238
5231
|
* Resets the route configuration used for navigation and generating links.
|
|
5239
5232
|
*
|
|
@@ -5590,9 +5583,9 @@ class Router {
|
|
|
5590
5583
|
return { navigationId };
|
|
5591
5584
|
}
|
|
5592
5585
|
}
|
|
5593
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5594
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5586
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5587
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: Router, decorators: [{
|
|
5596
5589
|
type: Injectable,
|
|
5597
5590
|
args: [{ providedIn: 'root' }]
|
|
5598
5591
|
}], ctorParameters: function () { return []; } });
|
|
@@ -5881,9 +5874,9 @@ class RouterLink {
|
|
|
5881
5874
|
});
|
|
5882
5875
|
}
|
|
5883
5876
|
}
|
|
5884
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5885
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
5886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5877
|
+
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 });
|
|
5878
|
+
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 });
|
|
5879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLink, decorators: [{
|
|
5887
5880
|
type: Directive,
|
|
5888
5881
|
args: [{
|
|
5889
5882
|
selector: '[routerLink]',
|
|
@@ -6108,9 +6101,9 @@ class RouterLinkActive {
|
|
|
6108
6101
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6109
6102
|
}
|
|
6110
6103
|
}
|
|
6111
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6112
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
6113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6104
|
+
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 });
|
|
6105
|
+
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 });
|
|
6106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6114
6107
|
type: Directive,
|
|
6115
6108
|
args: [{
|
|
6116
6109
|
selector: '[routerLinkActive]',
|
|
@@ -6165,9 +6158,9 @@ class PreloadAllModules {
|
|
|
6165
6158
|
return fn().pipe(catchError(() => of(null)));
|
|
6166
6159
|
}
|
|
6167
6160
|
}
|
|
6168
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6169
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6161
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6162
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6171
6164
|
type: Injectable,
|
|
6172
6165
|
args: [{ providedIn: 'root' }]
|
|
6173
6166
|
}] });
|
|
@@ -6185,9 +6178,9 @@ class NoPreloading {
|
|
|
6185
6178
|
return of(null);
|
|
6186
6179
|
}
|
|
6187
6180
|
}
|
|
6188
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6189
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6181
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6182
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6191
6184
|
type: Injectable,
|
|
6192
6185
|
args: [{ providedIn: 'root' }]
|
|
6193
6186
|
}] });
|
|
@@ -6283,9 +6276,9 @@ class RouterPreloader {
|
|
|
6283
6276
|
});
|
|
6284
6277
|
}
|
|
6285
6278
|
}
|
|
6286
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6287
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6279
|
+
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 });
|
|
6280
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6289
6282
|
type: Injectable,
|
|
6290
6283
|
args: [{ providedIn: 'root' }]
|
|
6291
6284
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6380,9 +6373,9 @@ class RouterScroller {
|
|
|
6380
6373
|
(_b = this.scrollEventsSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
6381
6374
|
}
|
|
6382
6375
|
}
|
|
6383
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6384
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6376
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6377
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller });
|
|
6378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6386
6379
|
type: Injectable
|
|
6387
6380
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6388
6381
|
|
|
@@ -6991,10 +6984,10 @@ class RouterModule {
|
|
|
6991
6984
|
};
|
|
6992
6985
|
}
|
|
6993
6986
|
}
|
|
6994
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6995
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
6996
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6987
|
+
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 });
|
|
6988
|
+
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] });
|
|
6989
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
6990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: RouterModule, decorators: [{
|
|
6998
6991
|
type: NgModule,
|
|
6999
6992
|
args: [{
|
|
7000
6993
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7072,6 +7065,67 @@ function provideRouterInitializer() {
|
|
|
7072
7065
|
];
|
|
7073
7066
|
}
|
|
7074
7067
|
|
|
7068
|
+
/**
|
|
7069
|
+
* Maps an array of injectable classes with canMatch functions to an array of equivalent
|
|
7070
|
+
* `CanMatchFn` for use in a `Route` definition.
|
|
7071
|
+
*
|
|
7072
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7073
|
+
*
|
|
7074
|
+
* @publicApi
|
|
7075
|
+
* @see Route
|
|
7076
|
+
*/
|
|
7077
|
+
function mapToCanMatch(providers) {
|
|
7078
|
+
return providers.map(provider => (...params) => inject(provider).canMatch(...params));
|
|
7079
|
+
}
|
|
7080
|
+
/**
|
|
7081
|
+
* Maps an array of injectable classes with canActivate functions to an array of equivalent
|
|
7082
|
+
* `CanActivateFn` for use in a `Route` definition.
|
|
7083
|
+
*
|
|
7084
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7085
|
+
*
|
|
7086
|
+
* @publicApi
|
|
7087
|
+
* @see Route
|
|
7088
|
+
*/
|
|
7089
|
+
function mapToCanActivate(providers) {
|
|
7090
|
+
return providers.map(provider => (...params) => inject(provider).canActivate(...params));
|
|
7091
|
+
}
|
|
7092
|
+
/**
|
|
7093
|
+
* Maps an array of injectable classes with canActivateChild functions to an array of equivalent
|
|
7094
|
+
* `CanActivateChildFn` for use in a `Route` definition.
|
|
7095
|
+
*
|
|
7096
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7097
|
+
*
|
|
7098
|
+
* @publicApi
|
|
7099
|
+
* @see Route
|
|
7100
|
+
*/
|
|
7101
|
+
function mapToCanActivateChild(providers) {
|
|
7102
|
+
return providers.map(provider => (...params) => inject(provider).canActivateChild(...params));
|
|
7103
|
+
}
|
|
7104
|
+
/**
|
|
7105
|
+
* Maps an array of injectable classes with canDeactivate functions to an array of equivalent
|
|
7106
|
+
* `CanDeactivateFn` for use in a `Route` definition.
|
|
7107
|
+
*
|
|
7108
|
+
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
|
|
7109
|
+
*
|
|
7110
|
+
* @publicApi
|
|
7111
|
+
* @see Route
|
|
7112
|
+
*/
|
|
7113
|
+
function mapToCanDeactivate(providers) {
|
|
7114
|
+
return providers.map(provider => (...params) => inject(provider).canDeactivate(...params));
|
|
7115
|
+
}
|
|
7116
|
+
/**
|
|
7117
|
+
* Maps an injectable class with a resolve function to an equivalent `ResolveFn`
|
|
7118
|
+
* for use in a `Route` definition.
|
|
7119
|
+
*
|
|
7120
|
+
* Usage {@example router/utils/functional_guards.ts region='Resolve'}
|
|
7121
|
+
*
|
|
7122
|
+
* @publicApi
|
|
7123
|
+
* @see Route
|
|
7124
|
+
*/
|
|
7125
|
+
function mapToResolve(provider) {
|
|
7126
|
+
return (...params) => inject(provider).resolve(...params);
|
|
7127
|
+
}
|
|
7128
|
+
|
|
7075
7129
|
/**
|
|
7076
7130
|
* @module
|
|
7077
7131
|
* @description
|
|
@@ -7080,7 +7134,7 @@ function provideRouterInitializer() {
|
|
|
7080
7134
|
/**
|
|
7081
7135
|
* @publicApi
|
|
7082
7136
|
*/
|
|
7083
|
-
const VERSION = new Version('16.0.0-next.
|
|
7137
|
+
const VERSION = new Version('16.0.0-next.2');
|
|
7084
7138
|
|
|
7085
7139
|
/**
|
|
7086
7140
|
* @module
|
|
@@ -7095,5 +7149,5 @@ const VERSION = new Version('16.0.0-next.0');
|
|
|
7095
7149
|
* Generated bundle index. Do not edit.
|
|
7096
7150
|
*/
|
|
7097
7151
|
|
|
7098
|
-
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,
|
|
7152
|
+
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 };
|
|
7099
7153
|
//# sourceMappingURL=router.mjs.map
|