@ngrdt/router 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngrdt-router.mjs +129 -103
- package/fesm2022/ngrdt-router.mjs.map +1 -1
- package/index.d.ts +109 -101
- package/package.json +4 -4
|
@@ -38,6 +38,9 @@ class RdtParameters extends RdtReadonlyParameters {
|
|
|
38
38
|
this.params[route.absolutePath] = params;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
function ALWAYS_TRUE() {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
41
44
|
|
|
42
45
|
const RDT_ROUTES_PROVIDER = new InjectionToken('RDT_ROUTES_PROVIDER');
|
|
43
46
|
|
|
@@ -183,10 +186,10 @@ class RdtRouterService {
|
|
|
183
186
|
const regex = new RegExp(`[?&](${paramNames.join('|')})=[^&]*`, 'g');
|
|
184
187
|
return history.replaceState(history.state, '', location.pathname + location.search.replace(regex, '').replace(/^&/, '?'));
|
|
185
188
|
}
|
|
186
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
187
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
190
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtRouterService, providedIn: 'root' });
|
|
188
191
|
}
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtRouterService, decorators: [{
|
|
190
193
|
type: Injectable,
|
|
191
194
|
args: [{
|
|
192
195
|
providedIn: 'root',
|
|
@@ -202,6 +205,7 @@ class RdtAngularRoute {
|
|
|
202
205
|
route;
|
|
203
206
|
children = [];
|
|
204
207
|
// Must be set from component declaration files
|
|
208
|
+
loadComponent;
|
|
205
209
|
loadChildren;
|
|
206
210
|
component;
|
|
207
211
|
providers = [];
|
|
@@ -218,6 +222,10 @@ class RdtAngularRoute {
|
|
|
218
222
|
this.providers.push(...providers);
|
|
219
223
|
return this;
|
|
220
224
|
}
|
|
225
|
+
withLazyComponent(callback) {
|
|
226
|
+
this.loadComponent = callback;
|
|
227
|
+
return this;
|
|
228
|
+
}
|
|
221
229
|
withModule(callback) {
|
|
222
230
|
this.loadChildren = callback;
|
|
223
231
|
return this;
|
|
@@ -289,6 +297,9 @@ class RdtAngularRoute {
|
|
|
289
297
|
else if (this.loadChildren) {
|
|
290
298
|
res.loadChildren = this.loadChildren;
|
|
291
299
|
}
|
|
300
|
+
else if (this.loadComponent) {
|
|
301
|
+
res.loadComponent = this.loadComponent;
|
|
302
|
+
}
|
|
292
303
|
res.data = this.data ?? {
|
|
293
304
|
breadcrumb: {
|
|
294
305
|
label: this.route.name,
|
|
@@ -341,7 +352,7 @@ class RdtAngularRoute {
|
|
|
341
352
|
// ]
|
|
342
353
|
// }
|
|
343
354
|
if (this.children.length > 0) {
|
|
344
|
-
if (this.loadChildren || this.component) {
|
|
355
|
+
if (this.loadChildren || this.component || this.loadComponent) {
|
|
345
356
|
const path = res.path;
|
|
346
357
|
res.path = '';
|
|
347
358
|
res.pathMatch = 'full';
|
|
@@ -414,26 +425,40 @@ class RdtAngularRoute {
|
|
|
414
425
|
}
|
|
415
426
|
}
|
|
416
427
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
class RdtRoute {
|
|
421
|
-
orderedParams = [];
|
|
428
|
+
class RdtRouteBase {
|
|
429
|
+
_orderedParams = [];
|
|
422
430
|
_paramMap = {};
|
|
423
431
|
_regex = null;
|
|
424
|
-
|
|
425
|
-
_staticParams = {};
|
|
426
|
-
_queryParams = {};
|
|
427
|
-
_stateParams = {};
|
|
428
|
-
_data = {};
|
|
432
|
+
_paramMappings = [];
|
|
429
433
|
_name;
|
|
430
434
|
_path;
|
|
431
435
|
_parent = null;
|
|
432
436
|
_children = [];
|
|
433
437
|
_entryDisabled = false;
|
|
434
438
|
_canBeEntered = ALWAYS_TRUE;
|
|
435
|
-
|
|
436
|
-
|
|
439
|
+
_data = {};
|
|
440
|
+
/**
|
|
441
|
+
* Data that is passed to Angular route definition.
|
|
442
|
+
*/
|
|
443
|
+
get data() {
|
|
444
|
+
return this._data;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Regular expression route path relative to parent route.
|
|
448
|
+
* Hostname excluded.
|
|
449
|
+
*/
|
|
450
|
+
get regex() {
|
|
451
|
+
return this._regex;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Denotes disabled route entry.
|
|
455
|
+
* If true, route should have no NgModule
|
|
456
|
+
* or component and only serves as virtual module
|
|
457
|
+
* for breadcrumb.
|
|
458
|
+
*/
|
|
459
|
+
get entryDisabled() {
|
|
460
|
+
return this._entryDisabled;
|
|
461
|
+
}
|
|
437
462
|
/**
|
|
438
463
|
* Map of parameters and their types.
|
|
439
464
|
*/
|
|
@@ -464,6 +489,13 @@ class RdtRoute {
|
|
|
464
489
|
get children() {
|
|
465
490
|
return this._children;
|
|
466
491
|
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
class RdtRoute extends RdtRouteBase {
|
|
495
|
+
_absoluteRegex;
|
|
496
|
+
_staticParams = {};
|
|
497
|
+
_queryParams = {};
|
|
498
|
+
_stateParams = {};
|
|
467
499
|
/**
|
|
468
500
|
* Absolute path of parent route or '/' if there is no parent.
|
|
469
501
|
* Hostname excluded.
|
|
@@ -477,13 +509,6 @@ class RdtRoute {
|
|
|
477
509
|
get absolutePath() {
|
|
478
510
|
return RdtStringUtils.joinPaths(this.basePath, this._path);
|
|
479
511
|
}
|
|
480
|
-
/**
|
|
481
|
-
* Regular expression route path relative to parent route.
|
|
482
|
-
* Hostname excluded.
|
|
483
|
-
*/
|
|
484
|
-
get regex() {
|
|
485
|
-
return this._regex;
|
|
486
|
-
}
|
|
487
512
|
/**
|
|
488
513
|
* Regular expression to match only this route (not children
|
|
489
514
|
* or parent routes). Hostname excluded.
|
|
@@ -508,15 +533,6 @@ class RdtRoute {
|
|
|
508
533
|
}
|
|
509
534
|
return this._absoluteRegex;
|
|
510
535
|
}
|
|
511
|
-
/**
|
|
512
|
-
* Denotes disabled route entry.
|
|
513
|
-
* If true, route should have no NgModule
|
|
514
|
-
* or component and only serves as virtual module
|
|
515
|
-
* for breadcrumb.
|
|
516
|
-
*/
|
|
517
|
-
get entryDisabled() {
|
|
518
|
-
return this._entryDisabled;
|
|
519
|
-
}
|
|
520
536
|
/**
|
|
521
537
|
* Statically set state params used when navigating to this instance.
|
|
522
538
|
*/
|
|
@@ -545,12 +561,6 @@ class RdtRoute {
|
|
|
545
561
|
get hasCanBeEnteredGuard() {
|
|
546
562
|
return this._canBeEntered !== ALWAYS_TRUE;
|
|
547
563
|
}
|
|
548
|
-
/**
|
|
549
|
-
* Data that is passed to Angular route definition.
|
|
550
|
-
*/
|
|
551
|
-
get data() {
|
|
552
|
-
return this._data;
|
|
553
|
-
}
|
|
554
564
|
/**
|
|
555
565
|
* Meta guard that is used by [rdtRouterLink] and RdtMenu
|
|
556
566
|
* to determine if route can be entered.
|
|
@@ -587,10 +597,10 @@ class RdtRoute {
|
|
|
587
597
|
}
|
|
588
598
|
fill(values, res = {}) {
|
|
589
599
|
const params = {};
|
|
590
|
-
const reversedParams = this.
|
|
600
|
+
const reversedParams = this._orderedParams.slice().reverse();
|
|
591
601
|
for (let i = 0; i < reversedParams.length && i < values.length; i++) {
|
|
592
602
|
const key = reversedParams[i];
|
|
593
|
-
const mappedKey = this.
|
|
603
|
+
const mappedKey = this._paramMappings.find((m) => m.urlName === key)?.tableName ?? key;
|
|
594
604
|
let val = values[i];
|
|
595
605
|
if (this._paramMap[key] === 'number') {
|
|
596
606
|
val = parseInt(val);
|
|
@@ -624,7 +634,7 @@ class RdtRoute {
|
|
|
624
634
|
const paramNames = Object.keys(this._paramMap);
|
|
625
635
|
paramNames.sort((a, b) => b.length - a.length);
|
|
626
636
|
const extendedParamMap = { ...paramMap };
|
|
627
|
-
this.
|
|
637
|
+
this._paramMappings.forEach((mapping) => {
|
|
628
638
|
if (mapping.tableName in paramMap) {
|
|
629
639
|
extendedParamMap[mapping.urlName] = paramMap[mapping.tableName];
|
|
630
640
|
}
|
|
@@ -639,9 +649,6 @@ class RdtRoute {
|
|
|
639
649
|
return path;
|
|
640
650
|
}
|
|
641
651
|
toAngularRoute() {
|
|
642
|
-
if (!this._built) {
|
|
643
|
-
throw new Error('You have to first call .build() on route!');
|
|
644
|
-
}
|
|
645
652
|
return new RdtAngularRoute(this);
|
|
646
653
|
}
|
|
647
654
|
/**
|
|
@@ -652,7 +659,7 @@ class RdtRoute {
|
|
|
652
659
|
*/
|
|
653
660
|
withParamMappings(mappings) {
|
|
654
661
|
const clone = this.clone();
|
|
655
|
-
clone.
|
|
662
|
+
clone._paramMappings = mappings;
|
|
656
663
|
return clone;
|
|
657
664
|
}
|
|
658
665
|
/**
|
|
@@ -693,8 +700,8 @@ class RdtRoute {
|
|
|
693
700
|
*/
|
|
694
701
|
extractRouteParams(row) {
|
|
695
702
|
const res = {};
|
|
696
|
-
this.
|
|
697
|
-
const mapping = this.
|
|
703
|
+
this._orderedParams.forEach((param) => {
|
|
704
|
+
const mapping = this._paramMappings.find((m) => m.urlName === param);
|
|
698
705
|
const mappedParam = (mapping?.tableName ?? param);
|
|
699
706
|
if (mappedParam in row) {
|
|
700
707
|
res[mappedParam] = row[mappedParam];
|
|
@@ -712,18 +719,65 @@ class RdtRoute {
|
|
|
712
719
|
clone._parent = this._parent?.clone() ?? null;
|
|
713
720
|
clone._path = this.path;
|
|
714
721
|
clone._entryDisabled = this._entryDisabled;
|
|
715
|
-
clone.
|
|
722
|
+
clone._orderedParams = [...this._orderedParams];
|
|
716
723
|
clone._paramMap = { ...this._paramMap };
|
|
717
724
|
clone._regex = this._regex ? new RegExp(this._regex) : null;
|
|
718
|
-
clone.
|
|
725
|
+
clone._paramMappings = this._paramMappings;
|
|
719
726
|
clone._staticParams = { ...this._staticParams };
|
|
720
727
|
clone._stateParams = { ...this._stateParams };
|
|
721
728
|
return clone;
|
|
722
729
|
}
|
|
730
|
+
setRegex() {
|
|
731
|
+
const params = Object.keys(this._paramMap);
|
|
732
|
+
params.sort((a, b) => b.length - a.length);
|
|
733
|
+
let substituted = this.path;
|
|
734
|
+
params.forEach((p) => {
|
|
735
|
+
const type = this._paramMap[p];
|
|
736
|
+
if (!type) {
|
|
737
|
+
throw new Error('Params is not set i');
|
|
738
|
+
}
|
|
739
|
+
substituted = substituted.replace(`:${p}`, RdtRoute.groups[type]);
|
|
740
|
+
});
|
|
741
|
+
if (substituted === '') {
|
|
742
|
+
this._regex = null;
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
this._regex = new RegExp(substituted);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
static fromBuilder(builder) {
|
|
749
|
+
const route = new RdtRoute();
|
|
750
|
+
route._name = builder.name;
|
|
751
|
+
route._path = builder.path;
|
|
752
|
+
route._entryDisabled = builder.entryDisabled;
|
|
753
|
+
route._orderedParams = builder.orderedParams;
|
|
754
|
+
route._canBeEntered = builder.canBeEntered;
|
|
755
|
+
route._paramMap = builder.paramMap;
|
|
756
|
+
route._regex = builder.regex ? new RegExp(builder.regex) : null;
|
|
757
|
+
route._paramMappings = builder.paramMappings;
|
|
758
|
+
route._children = builder.children;
|
|
759
|
+
route._data = builder.data;
|
|
760
|
+
route._children.forEach((child) => (child._parent = route));
|
|
761
|
+
route.setRegex();
|
|
762
|
+
return route;
|
|
763
|
+
}
|
|
764
|
+
static groups = {
|
|
765
|
+
string: '(.+)',
|
|
766
|
+
number: '(\\d+)',
|
|
767
|
+
};
|
|
723
768
|
}
|
|
724
769
|
|
|
725
770
|
const DEFAULT_PARAM_TYPE = 'number';
|
|
726
|
-
class RdtRouteBuilder extends
|
|
771
|
+
class RdtRouteBuilder extends RdtRouteBase {
|
|
772
|
+
get canBeEntered() {
|
|
773
|
+
return this._canBeEntered;
|
|
774
|
+
}
|
|
775
|
+
get orderedParams() {
|
|
776
|
+
return this._orderedParams;
|
|
777
|
+
}
|
|
778
|
+
get paramMappings() {
|
|
779
|
+
return this._paramMappings;
|
|
780
|
+
}
|
|
727
781
|
/**
|
|
728
782
|
* CanBeEntered function is synchronous function which
|
|
729
783
|
* lets framework hide menu buttons and disable links.
|
|
@@ -776,7 +830,7 @@ class RdtRouteBuilder extends RdtRoute {
|
|
|
776
830
|
}
|
|
777
831
|
}
|
|
778
832
|
});
|
|
779
|
-
this.
|
|
833
|
+
this._orderedParams = params;
|
|
780
834
|
return this;
|
|
781
835
|
}
|
|
782
836
|
/**
|
|
@@ -832,9 +886,6 @@ class RdtRouteBuilder extends RdtRoute {
|
|
|
832
886
|
*/
|
|
833
887
|
withChildren(...children) {
|
|
834
888
|
this._children = children;
|
|
835
|
-
for (const child of children) {
|
|
836
|
-
child._parent = this;
|
|
837
|
-
}
|
|
838
889
|
return this;
|
|
839
890
|
}
|
|
840
891
|
/**
|
|
@@ -847,32 +898,8 @@ class RdtRouteBuilder extends RdtRoute {
|
|
|
847
898
|
if (typeof this._path !== 'string') {
|
|
848
899
|
throw new Error('Please provide path for route. Empty string is acceptable.');
|
|
849
900
|
}
|
|
850
|
-
this
|
|
851
|
-
this.setRegex();
|
|
852
|
-
return this;
|
|
901
|
+
return RdtRoute.fromBuilder(this);
|
|
853
902
|
}
|
|
854
|
-
setRegex() {
|
|
855
|
-
const params = Object.keys(this._paramMap);
|
|
856
|
-
params.sort((a, b) => b.length - a.length);
|
|
857
|
-
let substituted = this.path;
|
|
858
|
-
params.forEach((p) => {
|
|
859
|
-
const type = this._paramMap[p];
|
|
860
|
-
if (!type) {
|
|
861
|
-
throw new Error('Params is not set i');
|
|
862
|
-
}
|
|
863
|
-
substituted = substituted.replace(`:${p}`, RdtRouteBuilder.groups[type]);
|
|
864
|
-
});
|
|
865
|
-
if (substituted === '') {
|
|
866
|
-
this._regex = null;
|
|
867
|
-
}
|
|
868
|
-
else {
|
|
869
|
-
this._regex = new RegExp(substituted);
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
static groups = {
|
|
873
|
-
string: '(.+)',
|
|
874
|
-
number: '(\\d+)',
|
|
875
|
-
};
|
|
876
903
|
}
|
|
877
904
|
|
|
878
905
|
const EXACT_TRUE_OPTS = {
|
|
@@ -974,10 +1001,10 @@ class RdtAnyRouteActiveDirective {
|
|
|
974
1001
|
return input;
|
|
975
1002
|
}
|
|
976
1003
|
}
|
|
977
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
978
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
1004
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtAnyRouteActiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1005
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: RdtAnyRouteActiveDirective, isStandalone: true, selector: "[rdtAnyRouteActive]", inputs: { anyRouteActive: ["rdtAnyRouteActive", "anyRouteActive"], watchedRoutes: "watchedRoutes", anyRouteActiveOptions: "anyRouteActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive" }, providers: [RouterModule], usesOnChanges: true, ngImport: i0 });
|
|
979
1006
|
}
|
|
980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtAnyRouteActiveDirective, decorators: [{
|
|
981
1008
|
type: Directive,
|
|
982
1009
|
args: [{
|
|
983
1010
|
selector: '[rdtAnyRouteActive]',
|
|
@@ -1019,10 +1046,10 @@ class RdtBackLinkDirective {
|
|
|
1019
1046
|
}
|
|
1020
1047
|
});
|
|
1021
1048
|
}
|
|
1022
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1023
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
1049
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBackLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1050
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: RdtBackLinkDirective, isStandalone: true, selector: "[rdtBackLink]", ngImport: i0 });
|
|
1024
1051
|
}
|
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtBackLinkDirective, decorators: [{
|
|
1026
1053
|
type: Directive,
|
|
1027
1054
|
args: [{
|
|
1028
1055
|
selector: '[rdtBackLink]',
|
|
@@ -1038,16 +1065,15 @@ class RdtRouterLinkDirective {
|
|
|
1038
1065
|
});
|
|
1039
1066
|
routerLinkRef = inject(RouterLink, { self: true });
|
|
1040
1067
|
envInjector = inject(EnvironmentInjector);
|
|
1041
|
-
route = input.required(
|
|
1042
|
-
target = input('_self'
|
|
1043
|
-
params = input(
|
|
1044
|
-
queryParams = input(
|
|
1045
|
-
stateParams = input(
|
|
1046
|
-
disabled = input(false,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}]));
|
|
1068
|
+
route = input.required({ alias: 'rdtRouterLink' });
|
|
1069
|
+
target = input('_self');
|
|
1070
|
+
params = input();
|
|
1071
|
+
queryParams = input();
|
|
1072
|
+
stateParams = input();
|
|
1073
|
+
disabled = input(false, {
|
|
1074
|
+
alias: 'rdtDisabled',
|
|
1075
|
+
transform: booleanAttribute,
|
|
1076
|
+
});
|
|
1051
1077
|
updateEffect = effect(() => {
|
|
1052
1078
|
if (this.buttonRef) {
|
|
1053
1079
|
this.updateButton();
|
|
@@ -1055,7 +1081,7 @@ class RdtRouterLinkDirective {
|
|
|
1055
1081
|
else {
|
|
1056
1082
|
this.updateRouterLink();
|
|
1057
1083
|
}
|
|
1058
|
-
}
|
|
1084
|
+
});
|
|
1059
1085
|
updateButton() {
|
|
1060
1086
|
const route = this.route();
|
|
1061
1087
|
if (!route) {
|
|
@@ -1133,10 +1159,10 @@ class RdtRouterLinkDirective {
|
|
|
1133
1159
|
getNgHref(route) {
|
|
1134
1160
|
return route.createAbsoluteUrl(this.params());
|
|
1135
1161
|
}
|
|
1136
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1137
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
1162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtRouterLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1163
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: RdtRouterLinkDirective, isStandalone: true, selector: "[rdtRouterLink]", inputs: { route: { classPropertyName: "route", publicName: "rdtRouterLink", isSignal: true, isRequired: true, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, stateParams: { classPropertyName: "stateParams", publicName: "stateParams", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "rdtDisabled", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.RouterLink, inputs: ["target", "target"] }], ngImport: i0 });
|
|
1138
1164
|
}
|
|
1139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtRouterLinkDirective, decorators: [{
|
|
1140
1166
|
type: Directive,
|
|
1141
1167
|
args: [{
|
|
1142
1168
|
selector: '[rdtRouterLink]',
|
|
@@ -1193,10 +1219,10 @@ class GlobalRouteGuardService {
|
|
|
1193
1219
|
canDeactivateGuards.push(preventDataLossGuardFn);
|
|
1194
1220
|
}
|
|
1195
1221
|
}
|
|
1196
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1197
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
1222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GlobalRouteGuardService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1223
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GlobalRouteGuardService, providedIn: 'root' });
|
|
1198
1224
|
}
|
|
1199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GlobalRouteGuardService, decorators: [{
|
|
1200
1226
|
type: Injectable,
|
|
1201
1227
|
args: [{ providedIn: 'root' }]
|
|
1202
1228
|
}], ctorParameters: () => [{ type: i1.Router }] });
|
|
@@ -1205,5 +1231,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1205
1231
|
* Generated bundle index. Do not edit.
|
|
1206
1232
|
*/
|
|
1207
1233
|
|
|
1208
|
-
export {
|
|
1234
|
+
export { GlobalRouteGuardService, PERMISSION_DISABLED_KEY, RDT_CANNOT_BE_ENTERED_PROVIDER, RDT_CONFIRM_DATA_LOSS_SERVICE, RDT_ROUTES_PROVIDER, RdtAngularRoute, RdtAnyRouteActiveDirective, RdtBackLinkDirective, RdtConfirmDataLossService, RdtConfirmDataLossServiceAlert, RdtNavigationSource, RdtRoute, RdtRouteBuilder, RdtRouterLinkDirective, RdtRouterService, preventDataLossGuardFn };
|
|
1209
1235
|
//# sourceMappingURL=ngrdt-router.mjs.map
|