@skyux/router 12.0.0-alpha.3 → 12.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/skyux-router-testing.mjs +40 -40
- package/fesm2022/skyux-router-testing.mjs.map +1 -1
- package/fesm2022/skyux-router.mjs +63 -69
- package/fesm2022/skyux-router.mjs.map +1 -1
- package/lib/modules/href/href.directive.d.ts +2 -6
- package/lib/modules/href/href.module.d.ts +0 -3
- package/lib/modules/link/link.module.d.ts +0 -3
- package/package.json +3 -3
- package/testing/modules/href/href-harness-filters.d.ts +0 -1
- package/testing/public-api.d.ts +2 -1
|
@@ -1,7 +1,46 @@
|
|
|
1
|
+
import { SkyComponentHarness } from '@skyux/core/testing';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
3
4
|
import { SkyHrefModule, SkyHrefResolverService } from '@skyux/router';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Allows interaction with a SkyHref directive during testing.
|
|
8
|
+
*/
|
|
9
|
+
class SkyHrefHarness extends SkyComponentHarness {
|
|
10
|
+
static { this.hostSelector = '.sky-href'; }
|
|
11
|
+
/**
|
|
12
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
13
|
+
* `SkyHrefHarness` that meets certain criteria.
|
|
14
|
+
*/
|
|
15
|
+
static with(filters) {
|
|
16
|
+
return this.getDataSkyIdPredicate(filters);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gets the href attribute of the host element.
|
|
20
|
+
*/
|
|
21
|
+
async getHref() {
|
|
22
|
+
return await (await this.host()).getAttribute('href');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Gets the visible text.
|
|
26
|
+
*/
|
|
27
|
+
async getText() {
|
|
28
|
+
return await this.isVisible().then(async (visible) => {
|
|
29
|
+
if (visible) {
|
|
30
|
+
return await (await this.host()).text();
|
|
31
|
+
}
|
|
32
|
+
return '';
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns true if the text is visible.
|
|
37
|
+
*/
|
|
38
|
+
async isVisible() {
|
|
39
|
+
return await (await this.host())
|
|
40
|
+
.matchesSelector('[hidden]')
|
|
41
|
+
.then((hidden) => !hidden);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
5
44
|
|
|
6
45
|
const MockUserHasAccess = new InjectionToken('MockUserHasAccess');
|
|
7
46
|
/**
|
|
@@ -74,45 +113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
74
113
|
}]
|
|
75
114
|
}] });
|
|
76
115
|
|
|
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
116
|
/**
|
|
117
117
|
* Generated bundle index. Do not edit.
|
|
118
118
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-router-testing.mjs","sources":["../../../../../libs/components/router/testing/src/modules/href/href-
|
|
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 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;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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|
@@ -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 { Directive, Optional, Input, NgModule, Injectable, EventEmitter, inject, Renderer2, ElementRef, ApplicationRef, ChangeDetectorRef, DestroyRef, Output, HostListener } 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.
|
|
@@ -97,9 +100,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
97
100
|
type: Input
|
|
98
101
|
}] } });
|
|
99
102
|
|
|
100
|
-
/**
|
|
101
|
-
* @docsIncludeIds SkyAppLinkDirective, SkyAppLinkExternalDirective, SkyAppLinkQueryParams
|
|
102
|
-
*/
|
|
103
103
|
/* istanbul ignore next */
|
|
104
104
|
class SkyAppLinkModule {
|
|
105
105
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -132,6 +132,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
132
132
|
}] });
|
|
133
133
|
|
|
134
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
|
+
}
|
|
135
176
|
/**
|
|
136
177
|
* Provide a link as a string or as an array of strings to be joined by a slash to form a complete
|
|
137
178
|
* URL.
|
|
@@ -145,7 +186,7 @@ class SkyHrefDirective {
|
|
|
145
186
|
else {
|
|
146
187
|
this.#_skyHref = skyHref ? skyHref.join('/') : '';
|
|
147
188
|
}
|
|
148
|
-
|
|
189
|
+
this.#checkRouteAccess();
|
|
149
190
|
}
|
|
150
191
|
get skyHref() {
|
|
151
192
|
return this.#_skyHref;
|
|
@@ -187,44 +228,8 @@ class SkyHrefDirective {
|
|
|
187
228
|
#hrefResolver;
|
|
188
229
|
#applicationRef;
|
|
189
230
|
#changeDetectorRef;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
* Emits whether the link is available (true) or not (false).
|
|
193
|
-
*/
|
|
194
|
-
this.skyHrefChange = new EventEmitter();
|
|
195
|
-
this.#route = false;
|
|
196
|
-
this.#href = '';
|
|
197
|
-
this.#_skyHref = '';
|
|
198
|
-
this.#_skyHrefElse = 'hide';
|
|
199
|
-
/* istanbul ignore next */
|
|
200
|
-
this.#getUrlTree = () => {
|
|
201
|
-
const href = this.#href.toLowerCase();
|
|
202
|
-
if (!href ||
|
|
203
|
-
!this.#skyAppConfig?.skyux.host?.url ||
|
|
204
|
-
!this.#skyAppConfig?.runtime?.app?.base) {
|
|
205
|
-
return false;
|
|
206
|
-
}
|
|
207
|
-
const baseUrl = (this.#skyAppConfig.skyux.host.url +
|
|
208
|
-
this.#skyAppConfig.runtime.app.base.substr(0, this.#skyAppConfig.runtime.app.base.length - 1)).toLowerCase();
|
|
209
|
-
if (href === baseUrl ||
|
|
210
|
-
// Make sure the base URL is not simply a partial match of the base URL plus additional
|
|
211
|
-
// characters after the base URL that are not "terminating" characters
|
|
212
|
-
href.indexOf(baseUrl + '/') === 0 ||
|
|
213
|
-
href.indexOf(baseUrl + '?') === 0) {
|
|
214
|
-
const routePath = this.#href.substring(baseUrl.length);
|
|
215
|
-
return this.#router.parseUrl(routePath);
|
|
216
|
-
}
|
|
217
|
-
return false;
|
|
218
|
-
};
|
|
219
|
-
this.#router = router;
|
|
220
|
-
this.#renderer = renderer;
|
|
221
|
-
this.#element = element;
|
|
222
|
-
this.#skyAppConfig = skyAppConfig;
|
|
223
|
-
this.#paramsProvider = paramsProvider;
|
|
224
|
-
this.#hrefResolver = hrefResolver;
|
|
225
|
-
this.#applicationRef = applicationRef;
|
|
226
|
-
this.#changeDetectorRef = changeDetectorRef;
|
|
227
|
-
}
|
|
231
|
+
#destroyRef;
|
|
232
|
+
#checkingSubscription;
|
|
228
233
|
onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
|
|
229
234
|
if (!this.#route || !this.#route.userHasAccess) {
|
|
230
235
|
return false;
|
|
@@ -259,28 +264,30 @@ class SkyHrefDirective {
|
|
|
259
264
|
}
|
|
260
265
|
this.skyHrefChange.emit({ userHasAccess: !change.hidden });
|
|
261
266
|
}
|
|
262
|
-
|
|
267
|
+
#checkRouteAccess() {
|
|
263
268
|
this.#route = {
|
|
264
269
|
url: this.skyHref,
|
|
265
270
|
userHasAccess: false,
|
|
266
271
|
};
|
|
267
|
-
/* istanbul ignore else */
|
|
268
272
|
if (this.#hrefResolver && this.skyHref) {
|
|
269
273
|
this.#applyChanges(this.#getChanges());
|
|
274
|
+
this.#checkingSubscription?.unsubscribe();
|
|
270
275
|
try {
|
|
271
|
-
|
|
276
|
+
this.#checkingSubscription = from(this.#hrefResolver.resolveHref({ url: this.skyHref }))
|
|
277
|
+
.pipe(catchError(() => of({
|
|
272
278
|
url: this.skyHref,
|
|
273
|
-
|
|
274
|
-
this.#
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
279
|
+
userHasAccess: false,
|
|
280
|
+
})), takeUntilDestroyed(this.#destroyRef), finalize(() => {
|
|
281
|
+
this.#applyChanges(this.#getChanges());
|
|
282
|
+
}))
|
|
283
|
+
.subscribe((route) => {
|
|
284
|
+
this.#route = { ...route };
|
|
278
285
|
this.#changeDetectorRef.markForCheck();
|
|
279
286
|
this.#applicationRef.tick();
|
|
280
|
-
}
|
|
287
|
+
});
|
|
281
288
|
}
|
|
282
289
|
catch {
|
|
283
|
-
|
|
290
|
+
// Unable to resolve.
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
293
|
else {
|
|
@@ -313,7 +320,7 @@ class SkyHrefDirective {
|
|
|
313
320
|
}
|
|
314
321
|
/* istanbul ignore next */
|
|
315
322
|
#getUrlTree;
|
|
316
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefDirective, deps: [
|
|
323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
317
324
|
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 }); }
|
|
318
325
|
}
|
|
319
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefDirective, decorators: [{
|
|
@@ -322,17 +329,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
322
329
|
selector: '[skyHref]',
|
|
323
330
|
standalone: false,
|
|
324
331
|
}]
|
|
325
|
-
}],
|
|
326
|
-
type: Optional
|
|
327
|
-
}] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
|
|
328
|
-
type: Optional
|
|
329
|
-
}] }, { type: SkyHrefResolverService, decorators: [{
|
|
330
|
-
type: Optional
|
|
331
|
-
}] }, { type: i0.ApplicationRef, decorators: [{
|
|
332
|
-
type: Optional
|
|
333
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
334
|
-
type: Optional
|
|
335
|
-
}] }], propDecorators: { skyHref: [{
|
|
332
|
+
}], propDecorators: { skyHref: [{
|
|
336
333
|
type: Input
|
|
337
334
|
}], queryParams: [{
|
|
338
335
|
type: Input
|
|
@@ -351,9 +348,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
351
348
|
]]
|
|
352
349
|
}] } });
|
|
353
350
|
|
|
354
|
-
/**
|
|
355
|
-
* @docsIncludeIds SkyHrefDirective, SkyHrefResolver, SkyHrefResolverService, SkyHrefChange, SkyHrefQueryParams, SkyHrefResolverArgs, SkyHref, SkyHrefHarness, SkyHrefTestingModule
|
|
356
|
-
*/
|
|
357
351
|
class SkyHrefModule {
|
|
358
352
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
359
353
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], exports: [SkyHrefDirective] }); }
|
|
@@ -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/**\n * @docsIncludeIds SkyAppLinkDirective, SkyAppLinkExternalDirective, SkyAppLinkQueryParams\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/**\n * @docsIncludeIds SkyHrefDirective, SkyHrefResolver, SkyHrefResolverService, SkyHrefChange, SkyHrefQueryParams, SkyHrefResolverArgs, SkyHref, SkyHrefHarness, SkyHrefTestingModule\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,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,EAC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,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,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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BAChC,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 {
|
|
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,
|
|
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
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./href.directive";
|
|
3
|
-
/**
|
|
4
|
-
* @docsIncludeIds SkyHrefDirective, SkyHrefResolver, SkyHrefResolverService, SkyHrefChange, SkyHrefQueryParams, SkyHrefResolverArgs, SkyHref, SkyHrefHarness, SkyHrefTestingModule
|
|
5
|
-
*/
|
|
6
3
|
export declare class SkyHrefModule {
|
|
7
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefModule, never>;
|
|
8
5
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyHrefModule, [typeof i1.SkyHrefDirective], never, [typeof i1.SkyHrefDirective]>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./link.directive";
|
|
3
3
|
import * as i2 from "./link-external.directive";
|
|
4
|
-
/**
|
|
5
|
-
* @docsIncludeIds SkyAppLinkDirective, SkyAppLinkExternalDirective, SkyAppLinkQueryParams
|
|
6
|
-
*/
|
|
7
4
|
export declare class SkyAppLinkModule {
|
|
8
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyAppLinkModule, never>;
|
|
9
6
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyAppLinkModule, [typeof i1.SkyAppLinkDirective, typeof i2.SkyAppLinkExternalDirective], never, [typeof i1.SkyAppLinkDirective, typeof i2.SkyAppLinkExternalDirective]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/router",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.5",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@angular/common": "^19.0.5",
|
|
21
21
|
"@angular/core": "^19.0.5",
|
|
22
22
|
"@angular/router": "^19.0.5",
|
|
23
|
-
"@skyux/config": "12.0.0-alpha.
|
|
24
|
-
"@skyux/core": "12.0.0-alpha.
|
|
23
|
+
"@skyux/config": "12.0.0-alpha.5",
|
|
24
|
+
"@skyux/core": "12.0.0-alpha.5"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"tslib": "^2.8.1"
|
package/testing/public-api.d.ts
CHANGED
|
@@ -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';
|