@skyux/router 15.0.0-alpha.0 → 15.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,6 +1,6 @@
1
1
  import { SkyComponentHarness } from '@skyux/core/testing';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
3
+ import { InjectionToken, inject, Injectable, NgModule } from '@angular/core';
4
4
  import { SkyHrefModule, SkyHrefResolverService } from '@skyux/router';
5
5
 
6
6
  /**
@@ -50,8 +50,8 @@ const MockUserHasAccess = new InjectionToken('MockUserHasAccess');
50
50
  * @internal
51
51
  */
52
52
  class SkyHrefResolverMockService {
53
- constructor(userHasAccess) {
54
- this.userHasAccess = userHasAccess;
53
+ constructor() {
54
+ this.userHasAccess = inject(MockUserHasAccess);
55
55
  }
56
56
  resolveHref(param) {
57
57
  return Promise.resolve({
@@ -59,15 +59,12 @@ class SkyHrefResolverMockService {
59
59
  userHasAccess: this.userHasAccess,
60
60
  });
61
61
  }
62
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverMockService, deps: [{ token: MockUserHasAccess }], target: i0.ɵɵFactoryTarget.Injectable }); }
63
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverMockService }); }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
63
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverMockService }); }
64
64
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverMockService, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverMockService, decorators: [{
66
66
  type: Injectable
67
- }], ctorParameters: () => [{ type: undefined, decorators: [{
68
- type: Inject,
69
- args: [MockUserHasAccess]
70
- }] }] });
67
+ }] });
71
68
 
