@skyux/router 12.0.0-alpha.1 → 12.0.0-alpha.10

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.
@@ -1,7 +1,49 @@
1
+ import { SkyComponentHarness } from '@skyux/core/testing';
1
2
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
3
+ import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
3
4
  import { SkyHrefModule, SkyHrefResolverService } from '@skyux/router';
4
- import { SkyComponentHarness } from '@skyux/core/testing';
5
+
6
+ /**
7
+ * Allows interaction with a SkyHref directive during testing.
8
+ */
9
+ class SkyHrefHarness extends SkyComponentHarness {
10
+ /**
11
+ * @internal
12
+ */
13
+ static { this.hostSelector = '.sky-href'; }
14
+ /**
15
+ * Gets a `HarnessPredicate` that can be used to search for a
16
+ * `SkyHrefHarness` that meets certain criteria.
17
+ */
18
+ static with(filters) {
19
+ return this.getDataSkyIdPredicate(filters);
20
+ }
21
+ /**
22
+ * Gets the href attribute of the host element.
23
+ */
24
+ async getHref() {
25
+ return await (await this.host()).getAttribute('href');
26
+ }
27
+ /**
28
+ * Gets the visible text.
29
+ */
30
+ async getText() {
31
+ return await this.isVisible().then(async (visible) => {
32
+ if (visible) {
33
+ return await (await this.host()).text();
34
+ }
35
+ return '';
36
+ });
37
+ }
38
+ /**
39
+ * Returns true if the text is visible.
40
+ */
41
+ async isVisible() {
42
+ return await (await this.host())
43
+ .matchesSelector('[hidden]')
44
+ .then((hidden) => !hidden);
45
+ }
46
+ }
5
47
 
6
48
  const MockUserHasAccess = new InjectionToken('MockUserHasAccess');
