@skyux/router 5.7.2 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/index.mjs +13 -0
- package/esm2020/lib/modules/href/href-query-params.mjs +2 -0
- package/esm2020/lib/modules/href/href-resolver.mjs +2 -0
- package/esm2020/lib/modules/href/href-resolver.service.mjs +19 -0
- package/esm2020/lib/modules/href/href.directive.mjs +195 -0
- package/esm2020/lib/modules/href/href.module.mjs +18 -0
- package/esm2020/lib/modules/href/types/href-resolver.args.mjs +2 -0
- package/esm2020/lib/modules/href/types/href.mjs +2 -0
- package/esm2020/lib/modules/link/link-external.directive.mjs +58 -0
- package/esm2020/lib/modules/link/link-query-params.mjs +2 -0
- package/esm2020/lib/modules/link/link.directive.mjs +43 -0
- package/esm2020/lib/modules/link/link.module.mjs +18 -0
- package/esm2020/skyux-router.mjs +5 -0
- package/fesm2015/skyux-router.mjs +340 -0
- package/fesm2015/skyux-router.mjs.map +1 -0
- package/{fesm2015/skyux-router.js → fesm2020/skyux-router.mjs} +27 -31
- package/fesm2020/skyux-router.mjs.map +1 -0
- package/package.json +24 -11
- package/bundles/skyux-router.umd.js +0 -720
- package/esm2015/index.js +0 -13
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/href/href-query-params.js +0 -2
- package/esm2015/lib/modules/href/href-query-params.js.map +0 -1
- package/esm2015/lib/modules/href/href-resolver.js +0 -2
- package/esm2015/lib/modules/href/href-resolver.js.map +0 -1
- package/esm2015/lib/modules/href/href-resolver.service.js +0 -19
- package/esm2015/lib/modules/href/href-resolver.service.js.map +0 -1
- package/esm2015/lib/modules/href/href.directive.js +0 -197
- package/esm2015/lib/modules/href/href.directive.js.map +0 -1
- package/esm2015/lib/modules/href/href.module.js +0 -18
- package/esm2015/lib/modules/href/href.module.js.map +0 -1
- package/esm2015/lib/modules/href/types/href-resolver.args.js +0 -2
- package/esm2015/lib/modules/href/types/href-resolver.args.js.map +0 -1
- package/esm2015/lib/modules/href/types/href.js +0 -2
- package/esm2015/lib/modules/href/types/href.js.map +0 -1
- package/esm2015/lib/modules/link/link-external.directive.js +0 -59
- package/esm2015/lib/modules/link/link-external.directive.js.map +0 -1
- package/esm2015/lib/modules/link/link-query-params.js +0 -2
- package/esm2015/lib/modules/link/link-query-params.js.map +0 -1
- package/esm2015/lib/modules/link/link.directive.js +0 -44
- package/esm2015/lib/modules/link/link.directive.js.map +0 -1
- package/esm2015/lib/modules/link/link.module.js +0 -18
- package/esm2015/lib/modules/link/link.module.js.map +0 -1
- package/esm2015/skyux-router.js +0 -5
- package/esm2015/skyux-router.js.map +0 -1
- package/fesm2015/skyux-router.js.map +0 -1
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Optional, Input, NgModule, Injectable, HostListener } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { PathLocationStrategy, CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/router';
|
|
6
|
+
import { RouterLinkWithHref } from '@angular/router';
|
|
7
|
+
import * as i3 from '@skyux/core';
|
|
8
|
+
import * as i4 from '@skyux/config';
|
|
9
|
+
import { HttpParams } from '@angular/common/http';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `skyHref` directive instead.
|
|
13
|
+
*/
|
|
14
|
+
class SkyAppLinkExternalDirective extends RouterLinkWithHref {
|
|
15
|
+
constructor(router, route, platformLocation, window, skyAppConfig, paramsProvider, hostConfig) {
|
|
16
|
+
super(router, route, new PathLocationStrategy(platformLocation, hostConfig ? hostConfig.host.url : skyAppConfig.skyux.host.url));
|
|
17
|
+
this.window = window;
|
|
18
|
+
this.skyAppConfig = skyAppConfig;
|
|
19
|
+
this.paramsProvider = paramsProvider;
|
|
20
|
+
if (this.window.nativeWindow.window.name &&
|
|
21
|
+
this.window.nativeWindow.window.name !== '') {
|
|
22
|
+
this.target = this.window.nativeWindow.window.name;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.target = '_top';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
set skyAppLinkExternal(commands) {
|
|
29
|
+
this.routerLink = commands;
|
|
30
|
+
}
|
|
31
|
+
ngOnChanges(changes) {
|
|
32
|
+
var _a;
|
|
33
|
+
this.queryParams = this.mergeQueryParams((_a = changes.queryParams) === null || _a === void 0 ? void 0 : _a.currentValue);
|
|
34
|
+
super.ngOnChanges(changes);
|
|
35
|
+
}
|
|
36
|
+
mergeQueryParams(queryParams) {
|
|
37
|
+
const skyuxParams = this.skyAppConfig
|
|
38
|
+
? this.skyAppConfig.runtime.params.getAll()
|
|
39
|
+
: this.paramsProvider.params.getAll();
|
|
40
|
+
return Object.assign({}, this.queryParams, queryParams, skyuxParams);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
SkyAppLinkExternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkExternalDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.PlatformLocation }, { token: i3.SkyAppWindowRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: i4.SkyAppConfigHost, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
SkyAppLinkExternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyAppLinkExternalDirective, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
|
|
46
|
+
type: Directive,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: '[skyAppLinkExternal]',
|
|
49
|
+
}]
|
|
50
|
+
}], ctorParameters: function () {
|
|
51
|
+
return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.PlatformLocation }, { type: i3.SkyAppWindowRef }, { type: i4.SkyAppConfig, decorators: [{
|
|
52
|
+
type: Optional
|
|
53
|
+
}] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
|
|
54
|
+
type: Optional
|
|
55
|
+
}] }, { type: i4.SkyAppConfigHost, decorators: [{
|
|
56
|
+
type: Optional
|
|
57
|
+
}] }];
|
|
58
|
+
}, propDecorators: { skyAppLinkExternal: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}] } });
|
|
61
|
+
|
|
62
|
+
class SkyAppLinkDirective extends RouterLinkWithHref {
|
|
63
|
+
constructor(router, route, locationStrategy, skyAppConfig, paramsProvider) {
|
|
64
|
+
super(router, route, locationStrategy);
|
|
65
|
+
this.skyAppConfig = skyAppConfig;
|
|
66
|
+
this.paramsProvider = paramsProvider;
|
|
67
|
+
}
|
|
68
|
+
set skyAppLink(commands) {
|
|
69
|
+
this.routerLink = commands;
|
|
70
|
+
}
|
|
71
|
+
ngOnChanges(changes) {
|
|
72
|
+
var _a;
|
|
73
|
+
this.queryParams = this.mergeQueryParams((_a = changes.queryParams) === null || _a === void 0 ? void 0 : _a.currentValue);
|
|
74
|
+
super.ngOnChanges(changes);
|
|
75
|
+
}
|
|
76
|
+
mergeQueryParams(queryParams) {
|
|
77
|
+
const skyuxParams = this.skyAppConfig
|
|
78
|
+
? this.skyAppConfig.runtime.params.getAll(true)
|
|
79
|
+
: this.paramsProvider.params.getAll(true);
|
|
80
|
+
return Object.assign({}, this.queryParams, queryParams, skyuxParams);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
SkyAppLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.LocationStrategy }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
+
SkyAppLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyAppLinkDirective, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
|
|
86
|
+
type: Directive,
|
|
87
|
+
args: [{
|
|
88
|
+
selector: '[skyAppLink]',
|
|
89
|
+
}]
|
|
90
|
+
}], ctorParameters: function () {
|
|
91
|
+
return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.LocationStrategy }, { type: i4.SkyAppConfig, decorators: [{
|
|
92
|
+
type: Optional
|
|
93
|
+
}] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
|
|
94
|
+
type: Optional
|
|
95
|
+
}] }];
|
|
96
|
+
}, propDecorators: { skyAppLink: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}] } });
|
|
99
|
+
|
|
100
|
+
/* istanbul ignore next */
|
|
101
|
+
class SkyAppLinkModule {
|
|
102
|
+
}
|
|
103
|
+
SkyAppLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
104
|
+
SkyAppLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] });
|
|
105
|
+
SkyAppLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, decorators: [{
|
|
107
|
+
type: NgModule,
|
|
108
|
+
args: [{
|
|
109
|
+
declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],
|
|
110
|
+
exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective],
|
|
111
|
+
}]
|
|
112
|
+
}] });
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Return the link as-is.
|
|
116
|
+
*/
|
|
117
|
+
class SkyHrefResolverService {
|
|
118
|
+
resolveHref(args) {
|
|
119
|
+
return Promise.resolve({
|
|
120
|
+
url: args.url,
|
|
121
|
+
userHasAccess: true,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
SkyHrefResolverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
126
|
+
SkyHrefResolverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService });
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService, decorators: [{
|
|
128
|
+
type: Injectable
|
|
129
|
+
}] });
|
|
130
|
+
|
|
131
|
+
class SkyHrefDirective {
|
|
132
|
+
constructor(router, renderer, element, skyAppConfig, paramsProvider, hrefResolver, applicationRef, changeDetectorRef) {
|
|
133
|
+
this.router = router;
|
|
134
|
+
this.renderer = renderer;
|
|
135
|
+
this.element = element;
|
|
136
|
+
this.skyAppConfig = skyAppConfig;
|
|
137
|
+
this.paramsProvider = paramsProvider;
|
|
138
|
+
this.hrefResolver = hrefResolver;
|
|
139
|
+
this.applicationRef = applicationRef;
|
|
140
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
141
|
+
this._route = false;
|
|
142
|
+
this._skyHref = '';
|
|
143
|
+
this._skyHrefElse = 'hide';
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Provide a link as a string or as an array of strings to be joined by a slash to form a complete
|
|
147
|
+
* URL.
|
|
148
|
+
*
|
|
149
|
+
* @param skyHref
|
|
150
|
+
*/
|
|
151
|
+
set skyHref(skyHref) {
|
|
152
|
+
if (typeof skyHref === 'string') {
|
|
153
|
+
this._skyHref = skyHref;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
this._skyHref = skyHref.join('/');
|
|
157
|
+
}
|
|
158
|
+
this.checkRouteAccess();
|
|
159
|
+
}
|
|
160
|
+
set skyHrefElse(value) {
|
|
161
|
+
this._skyHrefElse = value;
|
|
162
|
+
this.applyChanges(this.getChanges());
|
|
163
|
+
}
|
|
164
|
+
/* istanbul ignore next */
|
|
165
|
+
onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
|
|
166
|
+
if (!this._route || !this._route.userHasAccess) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
const target = this.element.nativeElement.getAttribute('target');
|
|
173
|
+
if (typeof target === 'string' && target !== '_self') {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
const urlTree = this.getUrlTree();
|
|
177
|
+
if (urlTree) {
|
|
178
|
+
this.router.navigateByUrl(urlTree);
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
applyChanges(change) {
|
|
184
|
+
this.renderer.addClass(this.element.nativeElement, 'sky-href');
|
|
185
|
+
if (change.hidden) {
|
|
186
|
+
this.renderer.setAttribute(this.element.nativeElement, 'hidden', 'hidden');
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'hidden');
|
|
190
|
+
}
|
|
191
|
+
if (change.href) {
|
|
192
|
+
this.renderer.setAttribute(this.element.nativeElement, 'href', change.href);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'href');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
checkRouteAccess() {
|
|
199
|
+
this._route = {
|
|
200
|
+
url: this._skyHref,
|
|
201
|
+
userHasAccess: false,
|
|
202
|
+
};
|
|
203
|
+
/* istanbul ignore else */
|
|
204
|
+
if (this.hrefResolver && this._skyHref) {
|
|
205
|
+
this.applyChanges(this.getChanges());
|
|
206
|
+
try {
|
|
207
|
+
this.hrefResolver.resolveHref({ url: this._skyHref }).then((route) => {
|
|
208
|
+
this._route = Object.assign({}, route);
|
|
209
|
+
this.applyChanges(this.getChanges());
|
|
210
|
+
/* istanbul ignore else */
|
|
211
|
+
if (this.changeDetectorRef && this.applicationRef) {
|
|
212
|
+
this.changeDetectorRef.markForCheck();
|
|
213
|
+
this.applicationRef.tick();
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
this.applyChanges(this.getChanges());
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
// no resolver or skyHref is falsy
|
|
223
|
+
this._route.userHasAccess = !!this._skyHref;
|
|
224
|
+
this.applyChanges(this.getChanges());
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
getChanges() {
|
|
228
|
+
const queryParams = {};
|
|
229
|
+
if (!this._route || !this._route.userHasAccess) {
|
|
230
|
+
return {
|
|
231
|
+
href: '',
|
|
232
|
+
hidden: this._skyHrefElse === 'hide',
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
const [beforeFragment, fragment] = this._route.url.split('#', 2);
|
|
237
|
+
const [baseUrl, search] = beforeFragment.split('?', 2);
|
|
238
|
+
if (search) {
|
|
239
|
+
const searchParams = new HttpParams({ fromString: search });
|
|
240
|
+
searchParams.keys().forEach((key) => {
|
|
241
|
+
queryParams[key] = searchParams.get(key);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
const queryParamsMerged = new HttpParams({
|
|
245
|
+
fromObject: Object.assign({}, this.getSkyuxParams(), queryParams),
|
|
246
|
+
});
|
|
247
|
+
this._href =
|
|
248
|
+
baseUrl +
|
|
249
|
+
(queryParamsMerged.keys().length > 0
|
|
250
|
+
? '?' + queryParamsMerged.toString()
|
|
251
|
+
: '') +
|
|
252
|
+
(fragment ? `#${fragment}` : '');
|
|
253
|
+
return {
|
|
254
|
+
href: this._href,
|
|
255
|
+
hidden: false,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
getSkyuxParams() {
|
|
260
|
+
var _a, _b;
|
|
261
|
+
return typeof ((_b = (_a = this.skyAppConfig) === null || _a === void 0 ? void 0 : _a.runtime.params) === null || _b === void 0 ? void 0 : _b.getAll) === 'function'
|
|
262
|
+
? this.skyAppConfig.runtime.params.getAll(true)
|
|
263
|
+
: this.paramsProvider.params.getAll(true);
|
|
264
|
+
}
|
|
265
|
+
/* istanbul ignore next */
|
|
266
|
+
getUrlTree() {
|
|
267
|
+
var _a, _b, _c, _d, _e;
|
|
268
|
+
const href = this._href.toLowerCase();
|
|
269
|
+
if (!href ||
|
|
270
|
+
!((_b = (_a = this.skyAppConfig) === null || _a === void 0 ? void 0 : _a.skyux.host) === null || _b === void 0 ? void 0 : _b.url) ||
|
|
271
|
+
!((_e = (_d = (_c = this.skyAppConfig) === null || _c === void 0 ? void 0 : _c.runtime) === null || _d === void 0 ? void 0 : _d.app) === null || _e === void 0 ? void 0 : _e.base)) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
const baseUrl = (this.skyAppConfig.skyux.host.url +
|
|
275
|
+
this.skyAppConfig.runtime.app.base.substr(0, this.skyAppConfig.runtime.app.base.length - 1)).toLowerCase();
|
|
276
|
+
if (href === baseUrl ||
|
|
277
|
+
// Make sure the base URL is not simply a partial match of the base URL plus additional
|
|
278
|
+
// characters after the base URL that are not "terminating" characters
|
|
279
|
+
href.indexOf(baseUrl + '/') === 0 ||
|
|
280
|
+
href.indexOf(baseUrl + '?') === 0) {
|
|
281
|
+
const routePath = this._href.substring(baseUrl.length);
|
|
282
|
+
return this.router.parseUrl(routePath);
|
|
283
|
+
}
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
SkyHrefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefDirective, deps: [{ token: i1.Router }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: SkyHrefResolverService, optional: true }, { token: i0.ApplicationRef, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
288
|
+
SkyHrefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyHrefDirective, selector: "[skyHref]", inputs: { skyHref: "skyHref", skyHrefElse: "skyHrefElse" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" } }, ngImport: i0 });
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefDirective, decorators: [{
|
|
290
|
+
type: Directive,
|
|
291
|
+
args: [{
|
|
292
|
+
selector: '[skyHref]',
|
|
293
|
+
}]
|
|
294
|
+
}], ctorParameters: function () {
|
|
295
|
+
return [{ type: i1.Router }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i4.SkyAppConfig, decorators: [{
|
|
296
|
+
type: Optional
|
|
297
|
+
}] }, { type: i4.SkyAppRuntimeConfigParamsProvider, decorators: [{
|
|
298
|
+
type: Optional
|
|
299
|
+
}] }, { type: SkyHrefResolverService, decorators: [{
|
|
300
|
+
type: Optional
|
|
301
|
+
}] }, { type: i0.ApplicationRef, decorators: [{
|
|
302
|
+
type: Optional
|
|
303
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
304
|
+
type: Optional
|
|
305
|
+
}] }];
|
|
306
|
+
}, propDecorators: { skyHref: [{
|
|
307
|
+
type: Input
|
|
308
|
+
}], skyHrefElse: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], onClick: [{
|
|
311
|
+
type: HostListener,
|
|
312
|
+
args: ['click', [
|
|
313
|
+
'$event.button',
|
|
314
|
+
'$event.ctrlKey',
|
|
315
|
+
'$event.shiftKey',
|
|
316
|
+
'$event.altKey',
|
|
317
|
+
'$event.metaKey',
|
|
318
|
+
]]
|
|
319
|
+
}] } });
|
|
320
|
+
|
|
321
|
+
class SkyHrefModule {
|
|
322
|
+
}
|
|
323
|
+
SkyHrefModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
324
|
+
SkyHrefModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], imports: [CommonModule], exports: [SkyHrefDirective] });
|
|
325
|
+
SkyHrefModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, imports: [[CommonModule]] });
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, decorators: [{
|
|
327
|
+
type: NgModule,
|
|
328
|
+
args: [{
|
|
329
|
+
declarations: [SkyHrefDirective],
|
|
330
|
+
exports: [SkyHrefDirective],
|
|
331
|
+
imports: [CommonModule],
|
|
332
|
+
}]
|
|
333
|
+
}] });
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Generated bundle index. Do not edit.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
export { SkyAppLinkModule, SkyHrefModule, SkyHrefResolverService, SkyHrefDirective as λ1, SkyAppLinkExternalDirective as λ2, SkyAppLinkDirective as λ3 };
|
|
340
|
+
//# sourceMappingURL=skyux-router.mjs.map
|
|
@@ -0,0 +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/skyux-router.ts"],"sourcesContent":["import { PathLocationStrategy, PlatformLocation } from '@angular/common';\nimport {\n Directive,\n Input,\n OnChanges,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLinkWithHref } 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})\nexport class SkyAppLinkExternalDirective\n extends RouterLinkWithHref\n implements OnChanges\n{\n @Input()\n set skyAppLinkExternal(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n platformLocation: PlatformLocation,\n private window: SkyAppWindowRef,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() hostConfig?: SkyAppConfigHost\n ) {\n super(\n router,\n route,\n new PathLocationStrategy(\n platformLocation,\n hostConfig ? hostConfig.host.url : skyAppConfig.skyux.host.url\n )\n );\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 ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);\n super.ngOnChanges(changes);\n }\n\n private mergeQueryParams(\n queryParams: SkyAppLinkQueryParams\n ): 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 Input,\n OnChanges,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLinkWithHref } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n@Directive({\n selector: '[skyAppLink]',\n})\nexport class SkyAppLinkDirective\n extends RouterLinkWithHref\n implements OnChanges\n{\n @Input()\n set skyAppLink(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n locationStrategy: LocationStrategy,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider\n ) {\n super(router, route, locationStrategy);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);\n super.ngOnChanges(changes);\n }\n\n private mergeQueryParams(\n queryParams: SkyAppLinkQueryParams\n ): 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 { HttpParams } from '@angular/common/http';\nimport {\n ApplicationRef,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Input,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport { Router, UrlTree } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyHrefQueryParams } from './href-query-params';\nimport { SkyHrefResolverService } from './href-resolver.service';\nimport { SkyHref } from './types/href';\n\ntype HrefChanges = { href: string; hidden: boolean };\n\n@Directive({\n selector: '[skyHref]',\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[]) {\n if (typeof skyHref === 'string') {\n this._skyHref = skyHref;\n } else {\n this._skyHref = skyHref.join('/');\n }\n\n this.checkRouteAccess();\n }\n\n @Input()\n public set skyHrefElse(value: 'hide' | 'unlink') {\n this._skyHrefElse = value;\n this.applyChanges(this.getChanges());\n }\n\n private _route: SkyHref | false = false;\n\n private _href: string;\n\n private _skyHref = '';\n\n private _skyHrefElse: 'hide' | 'unlink' = 'hide';\n\n constructor(\n private router: Router,\n private renderer: Renderer2,\n private element: ElementRef,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() private hrefResolver?: SkyHrefResolverService,\n @Optional() private applicationRef?: ApplicationRef,\n @Optional() private changeDetectorRef?: ChangeDetectorRef\n ) {}\n\n /* istanbul ignore next */\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 this.router.navigateByUrl(urlTree);\n return false;\n }\n return true;\n }\n\n private applyChanges(change: HrefChanges) {\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 }\n\n private checkRouteAccess() {\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 this.hrefResolver.resolveHref({ url: this._skyHref }).then((route) => {\n this._route = { ...route };\n this.applyChanges(this.getChanges());\n /* istanbul ignore else */\n if (this.changeDetectorRef && this.applicationRef) {\n this.changeDetectorRef.markForCheck();\n this.applicationRef.tick();\n }\n });\n } catch (error) {\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 private getChanges(): HrefChanges {\n const queryParams: SkyHrefQueryParams = {};\n\n if (!this._route || !this._route.userHasAccess) {\n return {\n href: '',\n hidden: this._skyHrefElse === 'hide',\n };\n } else {\n const [beforeFragment, fragment] = this._route.url.split('#', 2);\n const [baseUrl, search] = beforeFragment.split('?', 2);\n\n if (search) {\n const searchParams = new HttpParams({ fromString: search });\n searchParams.keys().forEach((key) => {\n queryParams[key] = searchParams.get(key);\n });\n }\n\n const queryParamsMerged = new HttpParams({\n fromObject: Object.assign({}, this.getSkyuxParams(), queryParams),\n });\n\n this._href =\n baseUrl +\n (queryParamsMerged.keys().length > 0\n ? '?' + queryParamsMerged.toString()\n : '') +\n (fragment ? `#${fragment}` : '');\n return {\n href: this._href,\n hidden: false,\n };\n }\n }\n\n private getSkyuxParams(): SkyHrefQueryParams {\n return typeof this.skyAppConfig?.runtime.params?.getAll === 'function'\n ? this.skyAppConfig.runtime.params.getAll(true)\n : this.paramsProvider.params.getAll(true);\n }\n\n /* istanbul ignore next */\n private 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 { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyHrefDirective } from './href.directive';\n\n@NgModule({\n declarations: [SkyHrefDirective],\n exports: [SkyHrefDirective],\n imports: [CommonModule],\n})\nexport class SkyHrefModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i2","i3.SkyHrefResolverService"],"mappings":";;;;;;;;;;AAkBA;;AAEG;AAIG,MAAO,2BACX,SAAQ,kBAAkB,CAAA;AAQ1B,IAAA,WAAA,CACE,MAAc,EACd,KAAqB,EACrB,gBAAkC,EAC1B,MAAuB,EACX,YAA2B,EAC3B,cAAkD,EAC1D,UAA6B,EAAA;AAEzC,QAAA,KAAK,CACH,MAAM,EACN,KAAK,EACL,IAAI,oBAAoB,CACtB,gBAAgB,EAChB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAC/D,CACF,CAAC;AAZM,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAiB;AACX,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAe;AAC3B,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoC;QAYtE,IACE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI;YACpC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,EAC3C;AACA,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;AACpD,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB,SAAA;KACF;IA/BD,IACI,kBAAkB,CAAC,QAAwB,EAAA;AAC7C,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;KAC5B;AA8BM,IAAA,WAAW,CAAC,OAAsB,EAAA;;AACvC,QAAA,IAAI,CAAC,WAAW,GAAG,IAA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= this.mergeQueryParams((_a = changes.queryParams) === null || _a === void 0 ? void 0 : _a.currentValue);
|
|
32
|
+
this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);
|
|
34
33
|
super.ngOnChanges(changes);
|
|
35
34
|
}
|
|
36
35
|
mergeQueryParams(queryParams) {
|
|
@@ -40,9 +39,9 @@ class SkyAppLinkExternalDirective extends RouterLinkWithHref {
|
|
|
40
39
|
return Object.assign({}, this.queryParams, queryParams, skyuxParams);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
SkyAppLinkExternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
SkyAppLinkExternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
SkyAppLinkExternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkExternalDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { 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 });
|
|
43
|
+
SkyAppLinkExternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyAppLinkExternalDirective, selector: "[skyAppLinkExternal]", inputs: { skyAppLinkExternal: "skyAppLinkExternal" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkExternalDirective, decorators: [{
|
|
46
45
|
type: Directive,
|
|
47
46
|
args: [{
|
|
48
47
|
selector: '[skyAppLinkExternal]',
|
|
@@ -67,8 +66,7 @@ class SkyAppLinkDirective extends RouterLinkWithHref {
|
|
|
67
66
|
this.routerLink = commands;
|
|
68
67
|
}
|
|
69
68
|
ngOnChanges(changes) {
|
|
70
|
-
|
|
71
|
-
this.queryParams = this.mergeQueryParams((_a = changes.queryParams) === null || _a === void 0 ? void 0 : _a.currentValue);
|
|
69
|
+
this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);
|
|
72
70
|
super.ngOnChanges(changes);
|
|
73
71
|
}
|
|
74
72
|
mergeQueryParams(queryParams) {
|
|
@@ -78,9 +76,9 @@ class SkyAppLinkDirective extends RouterLinkWithHref {
|
|
|
78
76
|
return Object.assign({}, this.queryParams, queryParams, skyuxParams);
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
|
-
SkyAppLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
82
|
-
SkyAppLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
+
SkyAppLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkDirective, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.LocationStrategy }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
80
|
+
SkyAppLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyAppLinkDirective, selector: "[skyAppLink]", inputs: { skyAppLink: "skyAppLink" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkDirective, decorators: [{
|
|
84
82
|
type: Directive,
|
|
85
83
|
args: [{
|
|
86
84
|
selector: '[skyAppLink]',
|
|
@@ -96,10 +94,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
96
94
|
/* istanbul ignore next */
|
|
97
95
|
class SkyAppLinkModule {
|
|
98
96
|
}
|
|
99
|
-
SkyAppLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
100
|
-
SkyAppLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
101
|
-
SkyAppLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
97
|
+
SkyAppLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
98
|
+
SkyAppLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective], exports: [SkyAppLinkDirective, SkyAppLinkExternalDirective] });
|
|
99
|
+
SkyAppLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule });
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyAppLinkModule, decorators: [{
|
|
103
101
|
type: NgModule,
|
|
104
102
|
args: [{
|
|
105
103
|
declarations: [SkyAppLinkDirective, SkyAppLinkExternalDirective],
|
|
@@ -118,9 +116,9 @@ class SkyHrefResolverService {
|
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
|
-
SkyHrefResolverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
122
|
-
SkyHrefResolverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
SkyHrefResolverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
120
|
+
SkyHrefResolverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService });
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefResolverService, decorators: [{
|
|
124
122
|
type: Injectable
|
|
125
123
|
}] });
|
|
126
124
|
|
|
@@ -201,7 +199,7 @@ class SkyHrefDirective {
|
|
|
201
199
|
this.applyChanges(this.getChanges());
|
|
202
200
|
try {
|
|
203
201
|
this.hrefResolver.resolveHref({ url: this._skyHref }).then((route) => {
|
|
204
|
-
this._route =
|
|
202
|
+
this._route = { ...route };
|
|
205
203
|
this.applyChanges(this.getChanges());
|
|
206
204
|
/* istanbul ignore else */
|
|
207
205
|
if (this.changeDetectorRef && this.applicationRef) {
|
|
@@ -253,18 +251,16 @@ class SkyHrefDirective {
|
|
|
253
251
|
}
|
|
254
252
|
}
|
|
255
253
|
getSkyuxParams() {
|
|
256
|
-
|
|
257
|
-
return typeof ((_b = (_a = this.skyAppConfig) === null || _a === void 0 ? void 0 : _a.runtime.params) === null || _b === void 0 ? void 0 : _b.getAll) === 'function'
|
|
254
|
+
return typeof this.skyAppConfig?.runtime.params?.getAll === 'function'
|
|
258
255
|
? this.skyAppConfig.runtime.params.getAll(true)
|
|
259
256
|
: this.paramsProvider.params.getAll(true);
|
|
260
257
|
}
|
|
261
258
|
/* istanbul ignore next */
|
|
262
259
|
getUrlTree() {
|
|
263
|
-
var _a, _b, _c, _d, _e;
|
|
264
260
|
const href = this._href.toLowerCase();
|
|
265
261
|
if (!href ||
|
|
266
|
-
!
|
|
267
|
-
!
|
|
262
|
+
!this.skyAppConfig?.skyux.host?.url ||
|
|
263
|
+
!this.skyAppConfig?.runtime?.app?.base) {
|
|
268
264
|
return false;
|
|
269
265
|
}
|
|
270
266
|
const baseUrl = (this.skyAppConfig.skyux.host.url +
|
|
@@ -280,9 +276,9 @@ class SkyHrefDirective {
|
|
|
280
276
|
return false;
|
|
281
277
|
}
|
|
282
278
|
}
|
|
283
|
-
SkyHrefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
284
|
-
SkyHrefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
279
|
+
SkyHrefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefDirective, deps: [{ token: i1.Router }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.SkyAppConfig, optional: true }, { token: i4.SkyAppRuntimeConfigParamsProvider, optional: true }, { token: SkyHrefResolverService, optional: true }, { token: i0.ApplicationRef, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
280
|
+
SkyHrefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: SkyHrefDirective, selector: "[skyHref]", inputs: { skyHref: "skyHref", skyHrefElse: "skyHrefElse" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" } }, ngImport: i0 });
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefDirective, decorators: [{
|
|
286
282
|
type: Directive,
|
|
287
283
|
args: [{
|
|
288
284
|
selector: '[skyHref]',
|
|
@@ -314,10 +310,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
314
310
|
|
|
315
311
|
class SkyHrefModule {
|
|
316
312
|
}
|
|
317
|
-
SkyHrefModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
318
|
-
SkyHrefModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
319
|
-
SkyHrefModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
313
|
+
SkyHrefModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
314
|
+
SkyHrefModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, declarations: [SkyHrefDirective], imports: [CommonModule], exports: [SkyHrefDirective] });
|
|
315
|
+
SkyHrefModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, imports: [[CommonModule]] });
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyHrefModule, decorators: [{
|
|
321
317
|
type: NgModule,
|
|
322
318
|
args: [{
|
|
323
319
|
declarations: [SkyHrefDirective],
|
|
@@ -331,4 +327,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
331
327
|
*/
|
|
332
328
|
|
|
333
329
|
export { SkyAppLinkModule, SkyHrefModule, SkyHrefResolverService, SkyHrefDirective as λ1, SkyAppLinkExternalDirective as λ2, SkyAppLinkDirective as λ3 };
|
|
334
|
-
//# sourceMappingURL=skyux-router.
|
|
330
|
+
//# sourceMappingURL=skyux-router.mjs.map
|
|
@@ -0,0 +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/skyux-router.ts"],"sourcesContent":["import { PathLocationStrategy, PlatformLocation } from '@angular/common';\nimport {\n Directive,\n Input,\n OnChanges,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLinkWithHref } 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})\nexport class SkyAppLinkExternalDirective\n extends RouterLinkWithHref\n implements OnChanges\n{\n @Input()\n set skyAppLinkExternal(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n platformLocation: PlatformLocation,\n private window: SkyAppWindowRef,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() hostConfig?: SkyAppConfigHost\n ) {\n super(\n router,\n route,\n new PathLocationStrategy(\n platformLocation,\n hostConfig ? hostConfig.host.url : skyAppConfig.skyux.host.url\n )\n );\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 ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);\n super.ngOnChanges(changes);\n }\n\n private mergeQueryParams(\n queryParams: SkyAppLinkQueryParams\n ): 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 Input,\n OnChanges,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterLinkWithHref } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyAppLinkQueryParams } from './link-query-params';\n\n@Directive({\n selector: '[skyAppLink]',\n})\nexport class SkyAppLinkDirective\n extends RouterLinkWithHref\n implements OnChanges\n{\n @Input()\n set skyAppLink(commands: any[] | string) {\n this.routerLink = commands;\n }\n\n constructor(\n router: Router,\n route: ActivatedRoute,\n locationStrategy: LocationStrategy,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider\n ) {\n super(router, route, locationStrategy);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.queryParams = this.mergeQueryParams(changes.queryParams?.currentValue);\n super.ngOnChanges(changes);\n }\n\n private mergeQueryParams(\n queryParams: SkyAppLinkQueryParams\n ): 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 { HttpParams } from '@angular/common/http';\nimport {\n ApplicationRef,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Input,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport { Router, UrlTree } from '@angular/router';\nimport { SkyAppConfig, SkyAppRuntimeConfigParamsProvider } from '@skyux/config';\n\nimport { SkyHrefQueryParams } from './href-query-params';\nimport { SkyHrefResolverService } from './href-resolver.service';\nimport { SkyHref } from './types/href';\n\ntype HrefChanges = { href: string; hidden: boolean };\n\n@Directive({\n selector: '[skyHref]',\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[]) {\n if (typeof skyHref === 'string') {\n this._skyHref = skyHref;\n } else {\n this._skyHref = skyHref.join('/');\n }\n\n this.checkRouteAccess();\n }\n\n @Input()\n public set skyHrefElse(value: 'hide' | 'unlink') {\n this._skyHrefElse = value;\n this.applyChanges(this.getChanges());\n }\n\n private _route: SkyHref | false = false;\n\n private _href: string;\n\n private _skyHref = '';\n\n private _skyHrefElse: 'hide' | 'unlink' = 'hide';\n\n constructor(\n private router: Router,\n private renderer: Renderer2,\n private element: ElementRef,\n @Optional() private skyAppConfig?: SkyAppConfig,\n @Optional() private paramsProvider?: SkyAppRuntimeConfigParamsProvider,\n @Optional() private hrefResolver?: SkyHrefResolverService,\n @Optional() private applicationRef?: ApplicationRef,\n @Optional() private changeDetectorRef?: ChangeDetectorRef\n ) {}\n\n /* istanbul ignore next */\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 this.router.navigateByUrl(urlTree);\n return false;\n }\n return true;\n }\n\n private applyChanges(change: HrefChanges) {\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 }\n\n private checkRouteAccess() {\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 this.hrefResolver.resolveHref({ url: this._skyHref }).then((route) => {\n this._route = { ...route };\n this.applyChanges(this.getChanges());\n /* istanbul ignore else */\n if (this.changeDetectorRef && this.applicationRef) {\n this.changeDetectorRef.markForCheck();\n this.applicationRef.tick();\n }\n });\n } catch (error) {\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 private getChanges(): HrefChanges {\n const queryParams: SkyHrefQueryParams = {};\n\n if (!this._route || !this._route.userHasAccess) {\n return {\n href: '',\n hidden: this._skyHrefElse === 'hide',\n };\n } else {\n const [beforeFragment, fragment] = this._route.url.split('#', 2);\n const [baseUrl, search] = beforeFragment.split('?', 2);\n\n if (search) {\n const searchParams = new HttpParams({ fromString: search });\n searchParams.keys().forEach((key) => {\n queryParams[key] = searchParams.get(key);\n });\n }\n\n const queryParamsMerged = new HttpParams({\n fromObject: Object.assign({}, this.getSkyuxParams(), queryParams),\n });\n\n this._href =\n baseUrl +\n (queryParamsMerged.keys().length > 0\n ? '?' + queryParamsMerged.toString()\n : '') +\n (fragment ? `#${fragment}` : '');\n return {\n href: this._href,\n hidden: false,\n };\n }\n }\n\n private getSkyuxParams(): SkyHrefQueryParams {\n return typeof this.skyAppConfig?.runtime.params?.getAll === 'function'\n ? this.skyAppConfig.runtime.params.getAll(true)\n : this.paramsProvider.params.getAll(true);\n }\n\n /* istanbul ignore next */\n private 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 { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyHrefDirective } from './href.directive';\n\n@NgModule({\n declarations: [SkyHrefDirective],\n exports: [SkyHrefDirective],\n imports: [CommonModule],\n})\nexport class SkyHrefModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i2","i3.SkyHrefResolverService"],"mappings":";;;;;;;;;;AAkBA;;AAEG;AAI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