72
69
  /**
73
70
  * Testing module for the `SkyHref` directive and route resolver.
@@ -84,9 +81,9 @@ class SkyHrefTestingModule {
84
81
  ],
85
82
  };
86
83
  }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
88
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefTestingModule, exports: [SkyHrefModule] }); }
89
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefTestingModule, providers: [
84
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
85
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefTestingModule, exports: [SkyHrefModule] }); }
86
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefTestingModule, providers: [
90
87
  SkyHrefResolverMockService,
91
88
  {
92
89
  provide: SkyHrefResolverService,
@@ -98,7 +95,7 @@ class SkyHrefTestingModule {
98
95
  },
99
96
  ], imports: [SkyHrefModule] }); }
100
97
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefTestingModule, decorators: [{
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefTestingModule, decorators: [{
102
99
  type: NgModule,
103
100
  args: [{
104
101
  exports: [SkyHrefModule],
@@ -1 +1 @@
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/modules/href/provide-href-testing.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 useExisting: 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 { Provider } from '@angular/core';\nimport { SkyHrefResolverService } from '@skyux/router';\n\nimport {\n MockUserHasAccess,\n SkyHrefResolverMockService,\n} from './href-resolver-mock.service';\n\n/**\n * Provides testing services for the `SkyHref` directive and route resolver.\n * @param options Set whether the user has access to the route.\n */\nexport function provideHrefTesting(options?: {\n userHasAccess: boolean;\n}): Provider[] {\n return [\n SkyHrefResolverMockService,\n {\n provide: SkyHrefResolverService,\n useExisting: SkyHrefResolverMockService,\n },\n {\n provide: MockUserHasAccess,\n useValue: !!options?.userHasAccess,\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,IAAA,CAAA,YAAY,GAAG,WAAW,CAAC;AAEzC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC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AAa,CAAC;AACxB,oBAAA,SAAS,EAAE;wBACT,0BAA0B;AAC1B,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,WAAW,EAAE,0BAA0B;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AChBD;;;AAGG;AACG,SAAU,kBAAkB,CAAC,OAElC,EAAA;IACC,OAAO;QACL,0BAA0B;AAC1B,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,WAAW,EAAE,0BAA0B;AACxC,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa;AACnC,SAAA;KACF;AACH;;AC1BA;;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/modules/href/provide-href-testing.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 (\n await this.host()\n )\n .matchesSelector('[hidden]')\n .then((hidden) => !hidden);\n }\n}\n","import { Injectable, InjectionToken, inject } 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 private readonly userHasAccess = inject(MockUserHasAccess);\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 useExisting: 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 { Provider } from '@angular/core';\nimport { SkyHrefResolverService } from '@skyux/router';\n\nimport {\n MockUserHasAccess,\n SkyHrefResolverMockService,\n} from './href-resolver-mock.service';\n\n/**\n * Provides testing services for the `SkyHref` directive and route resolver.\n * @param options Set whether the user has access to the route.\n */\nexport function provideHrefTesting(options?: {\n userHasAccess: boolean;\n}): Provider[] {\n return [\n SkyHrefResolverMockService,\n {\n provide: SkyHrefResolverService,\n useExisting: SkyHrefResolverMockService,\n },\n {\n provide: MockUserHasAccess,\n useValue: !!options?.userHasAccess,\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,IAAA,CAAA,YAAY,GAAG,WAAW,CAAC;AAEzC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;IAC5C;AAEA;;AAEG;AACI,IAAA,MAAM,OAAO,GAAA;AAClB,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;IACvD;AAEA;;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;YACzC;AACA,YAAA,OAAO,EAAE;AACX,QAAA,CAAC,CAAC;IACJ;AAEA;;AAEG;AACI,IAAA,MAAM,SAAS,GAAA;AACpB,QAAA,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,IAAI,EAAE;aAEhB,eAAe,CAAC,UAAU;aAC1B,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC;IAC9B;;;ACjDK,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,mBAAmB,CACpB;AAED;;AAEG;MAEU,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAA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A0B;AACxC,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,WAAW,EAAE,0BAA0B;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AChBD;;;AAGG;AACG,SAAU,kBAAkB,CAAC,OAElC,EAAA;IACC,OAAO;QACL,0BAA0B;AAC1B,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,WAAW,EAAE,0BAA0B;AACxC,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa;AACnC,SAAA;KACF;AACH;;AC1BA;;AAEG;;;;"}
@@ -1,12 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Optional, Directive, NgModule, Injectable, EventEmitter, inject, Renderer2, ElementRef, ApplicationRef, ChangeDetectorRef, DestroyRef, HostListener, Output } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { PathLocationStrategy } from '@angular/common';
5
- import * as i1 from '@angular/router';
6
- import { RouterLink, Router } from '@angular/router';
7
- import * as i3 from '@skyux/core';
8
- import * as i4 from '@skyux/config';
9
- import { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';
2
+ import { inject, Renderer2, ElementRef, Input, Directive, NgModule, Injectable, EventEmitter, ApplicationRef, ChangeDetectorRef, DestroyRef, HostListener, Output } from '@angular/core';
3
+ import { PathLocationStrategy, PlatformLocation, LocationStrategy } from '@angular/common';
4
+ import { RouterLink, Router, ActivatedRoute } from '@angular/router';
5
+ import { SkyAppRuntimeConfigParamsProvider, SkyAppConfig, SkyAppConfigHost } from '@skyux/config';
6
+ import { SkyAppWindowRef } from '@skyux/core';
10
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
8
  import { from, catchError, of, finalize } from 'rxjs';
12
9
 
@@ -17,14 +14,16 @@ class SkyAppLinkExternalDirective extends RouterLink {
17
14
  set skyAppLinkExternal(commands) {
18
15
  this.routerLink = commands;
19
16
  }
20
- #window;
17
+ #window = inject(SkyAppWindowRef);
21
18
  #skyAppConfig;
22
- #paramsProvider;
23
- constructor(router, route, renderer, elementRef, platformLocation, window, skyAppConfig, paramsProvider, hostConfig) {
24
- super(router, route, undefined, renderer, elementRef, new PathLocationStrategy(platformLocation, hostConfig ? hostConfig.host.url : skyAppConfig?.skyux.host?.url));
25
- this.#window = window;
19
+ #paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {
20
+ optional: true,
21
+ });
22
+ constructor() {
23
+ const skyAppConfig = inject(SkyAppConfig, { optional: true });
24
+ const hostConfig = inject(SkyAppConfigHost, { optional: true });
25
+ super(inject(Router), inject(ActivatedRoute), undefined, inject(Renderer2), inject(ElementRef), new PathLocationStrategy(inject(PlatformLocation), hostConfig ? hostConfig.host.url : skyAppConfig?.skyux.host?.url));
26
26
  this.#skyAppConfig = skyAppConfig;
27
- this.#paramsProvider = paramsProvider;
28
27
  if (this.#window.nativeWindow.window.name &&
29
28
  this.#window.nativeWindow.window.name !== '') {
30
29
  this.target = this.#window.nativeWindow.window.name;
@@ -43,22 +42,16 @@ class SkyAppLinkExternalDirective extends RouterLink {
43
42
  : this.#paramsProvider?.params.getAll();
44
43
  return Object.assign({}, this.queryParams, queryParams, skyuxParams);
45
44
  }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.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: "22.0.1", type: SkyAppLinkExternalDirective, isStandalone: false, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkExternalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: SkyAppLinkExternalDirective, isStandalone: false, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
48
47
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
50
49
  type: Directive,
51
50
  args: [{
52
51
  selector: '[skyAppLinkExternal]',
53
52
  standalone: false,
54
53
  }]
55
- }], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2.PlatformLocation }, { type: i3.SkyAppWindowRef }, { type: i4.SkyAppConfig, decorators: [{
56
- type: Optional
57
- }] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
58
- type: Optional
59
- }] }, { type: i4.SkyAppConfigHost, decorators: [{
60
- type: Optional
61
- }] }], propDecorators: { skyAppLinkExternal: [{
54
+ }], ctorParameters: () => [], propDecorators: { skyAppLinkExternal: [{
62
55
  type: Input
63
56
  }] } });