7
49
  /**
@@ -17,10 +59,10 @@ class SkyHrefResolverMockService {
17
59
  userHasAccess: this.userHasAccess,
18
60
  });
19
61
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverMockService, deps: [{ token: MockUserHasAccess }], target: i0.ɵɵFactoryTarget.Injectable }); }
21
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverMockService }); }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverMockService, deps: [{ token: MockUserHasAccess }], target: i0.ɵɵFactoryTarget.Injectable }); }
63
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverMockService }); }
22
64
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverMockService, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverMockService, decorators: [{
24
66
  type: Injectable
25
67
  }], ctorParameters: () => [{ type: undefined, decorators: [{
26
68
  type: Inject,
@@ -42,9 +84,9 @@ class SkyHrefTestingModule {
42
84
  ],
43
85
  };
44
86
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
46
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefTestingModule, exports: [SkyHrefModule] }); }
47
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefTestingModule, providers: [
87
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
88
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefTestingModule, exports: [SkyHrefModule] }); }
89
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefTestingModule, providers: [
48
90
  SkyHrefResolverMockService,
49
91
  {
50
92
  provide: SkyHrefResolverService,
@@ -56,7 +98,7 @@ class SkyHrefTestingModule {
56
98
  },
57
99
  ], imports: [SkyHrefModule] }); }
58
100
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefTestingModule, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefTestingModule, decorators: [{
60
102
  type: NgModule,
61
103
  args: [{
62
104
  exports: [SkyHrefModule],
@@ -74,45 +116,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
74
116
  }]
75
117
  }] });
76
118
 
77
- /**
78
- * Allows interaction with a SkyHref directive during testing.
79
- */
80
- class SkyHrefHarness extends SkyComponentHarness {
81
- static { this.hostSelector = '.sky-href'; }
82
- /**
83
- * Gets a `HarnessPredicate` that can be used to search for a
84
- * `SkyHrefHarness` that meets certain criteria.
85
- */
86
- static with(filters) {
87
- return this.getDataSkyIdPredicate(filters);
88
- }
89
- /**
90
- * Gets the href attribute of the host element.
91
- */
92
- async getHref() {
93
- return await (await this.host()).getAttribute('href');
94
- }
95
- /**
96
- * Gets the visible text.
97
- */
98
- async getText() {
99
- return await this.isVisible().then(async (visible) => {
100
- if (visible) {
101
- return await (await this.host()).text();
102
- }
103
- return '';
104
- });
105
- }
106
- /**
107
- * Returns true if the text is visible.
108
- */
109
- async isVisible() {
110
- return await (await this.host())
111
- .matchesSelector('[hidden]')
112
- .then((hidden) => !hidden);
113
- }
114
- }
115
-
116
119
  /**
117
120
  * Generated bundle index. Do not edit.
118
121
  */
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-router-testing.mjs","sources":["../../../../../libs/components/router/testing/src/modules/href/href-resolver-mock.service.ts","../../../../../libs/components/router/testing/src/modules/href/href-testing.module.ts","../../../../../libs/components/router/testing/src/modules/href/href-harness.ts","../../../../../libs/components/router/testing/src/skyux-router-testing.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { SkyHref, SkyHrefResolver } from '@skyux/router';\n\nexport const MockUserHasAccess = new InjectionToken<boolean>(\n 'MockUserHasAccess',\n);\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyHrefResolverMockService implements SkyHrefResolver {\n constructor(@Inject(MockUserHasAccess) private userHasAccess: boolean) {}\n\n public resolveHref(param: { url: string }): Promise<SkyHref> {\n return Promise.resolve({\n url: param.url,\n userHasAccess: this.userHasAccess,\n });\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { SkyHrefModule, SkyHrefResolverService } from '@skyux/router';\n\nimport {\n MockUserHasAccess,\n SkyHrefResolverMockService,\n} from './href-resolver-mock.service';\n\n/**\n * Testing module for the `SkyHref` directive and route resolver.\n */\n@NgModule({\n exports: [SkyHrefModule],\n providers: [\n SkyHrefResolverMockService,\n {\n provide: SkyHrefResolverService,\n useClass: SkyHrefResolverMockService,\n },\n {\n provide: MockUserHasAccess,\n useValue: true,\n },\n ],\n})\nexport class SkyHrefTestingModule {\n public static with(options: {\n userHasAccess: boolean;\n }): ModuleWithProviders<SkyHrefTestingModule> {\n return {\n ngModule: SkyHrefTestingModule,\n providers: [\n {\n provide: MockUserHasAccess,\n useValue: options.userHasAccess,\n },\n ],\n };\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyHrefHarnessFilters } from './href-harness-filters';\n\n/**\n * Allows interaction with a SkyHref directive during testing.\n */\nexport class SkyHrefHarness extends SkyComponentHarness {\n public static hostSelector = '.sky-href';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyHrefHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyHrefHarnessFilters,\n ): HarnessPredicate<SkyHrefHarness> {\n return this.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the href attribute of the host element.\n */\n public async getHref(): Promise<string | null> {\n return await (await this.host()).getAttribute('href');\n }\n\n /**\n * Gets the visible text.\n */\n public async getText(): Promise<string> {\n return await this.isVisible().then(async (visible) => {\n if (visible) {\n return await (await this.host()).text();\n }\n return '';\n });\n }\n\n /**\n * Returns true if the text is visible.\n */\n public async isVisible(): Promise<boolean> {\n return await (await this.host())\n .matchesSelector('[hidden]')\n .then((hidden) => !hidden);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB,CACpB;AAED;;AAEG;MAEU,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAA+C,aAAsB,EAAA;QAAtB,IAAa,CAAA,aAAA,GAAb,aAAa;;AAErD,IAAA,WAAW,CAAC,KAAsB,EAAA;QACvC,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,aAAa,EAAE,IAAI,CAAC,aAAa;AAClC,SAAA,CAAC;;AAPO,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,kBACjB,iBAAiB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAD1B,0BAA0B,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;0BAEc,MAAM;2BAAC,iBAAiB;;;ACJvC;;AAEG;MAeU,oBAAoB,CAAA;IACxB,OAAO,IAAI,CAAC,OAElB,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AO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;AACG,MAAO,cAAe,SAAQ,mBAAmB,CAAA;aACvC,IAAY,CAAA,YAAA,GAAG,WAAW,CAAC;AAEzC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAG5C;;AAEG;AACI,IAAA,MAAM,OAAO,GAAA;AAClB,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;;AAGvD;;AAEG;AACI,IAAA,MAAM,OAAO,GAAA;AAClB,QAAA,OAAO,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAI;YACnD,IAAI,OAAO,EAAE;gBACX,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;;AAEzC,YAAA,OAAO,EAAE;AACX,SAAC,CAAC;;AAGJ;;AAEG;AACI,IAAA,MAAM,SAAS,GAAA;AACpB,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE;aAC5B,eAAe,CAAC,UAAU;aAC1B,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC;;;;AC9ChC;;AAEG;;;;"}
1
+ {"version":3,"file":"skyux-router-testing.mjs","sources":["../../../../../libs/components/router/testing/src/modules/href/href-harness.ts","../../../../../libs/components/router/testing/src/modules/href/href-resolver-mock.service.ts","../../../../../libs/components/router/testing/src/modules/href/href-testing.module.ts","../../../../../libs/components/router/testing/src/skyux-router-testing.ts"],"sourcesContent":["import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyHrefHarnessFilters } from './href-harness-filters';\n\n/**\n * Allows interaction with a SkyHref directive during testing.\n */\nexport class SkyHrefHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = '.sky-href';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyHrefHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyHrefHarnessFilters,\n ): HarnessPredicate<SkyHrefHarness> {\n return this.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the href attribute of the host element.\n */\n public async getHref(): Promise<string | null> {\n return await (await this.host()).getAttribute('href');\n }\n\n /**\n * Gets the visible text.\n */\n public async getText(): Promise<string> {\n return await this.isVisible().then(async (visible) => {\n if (visible) {\n return await (await this.host()).text();\n }\n return '';\n });\n }\n\n /**\n * Returns true if the text is visible.\n */\n public async isVisible(): Promise<boolean> {\n return await (await this.host())\n .matchesSelector('[hidden]')\n .then((hidden) => !hidden);\n }\n}\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { SkyHref, SkyHrefResolver } from '@skyux/router';\n\nexport const MockUserHasAccess = new InjectionToken<boolean>(\n 'MockUserHasAccess',\n);\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyHrefResolverMockService implements SkyHrefResolver {\n constructor(@Inject(MockUserHasAccess) private userHasAccess: boolean) {}\n\n public resolveHref(param: { url: string }): Promise<SkyHref> {\n return Promise.resolve({\n url: param.url,\n userHasAccess: this.userHasAccess,\n });\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { SkyHrefModule, SkyHrefResolverService } from '@skyux/router';\n\nimport {\n MockUserHasAccess,\n SkyHrefResolverMockService,\n} from './href-resolver-mock.service';\n\n/**\n * Testing module for the `SkyHref` directive and route resolver.\n */\n@NgModule({\n exports: [SkyHrefModule],\n providers: [\n SkyHrefResolverMockService,\n {\n provide: SkyHrefResolverService,\n useClass: SkyHrefResolverMockService,\n },\n {\n provide: MockUserHasAccess,\n useValue: true,\n },\n ],\n})\nexport class SkyHrefTestingModule {\n public static with(options: {\n userHasAccess: boolean;\n }): ModuleWithProviders<SkyHrefTestingModule> {\n return {\n ngModule: SkyHrefTestingModule,\n providers: [\n {\n provide: MockUserHasAccess,\n useValue: options.userHasAccess,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA;;AAEG;AACG,MAAO,cAAe,SAAQ,mBAAmB,CAAA;AACrD;;AAEG;aACW,IAAY,CAAA,YAAA,GAAG,WAAW,CAAC;AAEzC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAG5C;;AAEG;AACI,IAAA,MAAM,OAAO,GAAA;AAClB,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;;AAGvD;;AAEG;AACI,IAAA,MAAM,OAAO,GAAA;AAClB,QAAA,OAAO,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAI;YACnD,IAAI,OAAO,EAAE;gBACX,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;;AAEzC,YAAA,OAAO,EAAE;AACX,SAAC,CAAC;;AAGJ;;AAEG;AACI,IAAA,MAAM,SAAS,GAAA;AACpB,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE;aAC5B,eAAe,CAAC,UAAU;aAC1B,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC;;;;AC9CzB,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB,CACpB;AAED;;AAEG;MAEU,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAA+C,aAAsB,EAAA;QAAtB,IAAa,CAAA,aAAA,GAAb,aAAa;;AAErD,IAAA,WAAW,CAAC,KAAsB,EAAA;QACvC,OAAO,OAAO,CAAC,OAAO,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A0B;AAC1B,YAAA;AACE,gBAAA,OAAO,EAAE,sBAAsB;AAC/B,gBAAA,QAAQ,EAAE,0BAA0B;AACrC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CAXS,aAAa,CAAA,EAAA,CAAA,CAAA;;2FAaZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE;wBACT,0BAA0B;AAC1B,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,QAAQ,EAAE,0BAA0B;AACrC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -1,11 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Optional, Input, NgModule, Injectable, EventEmitter, Output, HostListener } from '@angular/core';
2
+ import { Input, Optional, Directive, NgModule, Injectable, EventEmitter, inject, Renderer2, ElementRef, ApplicationRef, ChangeDetectorRef, DestroyRef, HostListener, Output } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { PathLocationStrategy } from '@angular/common';
5
5
  import * as i1 from '@angular/router';
6
- import { RouterLink } from '@angular/router';
6
+ import { RouterLink, Router } from '@angular/router';
7
7
  import * as i3 from '@skyux/core';
8
8
  import * as i4 from '@skyux/config';
9
+ import { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';
10
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
+ import { from, catchError, of, finalize } from 'rxjs';
9
12
 
10
13
  /**
11
14
  * @deprecated Use `skyHref` directive instead.
@@ -40,10 +43,10 @@ class SkyAppLinkExternalDirective extends RouterLink {
40
43
  : this.#paramsProvider?.params.getAll();
41
44
  return Object.assign({}, this.queryParams, queryParams, skyuxParams);
42
45
  }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkExternalDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2.PlatformLocation }, { token: i3.SkyAppWindowRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: i4.SkyAppConfigHost, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
44
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: SkyAppLinkExternalDirective, isStandalone: false, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkExternalDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2.PlatformLocation }, { token: i3.SkyAppWindowRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: i4.SkyAppConfigHost, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
47
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: SkyAppLinkExternalDirective, isStandalone: false, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
45
48
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
47
50
  type: Directive,
48
51
  args: [{
49
52
  selector: '[skyAppLinkExternal]',
@@ -80,10 +83,10 @@ class SkyAppLinkDirective extends RouterLink {
80
83
  : this.#paramsProvider?.params.getAll(true);
81
84
  return Object.assign({}, this.queryParams, queryParams, skyuxParams);
82
85
  }
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.LocationStrategy }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
84
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: SkyAppLinkDirective, isStandalone: false, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.LocationStrategy }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
87
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: SkyAppLinkDirective, isStandalone: false, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
85
88
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
87
90
  type: Directive,
88
91
  args: [{
89
92
  selector: '[skyAppLink]',
@@ -99,11 +102,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
99
102
 
100
103
  /* istanbul ignore next */
101
104
  class SkyAppLinkModule {
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
103
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] }); }
104
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkModule }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
106
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] }); }
107
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkModule }); }
105
108
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkModule, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyAppLinkModule, decorators: [{
107
110
  type: NgModule,
108
111
  args: [{
109
112
  declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],
@@ -121,14 +124,55 @@ class SkyHrefResolverService {
121
124
  userHasAccess: true,
122
125
  });
123
126
  }
124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
125
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverService }); }
127
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
128
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverService }); }
126
129
  }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefResolverService, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefResolverService, decorators: [{
128
131
  type: Injectable
129
132
  }] });