64
57
 
@@ -66,12 +59,12 @@ class SkyAppLinkDirective extends RouterLink {
66
59
  set skyAppLink(commands) {
67
60
  this.routerLink = commands;
68
61
  }
69
- #skyAppConfig;
70
- #paramsProvider;
71
- constructor(router, route, locationStrategy, renderer, elementRef, skyAppConfig, paramsProvider) {
72
- super(router, route, undefined, renderer, elementRef, locationStrategy);
73
- this.#skyAppConfig = skyAppConfig;
74
- this.#paramsProvider = paramsProvider;
62
+ #skyAppConfig = inject(SkyAppConfig, { optional: true });
63
+ #paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {
64
+ optional: true,
65
+ });
66
+ constructor() {
67
+ super(inject(Router), inject(ActivatedRoute), undefined, inject(Renderer2), inject(ElementRef), inject(LocationStrategy));
75
68
  }
76
69
  ngOnChanges(changes) {
77
70
  this.queryParams = this.#mergeQueryParams(changes['queryParams']?.currentValue);
@@ -83,30 +76,29 @@ class SkyAppLinkDirective extends RouterLink {
83
76
  : this.#paramsProvider?.params.getAll(true);
84
77
  return Object.assign({}, this.queryParams, queryParams, skyuxParams);
85
78
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.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: "22.0.1", type: SkyAppLinkDirective, isStandalone: false, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
80
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: SkyAppLinkDirective, isStandalone: false, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
88
81
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
90
83
  type: Directive,
91
84
  args: [{
92
85
  selector: '[skyAppLink]',
93
86
  standalone: false,
94
87
  }]
95
- }], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.LocationStrategy }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i4.SkyAppConfig, decorators: [{
96
- type: Optional
97
- }] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
98
- type: Optional
99
- }] }], propDecorators: { skyAppLink: [{
88
+ }], ctorParameters: () => [], propDecorators: { skyAppLink: [{
100
89
  type: Input
101
90
  }] } });
102
91
 
92
+ /**
93
+ * Provides the `skyAppLink` and `skyAppLinkExternal` directives.
94
+ */
103
95
  /* istanbul ignore next */