130
133
 
131
134
  class SkyHrefDirective {
135
+ constructor() {
136
+ /**
137
+ * Emits whether the link is available (true) or not (false).
138
+ */
139
+ this.skyHrefChange = new EventEmitter();
140
+ this.#route = false;
141
+ this.#href = '';
142
+ this.#_skyHref = '';
143
+ this.#_skyHrefElse = 'hide';
144
+ this.#router = inject(Router);
145
+ this.#renderer = inject(Renderer2);
146
+ this.#element = inject(ElementRef);
147
+ this.#skyAppConfig = inject(SkyAppConfig, { optional: true });
148
+ this.#paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {
149
+ optional: true,
150
+ });
151
+ this.#hrefResolver = inject(SkyHrefResolverService, { optional: true });
152
+ this.#applicationRef = inject(ApplicationRef);
153
+ this.#changeDetectorRef = inject(ChangeDetectorRef);
154
+ this.#destroyRef = inject(DestroyRef);
155
+ /* istanbul ignore next */
156
+ this.#getUrlTree = () => {
157
+ const href = this.#href.toLowerCase();
158
+ if (!href ||
159
+ !this.#skyAppConfig?.skyux.host?.url ||
160
+ !this.#skyAppConfig?.runtime?.app?.base) {
161
+ return false;
162
+ }
163
+ const baseUrl = (this.#skyAppConfig.skyux.host.url +
164
+ this.#skyAppConfig.runtime.app.base.substr(0, this.#skyAppConfig.runtime.app.base.length - 1)).toLowerCase();
165
+ if (href === baseUrl ||
166
+ // Make sure the base URL is not simply a partial match of the base URL plus additional
167
+ // characters after the base URL that are not "terminating" characters
168
+ href.indexOf(baseUrl + '/') === 0 ||
169
+ href.indexOf(baseUrl + '?') === 0) {
170
+ const routePath = this.#href.substring(baseUrl.length);
171
+ return this.#router.parseUrl(routePath);
172
+ }
173
+ return false;
174
+ };
175
+ }
132
176
  /**
133
177
  * Provide a link as a string or as an array of strings to be joined by a slash to form a complete
134
178
  * URL.
@@ -142,7 +186,7 @@ class SkyHrefDirective {
142
186
  else {
143
187
  this.#_skyHref = skyHref ? skyHref.join('/') : '';
144
188
  }
145
- void this.#checkRouteAccess();
189
+ this.#checkRouteAccess();
146
190
  }
147
191
  get skyHref() {
148
192
  return this.#_skyHref;
@@ -184,44 +228,8 @@ class SkyHrefDirective {
184
228
  #hrefResolver;
185
229
  #applicationRef;
186
230
  #changeDetectorRef;
187
- constructor(router, renderer, element, skyAppConfig, paramsProvider, hrefResolver, applicationRef, changeDetectorRef) {
188
- /**
189
- * Emits whether the link is available (true) or not (false).
190
- */
191
- this.skyHrefChange = new EventEmitter();
192
- this.#route = false;
193
- this.#href = '';
194
- this.#_skyHref = '';
195
- this.#_skyHrefElse = 'hide';
196
- /* istanbul ignore next */
197
- this.#getUrlTree = () => {
198
- const href = this.#href.toLowerCase();
199
- if (!href ||
200
- !this.#skyAppConfig?.skyux.host?.url ||
201
- !this.#skyAppConfig?.runtime?.app?.base) {
202
- return false;
203
- }
204
- const baseUrl = (this.#skyAppConfig.skyux.host.url +
205
- this.#skyAppConfig.runtime.app.base.substr(0, this.#skyAppConfig.runtime.app.base.length - 1)).toLowerCase();
206
- if (href === baseUrl ||
207
- // Make sure the base URL is not simply a partial match of the base URL plus additional
208
- // characters after the base URL that are not "terminating" characters
209
- href.indexOf(baseUrl + '/') === 0 ||
210
- href.indexOf(baseUrl + '?') === 0) {
211
- const routePath = this.#href.substring(baseUrl.length);
212
- return this.#router.parseUrl(routePath);
213
- }
214
- return false;
215
- };
216
- this.#router = router;
217
- this.#renderer = renderer;
218
- this.#element = element;
219
- this.#skyAppConfig = skyAppConfig;
220
- this.#paramsProvider = paramsProvider;
221
- this.#hrefResolver = hrefResolver;
222
- this.#applicationRef = applicationRef;
223
- this.#changeDetectorRef = changeDetectorRef;
224
- }
231
+ #destroyRef;
232
+ #checkingSubscription;
225
233
  onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
226
234
  if (!this.#route || !this.#route.userHasAccess) {
227
235
  return false;
@@ -256,28 +264,30 @@ class SkyHrefDirective {
256
264
  }
257
265
  this.skyHrefChange.emit({ userHasAccess: !change.hidden });
258
266
  }
259
- async #checkRouteAccess() {
267
+ #checkRouteAccess() {
260
268
  this.#route = {
261
269
  url: this.skyHref,
262
270
  userHasAccess: false,
263
271
  };
264
- /* istanbul ignore else */
265
272
  if (this.#hrefResolver && this.skyHref) {
266
273
  this.#applyChanges(this.#getChanges());
274
+ this.#checkingSubscription?.unsubscribe();
267
275
  try {
268
- const route = await this.#hrefResolver.resolveHref({
276
+ this.#checkingSubscription = from(this.#hrefResolver.resolveHref({ url: this.skyHref }))
277
+ .pipe(catchError(() => of({
269
278
  url: this.skyHref,
270
- });
271
- this.#route = { ...route };
272
- this.#applyChanges(this.#getChanges());
273
- /* istanbul ignore else */
274
- if (this.#changeDetectorRef && this.#applicationRef) {
279
+ userHasAccess: false,
280
+ })), takeUntilDestroyed(this.#destroyRef), finalize(() => {
281
+ this.#applyChanges(this.#getChanges());
282
+ }))
283
+ .subscribe((route) => {
284
+ this.#route = { ...route };
275
285
  this.#changeDetectorRef.markForCheck();
276
286
  this.#applicationRef.tick();
277
- }
287
+ });
278
288
  }
279
289
  catch {
280
- this.#applyChanges(this.#getChanges());
290
+ // Unable to resolve.
281
291
  }
282
292
  }
283
293
  else {
@@ -310,26 +320,16 @@ class SkyHrefDirective {
310
320
  }
311
321
  /* istanbul ignore next */
312
322
  #getUrlTree;
313
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefDirective, deps: [{ token: i1.Router }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: SkyHrefResolverService, optional: true }, { token: i0.ApplicationRef, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
314
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: SkyHrefDirective, isStandalone: false, selector: "[skyHref]", inputs: { skyHref: "skyHref", queryParams: "queryParams", skyHrefElse: "skyHrefElse" }, outputs: { skyHrefChange: "skyHrefChange" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" } }, ngImport: i0 }); }
323
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
324
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: SkyHrefDirective, isStandalone: false, selector: "[skyHref]", inputs: { skyHref: "skyHref", queryParams: "queryParams", skyHrefElse: "skyHrefElse" }, outputs: { skyHrefChange: "skyHrefChange" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" } }, ngImport: i0 }); }
315
325
  }
316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefDirective, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefDirective, decorators: [{
317
327
  type: Directive,
318
328
  args: [{
319
329
  selector: '[skyHref]',
320
330
  standalone: false,
321
331
  }]
322
- }], ctorParameters: () => [{ type: i1.Router }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i4.SkyAppConfig, decorators: [{
323
- type: Optional
324
- }] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
325
- type: Optional
326
- }] }, { type: SkyHrefResolverService, decorators: [{
327
- type: Optional
328
- }] }, { type: i0.ApplicationRef, decorators: [{
329
- type: Optional
330
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
331
- type: Optional
332
- }] }], propDecorators: { skyHref: [{
332
+ }], propDecorators: { skyHref: [{
333
333
  type: Input
334
334
  }], queryParams: [{
335
335
  type: Input
@@ -349,11 +349,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
349
349
  }] } });
350
350
 
351
351
  class SkyHrefModule {
352
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
353
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], exports: [SkyHrefDirective] }); }
354
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule }); }
352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
353
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], exports: [SkyHrefDirective] }); }
354
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefModule }); }
355
355
  }
356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule, decorators: [{
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyHrefModule, decorators: [{
357
357
  type: NgModule,
358
358
  args: [{
359
359
  declarations: [SkyHrefDirective],
@@ -365,10 +365,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
365
365
  * A service for creating and retrieving recently accessed links.
366
366
  */
367
367
  class SkyRecentlyAccessedService {
368
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyRecentlyAccessedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
369
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyRecentlyAccessedService }); }
368
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyRecentlyAccessedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
369
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyRecentlyAccessedService }); }
370
370
  }
371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyRecentlyAccessedService, decorators: [{
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SkyRecentlyAccessedService, decorators: [{
372
372
  type: Injectable
373
373
  }] });