104
96
  class SkyAppLinkModule {
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
106
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] }); }
107
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkModule }); }
97
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
98
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] }); }
99
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkModule }); }
108
100
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyAppLinkModule, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyAppLinkModule, decorators: [{
110
102
  type: NgModule,
111
103
  args: [{
112
104
  declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],
@@ -115,19 +107,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
115
107
  }] });
116
108
 
117
109
  /**
118
- * Return the link as-is.
110
+ * The resolver used by the `skyHref` directive. This default implementation returns the link
111
+ * as-is and grants access to every user. Provide your own implementation to control how links
112
+ * are resolved.
119
113
  */
120
114
  class SkyHrefResolverService {
115
+ /**
116
+ * Resolves a link's final URL and whether the current user may access it.
117
+ */
121
118
  resolveHref(args) {
122
119
  return Promise.resolve({
123
120
  url: args.url,
124
121
  userHasAccess: true,
125
122
  });
126
123
  }
127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
128
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverService }); }
124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
125
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverService }); }
129
126
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefResolverService, decorators: [{
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefResolverService, decorators: [{
131
128
  type: Injectable
132
129
  }] });
133
130
 
@@ -320,10 +317,10 @@ class SkyHrefDirective {
320
317
  }
321
318
  /* istanbul ignore next */
322
319
  #getUrlTree;
323
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
324
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.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 }); }
320
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
321
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", 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 }); }
325
322
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefDirective, decorators: [{
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefDirective, decorators: [{
327
324
  type: Directive,
328
325
  args: [{
329
326
  selector: '[skyHref]',
@@ -348,12 +345,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
348
345
  ]]
349
346
  }] } });
350
347
 
348
+ /**
349
+ * Provides the `skyHref` directive.
350
+ */
351
351
  class SkyHrefModule {
352
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
353
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], exports: [SkyHrefDirective] }); }
354
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefModule }); }
352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
353
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], exports: [SkyHrefDirective] }); }
354
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyHrefModule }); }
355
355
  }
356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyHrefModule, decorators: [{
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", 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: "22.0.1", 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: "22.0.1", ngImport: i0, type: SkyRecentlyAccessedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
369
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyRecentlyAccessedService }); }
368
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyRecentlyAccessedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
369
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SkyRecentlyAccessedService }); }
370
370
  }