374
374
 
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-router.mjs","sources":["../../../../../libs/components/router/src/lib/modules/link/link-external.directive.ts","../../../../../libs/components/router/src/lib/modules/link/link.directive.ts","../../../../../libs/components/router/src/lib/modules/link/link.module.ts","../../../../../libs/components/router/src/lib/modules/href/href-resolver.service.ts","../../../../../libs/components/router/src/lib/modules/href/href.directive.ts","../../../../../libs/components/router/src/lib/modules/href/href.module.ts","../../../../../libs/components/router/src/lib/modules/recently-accessed/recently-accessed.service.ts","../../../../../libs/components/router/src/skyux-router.ts"],"sourcesContent":["import { PathLocationStrategy, PlatformLocation } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Input,\n OnChanges,\n Optional,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport {\n SkyAppConfig,\n SkyAppConfigHost,\n SkyAppRuntimeConfigParamsProvider,\n} from '@skyux/config';\nimport { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n/**\n * @deprecated Use `skyHref` directive instead.\n */\n@Directive({\n selector: '[skyAppLinkExternal]',\n standalone: false,\n})\nexport class SkyAppLinkExternalDirective\n extends RouterLink\n implements OnChanges\n{\n @Input()\n public set skyAppLinkExternal(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n #window: SkyAppWindowRef;\n #skyAppConfig: SkyAppConfig | undefined;\n #paramsProvider: SkyAppRuntimeConfigParamsProvider | undefined;\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n renderer: Renderer2,\n elementRef: ElementRef,\n platformLocation: PlatformLocation,\n window: SkyAppWindowRef,\n @Optional() skyAppConfig?: SkyAppConfig,\n @Optional() paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() hostConfig?: SkyAppConfigHost,\n ) {\n super(\n router,\n route,\n undefined,\n renderer,\n elementRef,\n new PathLocationStrategy(\n platformLocation,\n hostConfig ? hostConfig.host.url : skyAppConfig?.skyux.host?.url,\n ),\n );\n this.#window = window;\n this.#skyAppConfig = skyAppConfig;\n this.#paramsProvider = paramsProvider;\n\n if (\n this.#window.nativeWindow.window.name &&\n this.#window.nativeWindow.window.name !== ''\n ) {\n this.target = this.#window.nativeWindow.window.name;\n } else {\n this.target = '_top';\n }\n }\n\n public override ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.#mergeQueryParams(\n changes['queryParams']?.currentValue,\n );\n super.ngOnChanges(changes);\n }\n\n #mergeQueryParams(queryParams: SkyAppLinkQueryParams): SkyAppLinkQueryParams {\n const skyuxParams = this.#skyAppConfig\n ? this.#skyAppConfig.runtime.params.getAll()\n : this.#paramsProvider?.params.getAll();\n\n return Object.assign({}, this.queryParams, queryParams, skyuxParams);\n }\n}\n","import { LocationStrategy } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Input,\n OnChanges,\n Optional,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n@Directive({\n selector: '[skyAppLink]',\n standalone: false,\n})\nexport class SkyAppLinkDirective extends RouterLink implements OnChanges {\n @Input()\n public set skyAppLink(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n #skyAppConfig: SkyAppConfig | undefined;\n #paramsProvider: SkyAppRuntimeConfigParamsProvider | undefined;\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n locationStrategy: LocationStrategy,\n renderer: Renderer2,\n elementRef: ElementRef,\n @Optional() skyAppConfig?: SkyAppConfig,\n @Optional() paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n ) {\n super(router, route, undefined, renderer, elementRef, locationStrategy);\n this.#skyAppConfig = skyAppConfig;\n this.#paramsProvider = paramsProvider;\n }\n\n public override ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.#mergeQueryParams(\n changes['queryParams']?.currentValue,\n );\n super.ngOnChanges(changes);\n }\n\n #mergeQueryParams(queryParams: SkyAppLinkQueryParams): SkyAppLinkQueryParams {\n const skyuxParams = this.#skyAppConfig\n ? this.#skyAppConfig.runtime.params.getAll(true)\n : this.#paramsProvider?.params.getAll(true);\n\n return Object.assign({}, this.queryParams, queryParams, skyuxParams);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { SkyAppLinkExternalDirective } from './link-external.directive';\nimport { SkyAppLinkDirective } from './link.directive';\n\n@NgModule({\n declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],\n exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective],\n})\n/* istanbul ignore next */\nexport class SkyAppLinkModule {}\n","import { Injectable } from '@angular/core';\n\nimport { SkyHrefResolver } from './href-resolver';\nimport { SkyHref } from './types/href';\nimport { SkyHrefResolverArgs } from './types/href-resolver.args';\n\n/**\n * Return the link as-is.\n */\n@Injectable()\nexport class SkyHrefResolverService implements SkyHrefResolver {\n public resolveHref(args: SkyHrefResolverArgs): Promise<SkyHref> {\n return Promise.resolve<SkyHref>({\n url: args.url,\n userHasAccess: true,\n });\n }\n}\n","import {\n ApplicationRef,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Optional,\n Output,\n Renderer2,\n} from '@angular/core';\nimport { Router, UrlTree } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyHrefResolverService } from './href-resolver.service';\nimport { SkyHref } from './types/href';\nimport { SkyHrefChange } from './types/href-change';\nimport { SkyHrefQueryParams } from './types/href-query-params';\n\ninterface HrefChanges {\n href: string;\n hidden: boolean;\n}\n\n@Directive({\n selector: '[skyHref]',\n standalone: false,\n})\nexport class SkyHrefDirective {\n /**\n * Provide a link as a string or as an array of strings to be joined by a slash to form a complete\n * URL.\n *\n * @param skyHref\n */\n @Input()\n public set skyHref(skyHref: string | string[] | undefined) {\n if (typeof skyHref === 'string') {\n this.#_skyHref = skyHref;\n } else {\n this.#_skyHref = skyHref ? skyHref.join('/') : '';\n }\n\n void this.#checkRouteAccess();\n }\n\n public get skyHref(): string {\n return this.#_skyHref;\n }\n\n /**\n * A collection of query URL parameters.\n */\n @Input()\n public set queryParams(value: SkyHrefQueryParams | undefined) {\n if (value !== this.#_queryParams) {\n this.#_queryParams = value;\n this.#applyChanges(this.#getChanges());\n }\n }\n\n public get queryParams(): SkyHrefQueryParams | undefined {\n return this.#_queryParams;\n }\n\n /**\n * Set the behavior for when the link is not available to either hide the link or display unlinked text.\n *\n * @param value\n */\n @Input()\n public set skyHrefElse(value: 'hide' | 'unlink' | undefined) {\n this.#_skyHrefElse = value;\n this.#applyChanges(this.#getChanges());\n }\n\n public get skyHrefElse(): 'hide' | 'unlink' | undefined {\n return this.#_skyHrefElse;\n }\n\n /**\n * Emits whether the link is available (true) or not (false).\n */\n @Output()\n public skyHrefChange = new EventEmitter<SkyHrefChange>();\n\n #route: SkyHref | false = false;\n\n #href = '';\n\n #_queryParams: SkyHrefQueryParams | undefined;\n #_skyHref = '';\n #_skyHrefElse: 'hide' | 'unlink' | undefined = 'hide';\n\n #router: Router;\n #renderer: Renderer2;\n #element: ElementRef;\n #skyAppConfig: SkyAppConfig | undefined;\n #paramsProvider: SkyAppRuntimeConfigParamsProvider | undefined;\n #hrefResolver: SkyHrefResolverService | undefined;\n #applicationRef: ApplicationRef | undefined;\n #changeDetectorRef: ChangeDetectorRef | undefined;\n\n constructor(\n router: Router,\n renderer: Renderer2,\n element: ElementRef,\n @Optional() skyAppConfig?: SkyAppConfig,\n @Optional() paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() hrefResolver?: SkyHrefResolverService,\n @Optional() applicationRef?: ApplicationRef,\n @Optional() changeDetectorRef?: ChangeDetectorRef,\n ) {\n this.#router = router;\n this.#renderer = renderer;\n this.#element = element;\n this.#skyAppConfig = skyAppConfig;\n this.#paramsProvider = paramsProvider;\n this.#hrefResolver = hrefResolver;\n this.#applicationRef = applicationRef;\n this.#changeDetectorRef = changeDetectorRef;\n }\n\n @HostListener('click', [\n '$event.button',\n '$event.ctrlKey',\n '$event.shiftKey',\n '$event.altKey',\n '$event.metaKey',\n ])\n public onClick(\n button: number,\n ctrlKey: boolean,\n shiftKey: boolean,\n altKey: boolean,\n metaKey: boolean,\n ): boolean {\n if (!this.#route || !this.#route.userHasAccess) {\n return false;\n }\n\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n\n const target = this.#element.nativeElement.getAttribute('target');\n if (typeof target === 'string' && target !== '_self') {\n return true;\n }\n\n const urlTree = this.#getUrlTree();\n if (urlTree) {\n void this.#router.navigateByUrl(urlTree);\n return false;\n }\n return true;\n }\n\n #applyChanges(change: HrefChanges): void {\n this.#renderer.addClass(this.#element.nativeElement, 'sky-href');\n if (change.hidden) {\n this.#renderer.setAttribute(\n this.#element.nativeElement,\n 'hidden',\n 'hidden',\n );\n } else {\n this.#renderer.removeAttribute(this.#element.nativeElement, 'hidden');\n }\n if (change.href) {\n this.#renderer.setAttribute(\n this.#element.nativeElement,\n 'href',\n change.href,\n );\n } else {\n this.#renderer.removeAttribute(this.#element.nativeElement, 'href');\n }\n this.skyHrefChange.emit({ userHasAccess: !change.hidden });\n }\n\n async #checkRouteAccess(): Promise<void> {\n this.#route = {\n url: this.skyHref,\n userHasAccess: false,\n };\n /* istanbul ignore else */\n if (this.#hrefResolver && this.skyHref) {\n this.#applyChanges(this.#getChanges());\n try {\n const route = await this.#hrefResolver.resolveHref({\n url: this.skyHref,\n });\n\n this.#route = { ...route };\n this.#applyChanges(this.#getChanges());\n\n /* istanbul ignore else */\n if (this.#changeDetectorRef && this.#applicationRef) {\n this.#changeDetectorRef.markForCheck();\n this.#applicationRef.tick();\n }\n } catch {\n this.#applyChanges(this.#getChanges());\n }\n } else {\n // no resolver or skyHref is falsy\n this.#route.userHasAccess = !!this.skyHref;\n this.#applyChanges(this.#getChanges());\n }\n }\n\n #getChanges(): HrefChanges {\n if (!this.#route || !this.#route.userHasAccess) {\n return {\n href: '',\n hidden: this.skyHrefElse === 'hide',\n };\n } else {\n const params =\n // The SkyAppRuntimeParamsProvider is provided in root, so it will never be undefined.\n // TODO: rework the injectors so that #paramsProvider is not possibly undefined.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.#skyAppConfig?.runtime.params ?? this.#paramsProvider!.params;\n\n this.#href = params.getLinkUrl(this.#route.url, {\n queryParams: this.queryParams ?? {},\n });\n\n return {\n href: this.#href,\n hidden: false,\n };\n }\n }\n\n /* istanbul ignore next */\n #getUrlTree: () => UrlTree | false = () => {\n const href = this.#href.toLowerCase();\n\n if (\n !href ||\n !this.#skyAppConfig?.skyux.host?.url ||\n !this.#skyAppConfig?.runtime?.app?.base\n ) {\n return false;\n }\n\n const baseUrl = (\n this.#skyAppConfig.skyux.host.url +\n this.#skyAppConfig.runtime.app.base.substr(\n 0,\n this.#skyAppConfig.runtime.app.base.length - 1,\n )\n ).toLowerCase();\n\n if (\n href === baseUrl ||\n // Make sure the base URL is not simply a partial match of the base URL plus additional\n // characters after the base URL that are not \"terminating\" characters\n href.indexOf(baseUrl + '/') === 0 ||\n href.indexOf(baseUrl + '?') === 0\n ) {\n const routePath = this.#href.substring(baseUrl.length);\n return this.#router.parseUrl(routePath);\n }\n\n return false;\n };\n}\n","import { NgModule } from '@angular/core';\n\nimport { SkyHrefDirective } from './href.directive';\n\n@NgModule({\n declarations: [SkyHrefDirective],\n exports: [SkyHrefDirective],\n})\nexport class SkyHrefModule {}\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { SkyRecentlyAccessedAddLinkArgs } from './recently-accessed-add-link-args';\nimport { SkyRecentlyAccessedAddLinkResult } from './recently-accessed-add-link-result';\nimport { SkyRecentlyAccessedAddRouteArgs } from './recently-accessed-add-route-args';\nimport { SkyRecentlyAccessedGetLinksArgs } from './recently-accessed-get-links-args';\nimport { SkyRecentlyAccessedLinkList } from './recently-accessed-link-list';\n\n/**\n * A service for creating and retrieving recently accessed links.\n */\n@Injectable()\nexport abstract class SkyRecentlyAccessedService {\n /**\n * Adds a recently accessed link based on an Angular route.\n * @param args The route to add.\n */\n public abstract addRoute(\n args: SkyRecentlyAccessedAddRouteArgs,\n ): Observable<SkyRecentlyAccessedAddLinkResult>;\n\n /**\n * Adds a recently accessed link based on metadata about the link.\n * @param args The link to add.\n */\n public abstract addLink(\n args: SkyRecentlyAccessedAddLinkArgs,\n ): Observable<SkyRecentlyAccessedAddLinkResult>;\n\n /**\n * Gets a list of recently accessed links.\n * @param args The links to retrieve.\n */\n public abstract getLinks(\n args: SkyRecentlyAccessedGetLinksArgs,\n ): Observable<SkyRecentlyAccessedLinkList>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i2","i3.SkyHrefResolverService"],"mappings":";;;;;;;;;AAoBA;;AAEG;AAKG,MAAO,2BACX,SAAQ,UAAU,CAAA;IAGlB,IACW,kBAAkB,CAAC,QAAwB,EAAA;AACpD,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ;;AAG5B,IAAA,OAAO;AACP,IAAA,aAAa;AACb,IAAA,eAAe;AAEf,IAAA,WAAA,CACE,MAAc,EACd,KAAqB,EACrB,QAAmB,EACnB,UAAsB,EACtB,gBAAkC,EAClC,MAAuB,EACX,YAA2B,EAC3B,cAAkD,EAClD,UAA6B,EAAA;AAEzC,QAAA,KAAK,CACH,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,IAAI,oBAAoB,CACtB,gBAAgB,EAChB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,CACjE,CACF;AACD,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;AACrB,QAAA,IA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,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA;;;ACGD;;AAEG;MAEmB,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA1B,0BAA0B,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAD/C;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"skyux-router.mjs","sources":["../../../../../libs/components/router/src/lib/modules/link/link-external.directive.ts","../../../../../libs/components/router/src/lib/modules/link/link.directive.ts","../../../../../libs/components/router/src/lib/modules/link/link.module.ts","../../../../../libs/components/router/src/lib/modules/href/href-resolver.service.ts","../../../../../libs/components/router/src/lib/modules/href/href.directive.ts","../../../../../libs/components/router/src/lib/modules/href/href.module.ts","../../../../../libs/components/router/src/lib/modules/recently-accessed/recently-accessed.service.ts","../../../../../libs/components/router/src/skyux-router.ts"],"sourcesContent":["import { PathLocationStrategy, PlatformLocation } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Input,\n OnChanges,\n Optional,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport {\n SkyAppConfig,\n SkyAppConfigHost,\n SkyAppRuntimeConfigParamsProvider,\n} from '@skyux/config';\nimport { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n/**\n * @deprecated Use `skyHref` directive instead.\n */\n@Directive({\n selector: '[skyAppLinkExternal]',\n standalone: false,\n})\nexport class SkyAppLinkExternalDirective\n extends RouterLink\n implements OnChanges\n{\n @Input()\n public set skyAppLinkExternal(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n #window: SkyAppWindowRef;\n #skyAppConfig: SkyAppConfig | undefined;\n #paramsProvider: SkyAppRuntimeConfigParamsProvider | undefined;\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n renderer: Renderer2,\n elementRef: ElementRef,\n platformLocation: PlatformLocation,\n window: SkyAppWindowRef,\n @Optional() skyAppConfig?: SkyAppConfig,\n @Optional() paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() hostConfig?: SkyAppConfigHost,\n ) {\n super(\n router,\n route,\n undefined,\n renderer,\n elementRef,\n new PathLocationStrategy(\n platformLocation,\n hostConfig ? hostConfig.host.url : skyAppConfig?.skyux.host?.url,\n ),\n );\n this.#window = window;\n this.#skyAppConfig = skyAppConfig;\n this.#paramsProvider = paramsProvider;\n\n if (\n this.#window.nativeWindow.window.name &&\n this.#window.nativeWindow.window.name !== ''\n ) {\n this.target = this.#window.nativeWindow.window.name;\n } else {\n this.target = '_top';\n }\n }\n\n public override ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.#mergeQueryParams(\n changes['queryParams']?.currentValue,\n );\n super.ngOnChanges(changes);\n }\n\n #mergeQueryParams(queryParams: SkyAppLinkQueryParams): SkyAppLinkQueryParams {\n const skyuxParams = this.#skyAppConfig\n ? this.#skyAppConfig.runtime.params.getAll()\n : this.#paramsProvider?.params.getAll();\n\n return Object.assign({}, this.queryParams, queryParams, skyuxParams);\n }\n}\n","import { LocationStrategy } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Input,\n OnChanges,\n Optional,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n@Directive({\n selector: '[skyAppLink]',\n standalone: false,\n})\nexport class SkyAppLinkDirective extends RouterLink implements OnChanges {\n @Input()\n public set skyAppLink(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n #skyAppConfig: SkyAppConfig | undefined;\n #paramsProvider: SkyAppRuntimeConfigParamsProvider | undefined;\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n locationStrategy: LocationStrategy,\n renderer: Renderer2,\n elementRef: ElementRef,\n @Optional() skyAppConfig?: SkyAppConfig,\n @Optional() paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n ) {\n super(router, route, undefined, renderer, elementRef, locationStrategy);\n this.#skyAppConfig = skyAppConfig;\n this.#paramsProvider = paramsProvider;\n }\n\n public override ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.#mergeQueryParams(\n changes['queryParams']?.currentValue,\n );\n super.ngOnChanges(changes);\n }\n\n #mergeQueryParams(queryParams: SkyAppLinkQueryParams): SkyAppLinkQueryParams {\n const skyuxParams = this.#skyAppConfig\n ? this.#skyAppConfig.runtime.params.getAll(true)\n : this.#paramsProvider?.params.getAll(true);\n\n return Object.assign({}, this.queryParams, queryParams, skyuxParams);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { SkyAppLinkExternalDirective } from './link-external.directive';\nimport { SkyAppLinkDirective } from './link.directive';\n\n@NgModule({\n declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],\n exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective],\n})\n/* istanbul ignore next */\nexport class SkyAppLinkModule {}\n","import { Injectable } from '@angular/core';\n\nimport { SkyHrefResolver } from './href-resolver';\nimport { SkyHref } from './types/href';\nimport { SkyHrefResolverArgs } from './types/href-resolver.args';\n\n/**\n * Return the link as-is.\n */\n@Injectable()\nexport class SkyHrefResolverService implements SkyHrefResolver {\n public resolveHref(args: SkyHrefResolverArgs): Promise<SkyHref> {\n return Promise.resolve<SkyHref>({\n url: args.url,\n userHasAccess: true,\n });\n }\n}\n","import {\n ApplicationRef,\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n Renderer2,\n inject,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Router, UrlTree } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { Subscription, catchError, finalize, from, of } from 'rxjs';\n\nimport { SkyHrefResolverService } from './href-resolver.service';\nimport { SkyHref } from './types/href';\nimport { SkyHrefChange } from './types/href-change';\nimport { SkyHrefQueryParams } from './types/href-query-params';\n\ninterface HrefChanges {\n href: string;\n hidden: boolean;\n}\n\n@Directive({\n selector: '[skyHref]',\n standalone: false,\n})\nexport class SkyHrefDirective {\n /**\n * Provide a link as a string or as an array of strings to be joined by a slash to form a complete\n * URL.\n *\n * @param skyHref\n */\n @Input()\n public set skyHref(skyHref: string | string[] | undefined) {\n if (typeof skyHref === 'string') {\n this.#_skyHref = skyHref;\n } else {\n this.#_skyHref = skyHref ? skyHref.join('/') : '';\n }\n\n this.#checkRouteAccess();\n }\n\n public get skyHref(): string {\n return this.#_skyHref;\n }\n\n /**\n * A collection of query URL parameters.\n */\n @Input()\n public set queryParams(value: SkyHrefQueryParams | undefined) {\n if (value !== this.#_queryParams) {\n this.#_queryParams = value;\n this.#applyChanges(this.#getChanges());\n }\n }\n\n public get queryParams(): SkyHrefQueryParams | undefined {\n return this.#_queryParams;\n }\n\n /**\n * Set the behavior for when the link is not available to either hide the link or display unlinked text.\n *\n * @param value\n */\n @Input()\n public set skyHrefElse(value: 'hide' | 'unlink' | undefined) {\n this.#_skyHrefElse = value;\n this.#applyChanges(this.#getChanges());\n }\n\n public get skyHrefElse(): 'hide' | 'unlink' | undefined {\n return this.#_skyHrefElse;\n }\n\n /**\n * Emits whether the link is available (true) or not (false).\n */\n @Output()\n public skyHrefChange = new EventEmitter<SkyHrefChange>();\n\n #route: SkyHref | false = false;\n\n #href = '';\n\n #_queryParams: SkyHrefQueryParams | undefined;\n #_skyHref = '';\n #_skyHrefElse: 'hide' | 'unlink' | undefined = 'hide';\n\n readonly #router = inject(Router);\n readonly #renderer = inject(Renderer2);\n readonly #element = inject(ElementRef);\n readonly #skyAppConfig = inject(SkyAppConfig, { optional: true });\n readonly #paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {\n optional: true,\n });\n readonly #hrefResolver = inject(SkyHrefResolverService, { optional: true });\n readonly #applicationRef = inject(ApplicationRef);\n readonly #changeDetectorRef = inject(ChangeDetectorRef);\n readonly #destroyRef = inject(DestroyRef);\n #checkingSubscription: Subscription | undefined;\n\n @HostListener('click', [\n '$event.button',\n '$event.ctrlKey',\n '$event.shiftKey',\n '$event.altKey',\n '$event.metaKey',\n ])\n public onClick(\n button: number,\n ctrlKey: boolean,\n shiftKey: boolean,\n altKey: boolean,\n metaKey: boolean,\n ): boolean {\n if (!this.#route || !this.#route.userHasAccess) {\n return false;\n }\n\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n\n const target = this.#element.nativeElement.getAttribute('target');\n if (typeof target === 'string' && target !== '_self') {\n return true;\n }\n\n const urlTree = this.#getUrlTree();\n if (urlTree) {\n void this.#router.navigateByUrl(urlTree);\n return false;\n }\n return true;\n }\n\n #applyChanges(change: HrefChanges): void {\n this.#renderer.addClass(this.#element.nativeElement, 'sky-href');\n if (change.hidden) {\n this.#renderer.setAttribute(\n this.#element.nativeElement,\n 'hidden',\n 'hidden',\n );\n } else {\n this.#renderer.removeAttribute(this.#element.nativeElement, 'hidden');\n }\n if (change.href) {\n this.#renderer.setAttribute(\n this.#element.nativeElement,\n 'href',\n change.href,\n );\n } else {\n this.#renderer.removeAttribute(this.#element.nativeElement, 'href');\n }\n this.skyHrefChange.emit({ userHasAccess: !change.hidden });\n }\n\n #checkRouteAccess(): void {\n this.#route = {\n url: this.skyHref,\n userHasAccess: false,\n };\n if (this.#hrefResolver && this.skyHref) {\n this.#applyChanges(this.#getChanges());\n this.#checkingSubscription?.unsubscribe();\n try {\n this.#checkingSubscription = from(\n this.#hrefResolver.resolveHref({ url: this.skyHref }),\n )\n .pipe(\n catchError(() =>\n of({\n url: this.skyHref,\n userHasAccess: false,\n } as SkyHref),\n ),\n takeUntilDestroyed(this.#destroyRef),\n finalize(() => {\n this.#applyChanges(this.#getChanges());\n }),\n )\n .subscribe((route) => {\n this.#route = { ...route };\n this.#changeDetectorRef.markForCheck();\n this.#applicationRef.tick();\n });\n } catch {\n // Unable to resolve.\n }\n } else {\n // no resolver or skyHref is falsy\n this.#route.userHasAccess = !!this.skyHref;\n this.#applyChanges(this.#getChanges());\n }\n }\n\n #getChanges(): HrefChanges {\n if (!this.#route || !this.#route.userHasAccess) {\n return {\n href: '',\n hidden: this.skyHrefElse === 'hide',\n };\n } else {\n const params =\n // The SkyAppRuntimeParamsProvider is provided in root, so it will never be undefined.\n // TODO: rework the injectors so that #paramsProvider is not possibly undefined.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.#skyAppConfig?.runtime.params ?? this.#paramsProvider!.params;\n\n this.#href = params.getLinkUrl(this.#route.url, {\n queryParams: this.queryParams ?? {},\n });\n\n return {\n href: this.#href,\n hidden: false,\n };\n }\n }\n\n /* istanbul ignore next */\n #getUrlTree: () => UrlTree | false = () => {\n const href = this.#href.toLowerCase();\n\n if (\n !href ||\n !this.#skyAppConfig?.skyux.host?.url ||\n !this.#skyAppConfig?.runtime?.app?.base\n ) {\n return false;\n }\n\n const baseUrl = (\n this.#skyAppConfig.skyux.host.url +\n this.#skyAppConfig.runtime.app.base.substr(\n 0,\n this.#skyAppConfig.runtime.app.base.length - 1,\n )\n ).toLowerCase();\n\n if (\n href === baseUrl ||\n // Make sure the base URL is not simply a partial match of the base URL plus additional\n // characters after the base URL that are not \"terminating\" characters\n href.indexOf(baseUrl + '/') === 0 ||\n href.indexOf(baseUrl + '?') === 0\n ) {\n const routePath = this.#href.substring(baseUrl.length);\n return this.#router.parseUrl(routePath);\n }\n\n return false;\n };\n}\n","import { NgModule } from '@angular/core';\n\nimport { SkyHrefDirective } from './href.directive';\n\n@NgModule({\n declarations: [SkyHrefDirective],\n exports: [SkyHrefDirective],\n})\nexport class SkyHrefModule {}\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { SkyRecentlyAccessedAddLinkArgs } from './recently-accessed-add-link-args';\nimport { SkyRecentlyAccessedAddLinkResult } from './recently-accessed-add-link-result';\nimport { SkyRecentlyAccessedAddRouteArgs } from './recently-accessed-add-route-args';\nimport { SkyRecentlyAccessedGetLinksArgs } from './recently-accessed-get-links-args';\nimport { SkyRecentlyAccessedLinkList } from './recently-accessed-link-list';\n\n/**\n * A service for creating and retrieving recently accessed links.\n */\n@Injectable()\nexport abstract class SkyRecentlyAccessedService {\n /**\n * Adds a recently accessed link based on an Angular route.\n * @param args The route to add.\n */\n public abstract addRoute(\n args: SkyRecentlyAccessedAddRouteArgs,\n ): Observable<SkyRecentlyAccessedAddLinkResult>;\n\n /**\n * Adds a recently accessed link based on metadata about the link.\n * @param args The link to add.\n */\n public abstract addLink(\n args: SkyRecentlyAccessedAddLinkArgs,\n ): Observable<SkyRecentlyAccessedAddLinkResult>;\n\n /**\n * Gets a list of recently accessed links.\n * @param args The links to retrieve.\n */\n public abstract getLinks(\n args: SkyRecentlyAccessedGetLinksArgs,\n ): Observable<SkyRecentlyAccessedLinkList>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3"],"mappings":";;;;;;;;;;;;AAoBA;;AAEG;AAKG,MAAO,2BACX,SAAQ,UAAU,CAAA;IAGlB,IACW,kBAAkB,CAAC,QAAwB,EAAA;AACpD,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ;;AAG5B,IAAA,OAAO;AACP,IAAA,aAAa;AACb,IAAA,eAAe;AAEf,IAAA,WAAA,CACE,MAAc,EACd,KAAqB,EACrB,QAAmB,EACnB,UAAsB,EACtB,gBAAkC,EAClC,MAAuB,EACX,YAA2B,EAC3B,cAAkD,EAClD,UAA6B,EAAA;AAEzC,QAAA,KAAK,CACH,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,IAAI,oBAAoB,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AA,EAAA,CAAA,CAAA;+GAEf,aAAa,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA;;;ACGD;;AAEG;MAEmB,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA1B,0BAA0B,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAD/C;;;ACbD;;AAEG;;;;"}
@@ -1,7 +1,4 @@
1
- import { ApplicationRef, ChangeDetectorRef, ElementRef, EventEmitter, Renderer2 } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';
4
- import { SkyHrefResolverService } from './href-resolver.service';
1
+ import { EventEmitter } from '@angular/core';
5
2
  import { SkyHrefChange } from './types/href-change';
6
3
  import { SkyHrefQueryParams } from './types/href-query-params';
7
4
  import * as i0 from "@angular/core";
@@ -31,8 +28,7 @@ export declare class SkyHrefDirective {
31
28
  * Emits whether the link is available (true) or not (false).
32
29
  */
33
30
  skyHrefChange: EventEmitter<SkyHrefChange>;
34
- constructor(router: Router, renderer: Renderer2, element: ElementRef, skyAppConfig?: SkyAppConfig, paramsProvider?: SkyAppRuntimeConfigParamsProvider, hrefResolver?: SkyHrefResolverService, applicationRef?: ApplicationRef, changeDetectorRef?: ChangeDetectorRef);
35
31
  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefDirective, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefDirective, never>;
37
33
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyHrefDirective, "[skyHref]", never, { "skyHref": { "alias": "skyHref"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "skyHrefElse": { "alias": "skyHrefElse"; "required": false; }; }, { "skyHrefChange": "skyHrefChange"; }, never, never, false, never>;
38
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/router",
3
- "version": "12.0.0-alpha.1",
3
+ "version": "12.0.0-alpha.10",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -16,12 +16,12 @@
16
16
  },
17
17
  "homepage": "https://github.com/blackbaud/skyux#readme",
18
18
  "peerDependencies": {
19
- "@angular/cdk": "^19.0.4",
20
- "@angular/common": "^19.0.5",
21
- "@angular/core": "^19.0.5",
22
- "@angular/router": "^19.0.5",
23
- "@skyux/config": "12.0.0-alpha.1",
24
- "@skyux/core": "12.0.0-alpha.1"
19
+ "@angular/cdk": "^19.2.2",
20
+ "@angular/common": "^19.2.1",
21
+ "@angular/core": "^19.2.1",
22
+ "@angular/router": "^19.2.1",
23
+ "@skyux/config": "12.0.0-alpha.10",
24
+ "@skyux/core": "12.0.0-alpha.10"
25
25
  },
26
26
  "dependencies": {
27
27
  "tslib": "^2.8.1"
@@ -1,7 +1,6 @@
1
1
  import { SkyHarnessFilters } from '@skyux/core/testing';
2
2
  /**
3
3
  * A set of criteria that can be used to filter a list of `SkyHrefHarness` instances.
4
- * @internal
5
4
  */
6
5
  export interface SkyHrefHarnessFilters extends SkyHarnessFilters {
7
6
  }
@@ -5,6 +5,9 @@ import { SkyHrefHarnessFilters } from './href-harness-filters';
5
5
  * Allows interaction with a SkyHref directive during testing.
6
6
  */
7
7
  export declare class SkyHrefHarness extends SkyComponentHarness {
8
+ /**
9
+ * @internal
10
+ */
8
11
  static hostSelector: string;
9
12
  /**
10
13
  * Gets a `HarnessPredicate` that can be used to search for a
@@ -1,2 +1,3 @@
1
- export { SkyHrefTestingModule } from './modules/href/href-testing.module';
2
1
  export { SkyHrefHarness } from './modules/href/href-harness';
2
+ export { SkyHrefHarnessFilters } from './modules/href/href-harness-filters';
3
+ export { SkyHrefTestingModule } from './modules/href/href-testing.module';