371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SkyRecentlyAccessedService, decorators: [{
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", 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 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;IAC5B;AAEA,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,IAAI,CAAC,aAAa,GAAG,YAAY;AACjC,QAAA,IAAI,CAAC,eAAe,GAAG,cAAc;QAErC,IACE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI;YACrC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,EAC5C;AACA,YAAA,IAAI,CAA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AAA;;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 Renderer2,\n SimpleChanges,\n inject,\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 readonly #window = inject(SkyAppWindowRef);\n readonly #skyAppConfig: SkyAppConfig | null;\n readonly #paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {\n optional: true,\n });\n\n constructor() {\n const skyAppConfig = inject(SkyAppConfig, { optional: true });\n const hostConfig = inject(SkyAppConfigHost, { optional: true });\n\n super(\n inject(Router),\n inject(ActivatedRoute),\n undefined,\n inject(Renderer2),\n inject(ElementRef),\n new PathLocationStrategy(\n inject(PlatformLocation),\n hostConfig ? hostConfig.host.url : skyAppConfig?.skyux.host?.url,\n ),\n );\n this.#skyAppConfig = skyAppConfig;\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 Renderer2,\n SimpleChanges,\n inject,\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 readonly #skyAppConfig = inject(SkyAppConfig, { optional: true });\n readonly #paramsProvider = inject(SkyAppRuntimeConfigParamsProvider, {\n optional: true,\n });\n\n constructor() {\n super(\n inject(Router),\n inject(ActivatedRoute),\n undefined,\n inject(Renderer2),\n inject(ElementRef),\n inject(LocationStrategy),\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(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/**\n * Provides the `skyAppLink` and `skyAppLinkExternal` directives.\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 * The resolver used by the `skyHref` directive. This default implementation returns the link\n * as-is and grants access to every user. Provide your own implementation to control how links\n * are resolved.\n */\n@Injectable()\nexport class SkyHrefResolverService implements SkyHrefResolver {\n /**\n * Resolves a link's final URL and whether the current user may access it.\n */\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/**\n * Provides the `skyHref` 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":[],"mappings":";;;;;;;;;AAoBA;;AAEG;AAKG,MAAO,2BACX,SAAQ,UAAU,CAAA;IAGlB,IACW,kBAAkB,CAAC,QAAwB,EAAA;AACpD,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ;IAC5B;AAES,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,aAAa;AACb,IAAA,eAAe,GAAG,MAAM,CAAC,iCAAiC,EAAE;AACnE,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AAEF,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC7D,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAE/D,KAAK,CACH,MAAM,CAAC,MAAM,CAAC,EACd,MAAM,CAAC,cAAc,CAAC,EACtB,SAAS,EACT,MAAM,CAAC,SAAS,CAAC,EACjB,MAAM,CAAC,UAAU,CAAC,EAClB,IAAI,oBAAoB,CACtB,MAAM,CAAC,gBAAgB,CAAC,EACxB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,YAAY,EAAE,KAAK,CAAC,IAAI,E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U,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAb,aAAa,EAAA,YAAA,EAAA,CAHT,gBAAgB,CAAA,EAAA,OAAA,EAAA,CACrB,gBAAgB,CAAA,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;;;ACAD;;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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/router",
3
- "version": "15.0.0-alpha.0",
3
+ "version": "15.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": "^22.0.1",
20
- "@angular/common": "^22.0.1",
21
- "@angular/core": "^22.0.1",
22
- "@angular/router": "^22.0.1",
23
- "@skyux/config": "15.0.0-alpha.0",
24
- "@skyux/core": "15.0.0-alpha.0"
19
+ "@angular/cdk": "^22.1.2",
20
+ "@angular/common": "^22.1.2",
21
+ "@angular/core": "^22.1.2",
22
+ "@angular/router": "^22.1.2",
23
+ "@skyux/config": "15.0.0-alpha.10",
24
+ "@skyux/core": "15.0.0-alpha.10"
25
25
  },
26
26
  "dependencies": {
27
27
  "tslib": "^2.8.1"
@@ -1,19 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, Renderer2, ElementRef, SimpleChanges, EventEmitter } from '@angular/core';
3
- import { LocationStrategy, PlatformLocation } from '@angular/common';
4
- import { RouterLink, Router, ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
5
- import { SkyAppConfig, SkyAppRuntimeConfigParamsProvider, SkyAppConfigHost } from '@skyux/config';
6
- import { SkyAppWindowRef } from '@skyux/core';
2
+ import { OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
3
+ import { RouterLink, ActivatedRouteSnapshot } from '@angular/router';
7
4
  import { Observable } from 'rxjs';
8
5
 
6
+ /**
7
+ * A collection of query URL parameters.
8
+ */
9
9
  type SkyAppLinkQueryParams = Record<string, any>;
10
10
 
11
11
  declare class SkyAppLinkDirective extends RouterLink implements OnChanges {
12
12
  #private;
13
13
  set skyAppLink(commands: any[] | string);
14
- constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy, renderer: Renderer2, elementRef: ElementRef, skyAppConfig?: SkyAppConfig, paramsProvider?: SkyAppRuntimeConfigParamsProvider);
14
+ constructor();
15
15
  ngOnChanges(changes: SimpleChanges): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkDirective, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkDirective, never>;
17
17
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyAppLinkDirective, "[skyAppLink]", never, { "skyAppLink": { "alias": "skyAppLink"; "required": false; }; }, {}, never, never, false, never>;
18
18
  }
19
19
 
@@ -23,46 +23,86 @@ declare class SkyAppLinkDirective extends RouterLink implements OnChanges {
23
23
  declare class SkyAppLinkExternalDirective extends RouterLink implements OnChanges {
24
24
  #private;
25
25
  set skyAppLinkExternal(commands: any[] | string);
26
- constructor(router: Router, route: ActivatedRoute, renderer: Renderer2, elementRef: ElementRef, platformLocation: PlatformLocation, window: SkyAppWindowRef, skyAppConfig?: SkyAppConfig, paramsProvider?: SkyAppRuntimeConfigParamsProvider, hostConfig?: SkyAppConfigHost);
26
+ constructor();
27
27
  ngOnChanges(changes: SimpleChanges): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkExternalDirective, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkExternalDirective, never>;
29
29
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyAppLinkExternalDirective, "[skyAppLinkExternal]", never, { "skyAppLinkExternal": { "alias": "skyAppLinkExternal"; "required": false; }; }, {}, never, never, false, never>;
30
30
  }
31
31
 
32
+ /**
33
+ * Provides the `skyAppLink` and `skyAppLinkExternal` directives.
34
+ */
32
35
  declare class SkyAppLinkModule {
33
36
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkModule, never>;
34
37
  static ɵmod: i0.ɵɵNgModuleDeclaration<SkyAppLinkModule, [typeof SkyAppLinkDirective, typeof SkyAppLinkExternalDirective], never, [typeof SkyAppLinkDirective, typeof SkyAppLinkExternalDirective]>;
35
38
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyAppLinkModule>;
36
39
  }
37
40
 
41
+ /**
42
+ * A resolved link for the `skyHref` directive.
43
+ */
38
44
  interface SkyHref {
45
+ /**
46
+ * The name of the app that owns the route.
47
+ */
39
48
  app?: string;
49
+ /**
50
+ * The app-relative path of the route. The path may contain `:`-prefixed parameter
51
+ * placeholders, which a resolver substitutes with values from the requested link.
52
+ */
40
53
  route?: string;
54
+ /**
55
+ * The link's resolved URL.
56
+ */
41
57
  url: string;
58
+ /**
59
+ * Whether the current user may access the link.
60
+ */
42
61
  userHasAccess?: boolean;
43
62
  aliases?: string[];
44
63
  }
45
64
 
46
- interface SkyHrefResolver {
47
- resolveHref(param: {
48
- url: string;
49
- }): Promise<SkyHref>;
50
- }
51
-
65
+ /**
66
+ * Parameters for resolving a link.
67
+ */
52
68
  interface SkyHrefResolverArgs {
69
+ /**
70
+ * The link to resolve.
71
+ */
53
72
  url: string;
54
73
  }
55
74
 
56
75
  /**
57
- * Return the link as-is.
76
+ * A contract for resolving the links used by the `skyHref` directive.
77
+ */
78
+ interface SkyHrefResolver {
79
+ /**
80
+ * Resolves a link's final URL and whether the current user may access it.
81
+ */
82
+ resolveHref(args: SkyHrefResolverArgs): Promise<SkyHref>;
83
+ }
84
+
85
+ /**
86
+ * The resolver used by the `skyHref` directive. This default implementation returns the link
87
+ * as-is and grants access to every user. Provide your own implementation to control how links
88
+ * are resolved.
58
89
  */
59
90
  declare class SkyHrefResolverService implements SkyHrefResolver {
91
+ /**
92
+ * Resolves a link's final URL and whether the current user may access it.
93
+ */
60
94
  resolveHref(args: SkyHrefResolverArgs): Promise<SkyHref>;
61
95
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefResolverService, never>;
62
96
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyHrefResolverService>;
63
97
  }
64
98
 
99
+ /**
100
+ * The change event emitted when a link's availability changes.
101
+ */
65
102
  interface SkyHrefChange {
103
+ /**
104
+ * Whether the current user may access the link.
105
+ */
66
106
  userHasAccess: boolean;
67
107
  }
68
108
 
@@ -102,6 +142,9 @@ declare class SkyHrefDirective {
102
142
  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>;
103
143
  }
104
144
 
145
+ /**
146
+ * Provides the `skyHref` directive.
147
+ */
105
148
  declare class SkyHrefModule {
106
149
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefModule, never>;
107
150
  static ɵmod: i0.ɵɵNgModuleDeclaration<SkyHrefModule, [typeof SkyHrefDirective], never, [typeof SkyHrefDirective]>;