@inera/ids-angular 1.5.1 → 1.6.0
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/bundles/inera-ids-angular.umd.js +839 -769
- package/bundles/inera-ids-angular.umd.js.map +1 -1
- package/esm2015/lib/classes/header/IDHeaderAvatar.js +1 -1
- package/esm2015/lib/classes/header/IDHeaderAvatarProps.js +1 -1
- package/esm2015/lib/classes/header/IDHeaderItem.js +1 -1
- package/esm2015/lib/classes/header/IDHeaderItemProps.js +1 -1
- package/esm2015/lib/classes/header/IDHeaderNavItem.js +1 -1
- package/esm2015/lib/classes/header/IDHeaderNavItemProps.js +1 -1
- package/esm2015/lib/classes/icon/IDIcon.js +1 -1
- package/esm2015/lib/classes/mobile/MobileMenuItem.js +1 -1
- package/esm2015/lib/classes/mobile/MobileMenuItemProps.js +1 -1
- package/esm2015/lib/components/breadcrumbs/breadcrumbs.component.js +33 -0
- package/esm2015/lib/components/breadcrumbs/breadcrumbs.module.js +32 -0
- package/esm2015/lib/components/header/header.component.js +14 -5
- package/esm2015/public-api.js +4 -1
- package/fesm2015/inera-ids-angular.js +254 -189
- package/fesm2015/inera-ids-angular.js.map +1 -1
- package/lib/classes/header/IDHeaderAvatar.d.ts +1 -1
- package/lib/classes/header/IDHeaderAvatarProps.d.ts +1 -1
- package/lib/classes/header/IDHeaderItem.d.ts +2 -1
- package/lib/classes/header/IDHeaderItemProps.d.ts +1 -1
- package/lib/classes/header/IDHeaderNavItem.d.ts +2 -1
- package/lib/classes/header/IDHeaderNavItemProps.d.ts +1 -1
- package/lib/classes/icon/IDIcon.d.ts +1 -1
- package/lib/classes/mobile/MobileMenuItem.d.ts +2 -1
- package/lib/classes/mobile/MobileMenuItemProps.d.ts +2 -1
- package/lib/components/breadcrumbs/breadcrumbs.component.d.ts +12 -0
- package/lib/components/breadcrumbs/breadcrumbs.module.d.ts +10 -0
- package/lib/components/header/header.component.d.ts +6 -2
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
|
@@ -6,6 +6,10 @@ import '@inera/ids-core/components/alert/register';
|
|
|
6
6
|
import '@inera/ids-core/components/alert-global/register';
|
|
7
7
|
import '@inera/ids-core/components/button/register';
|
|
8
8
|
import '@inera/ids-core/components/button-group/register';
|
|
9
|
+
import * as i1 from '@angular/platform-browser';
|
|
10
|
+
import * as i3 from '@angular/router';
|
|
11
|
+
import { RouterModule } from '@angular/router';
|
|
12
|
+
import '@inera/ids-core/components/breadcrumbs/register';
|
|
9
13
|
import '@inera/ids-core/components/date-label/register';
|
|
10
14
|
import '@inera/ids-core/components/icon/register';
|
|
11
15
|
import '@inera/ids-core/components/form/input/register';
|
|
@@ -22,9 +26,6 @@ import '@inera/ids-core/components/form/textarea/register';
|
|
|
22
26
|
import '@inera/ids-core/components/grid/row/register';
|
|
23
27
|
import '@inera/ids-core/components/grid/column/register';
|
|
24
28
|
import '@inera/ids-core/components/grid/container/register';
|
|
25
|
-
import * as i1 from '@angular/platform-browser';
|
|
26
|
-
import * as i3 from '@angular/router';
|
|
27
|
-
import { RouterModule } from '@angular/router';
|
|
28
29
|
import '@inera/ids-core/components/link/register';
|
|
29
30
|
import '@inera/ids-core/components/list/register';
|
|
30
31
|
import '@inera/ids-core/components/notification/badge/register';
|
|
@@ -230,6 +231,243 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
230
231
|
}]
|
|
231
232
|
}] });
|
|
232
233
|
|
|
234
|
+
class IDLink {
|
|
235
|
+
constructor(_label, _id, _classes) {
|
|
236
|
+
this._label = _label;
|
|
237
|
+
this._id = _id;
|
|
238
|
+
this._classes = _classes;
|
|
239
|
+
}
|
|
240
|
+
get label() {
|
|
241
|
+
return this._label;
|
|
242
|
+
}
|
|
243
|
+
get id() {
|
|
244
|
+
return this._id;
|
|
245
|
+
}
|
|
246
|
+
get classes() {
|
|
247
|
+
return this._classes;
|
|
248
|
+
}
|
|
249
|
+
set label(label) {
|
|
250
|
+
this._label = label;
|
|
251
|
+
}
|
|
252
|
+
set id(id) {
|
|
253
|
+
this._id = id;
|
|
254
|
+
}
|
|
255
|
+
set classes(classes) {
|
|
256
|
+
this._classes = classes;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
class IDLinkFunction extends IDLink {
|
|
261
|
+
constructor(_label, _action, _id, _classes) {
|
|
262
|
+
super(_label, _id, _classes);
|
|
263
|
+
this._action = _action;
|
|
264
|
+
}
|
|
265
|
+
get action() {
|
|
266
|
+
return this._action;
|
|
267
|
+
}
|
|
268
|
+
set action(action) {
|
|
269
|
+
this._action = action;
|
|
270
|
+
}
|
|
271
|
+
click() {
|
|
272
|
+
this._action();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
class IDLinkRoute extends IDLink {
|
|
277
|
+
constructor(_label, _route, _queries = {}, router, _id, _classes) {
|
|
278
|
+
super(_label, _id, _classes);
|
|
279
|
+
this._route = _route;
|
|
280
|
+
this._queries = _queries;
|
|
281
|
+
this.router = router;
|
|
282
|
+
}
|
|
283
|
+
get route() {
|
|
284
|
+
return this._route;
|
|
285
|
+
}
|
|
286
|
+
set route(route) {
|
|
287
|
+
this._route = route;
|
|
288
|
+
}
|
|
289
|
+
get queries() {
|
|
290
|
+
return this._queries;
|
|
291
|
+
}
|
|
292
|
+
set queries(_queries) {
|
|
293
|
+
this._queries = _queries;
|
|
294
|
+
}
|
|
295
|
+
click() {
|
|
296
|
+
if (this.router) {
|
|
297
|
+
this.router.navigate([this.route]);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
console.error('No router supplied in IcLinkRoute Object');
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
class IDLinkWeb extends IDLink {
|
|
306
|
+
constructor(_label, _url, _target, _id, _classes) {
|
|
307
|
+
super(_label, _id, _classes);
|
|
308
|
+
this._url = _url;
|
|
309
|
+
this._target = _target;
|
|
310
|
+
}
|
|
311
|
+
get target() {
|
|
312
|
+
return this._target;
|
|
313
|
+
}
|
|
314
|
+
set target(target) {
|
|
315
|
+
this._target = target;
|
|
316
|
+
}
|
|
317
|
+
get url() {
|
|
318
|
+
return this._url;
|
|
319
|
+
}
|
|
320
|
+
set url(url) {
|
|
321
|
+
this._url = url;
|
|
322
|
+
}
|
|
323
|
+
click() {
|
|
324
|
+
window.open(this._url, this.target);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
class IDAnchorComponent {
|
|
329
|
+
constructor(sanitizer) {
|
|
330
|
+
this.sanitizer = sanitizer;
|
|
331
|
+
this.linkType = '';
|
|
332
|
+
this.isLinkExternal = false;
|
|
333
|
+
this.isLinkRoute = false;
|
|
334
|
+
this.isLinkWeb = false;
|
|
335
|
+
this.isLinkFunction = false;
|
|
336
|
+
this.classes = '';
|
|
337
|
+
this.scriptHref = this.sanitizer.bypassSecurityTrustUrl('javascript:');
|
|
338
|
+
/** Apply classes to <a> element */
|
|
339
|
+
this.contextClasses = [];
|
|
340
|
+
}
|
|
341
|
+
setLinkType() {
|
|
342
|
+
this.isLinkRoute = this.link instanceof IDLinkRoute;
|
|
343
|
+
this.isLinkWeb = this.link instanceof IDLinkWeb;
|
|
344
|
+
this.isLinkFunction = this.link instanceof IDLinkFunction;
|
|
345
|
+
if (this.link && this.isLinkWeb) {
|
|
346
|
+
const weblink = this.link;
|
|
347
|
+
this.isLinkExternal = weblink.target === '_blank' || weblink.target === 'blank';
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
this.isLinkExternal = false;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
setClasses() {
|
|
354
|
+
if (this.link && this.link.classes) {
|
|
355
|
+
this.classes = [...this.contextClasses, ...this.link.classes].join(' ');
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
this.classes = this.contextClasses.join(' ');
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
get linkWeb() {
|
|
362
|
+
return this.link;
|
|
363
|
+
}
|
|
364
|
+
get linkRoute() {
|
|
365
|
+
return this.link;
|
|
366
|
+
}
|
|
367
|
+
get linkFunction() {
|
|
368
|
+
return this.link;
|
|
369
|
+
}
|
|
370
|
+
ngOnChanges(changes) {
|
|
371
|
+
if (changes.link) {
|
|
372
|
+
this.setLinkType();
|
|
373
|
+
this.setClasses();
|
|
374
|
+
}
|
|
375
|
+
if (changes.contextClasses) {
|
|
376
|
+
this.setClasses();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
IDAnchorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
381
|
+
IDAnchorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IDAnchorComponent, selector: "id-anchor", inputs: { link: "link", contextClasses: "contextClasses" }, usesOnChanges: true, ngImport: i0, template: "<a *ngIf=\"isLinkRoute\" \n [attr.id]=\"linkRoute.id\"\n [class]=\"classes\" \n [routerLink]=\"linkRoute.route\"\n routerLinkActive=\"selected\"\n [queryParams]=\"linkRoute.queries\">\n {{linkRoute.label}}\n</a>\n<a *ngIf=\"isLinkWeb\" \n [attr.id]=\"linkWeb.id\"\n [class]=\"classes\" \n [href]=\"linkWeb.url\"\n [class.ic-link--external]=\"isLinkExternal\"\n [attr.target]=\"linkWeb.target\"\n [attr.rel]=\"isLinkExternal ? 'noopener' : null\">\n {{linkWeb.label}}\n</a>\n<a *ngIf=\"isLinkFunction\" \n [attr.id]=\"linkFunction.id\"\n [class]=\"classes\" \n [attr.href]=\"scriptHref\"\n (click)=\"linkFunction.action()\">\n {{linkFunction.label}}\n</a>", styles: ["a { color: inherit; text-decoration: inherit; font-size: inherit }"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }] });
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorComponent, decorators: [{
|
|
383
|
+
type: Component,
|
|
384
|
+
args: [{
|
|
385
|
+
selector: 'id-anchor',
|
|
386
|
+
templateUrl: './anchor.component.html',
|
|
387
|
+
styles: ['a { color: inherit; text-decoration: inherit; font-size: inherit }',]
|
|
388
|
+
}]
|
|
389
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { link: [{
|
|
390
|
+
type: Input
|
|
391
|
+
}], contextClasses: [{
|
|
392
|
+
type: Input
|
|
393
|
+
}] } });
|
|
394
|
+
|
|
395
|
+
class IDBreadcrumbsComponent {
|
|
396
|
+
constructor() {
|
|
397
|
+
this.links = [];
|
|
398
|
+
this.current = '';
|
|
399
|
+
this.lead = '';
|
|
400
|
+
this.srlabel = '';
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
IDBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
404
|
+
IDBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IDBreadcrumbsComponent, selector: "id-breadcrumbs", inputs: { links: "links", mobileLink: "mobileLink", current: "current", lead: "lead", srlabel: "srlabel" }, ngImport: i0, template: "<ids-breadcrumbs\n [current]=\"current\"\n [lead]=\"lead\"\n [srlabel]=\"srlabel\">\n <ids-crumb *ngFor=\"let link of links\">\n <id-anchor [link]=\"link\"></id-anchor>\n </ids-crumb>\n <ids-crumb mobile=\"true\" *ngIf=\"mobileLink\">\n <id-anchor [link]=\"mobileLink\"></id-anchor>\n </ids-crumb>\n</ids-breadcrumbs>", components: [{ type: IDAnchorComponent, selector: "id-anchor", inputs: ["link", "contextClasses"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsComponent, decorators: [{
|
|
406
|
+
type: Component,
|
|
407
|
+
args: [{
|
|
408
|
+
selector: 'id-breadcrumbs',
|
|
409
|
+
templateUrl: './breadcrumbs.component.html',
|
|
410
|
+
encapsulation: ViewEncapsulation.None,
|
|
411
|
+
}]
|
|
412
|
+
}], ctorParameters: function () { return []; }, propDecorators: { links: [{
|
|
413
|
+
type: Input
|
|
414
|
+
}], mobileLink: [{
|
|
415
|
+
type: Input
|
|
416
|
+
}], current: [{
|
|
417
|
+
type: Input
|
|
418
|
+
}], lead: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], srlabel: [{
|
|
421
|
+
type: Input
|
|
422
|
+
}] } });
|
|
423
|
+
|
|
424
|
+
class IDAnchorModule {
|
|
425
|
+
}
|
|
426
|
+
IDAnchorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
427
|
+
IDAnchorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, declarations: [IDAnchorComponent], imports: [CommonModule,
|
|
428
|
+
RouterModule], exports: [IDAnchorComponent] });
|
|
429
|
+
IDAnchorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, imports: [[
|
|
430
|
+
CommonModule,
|
|
431
|
+
RouterModule,
|
|
432
|
+
]] });
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, decorators: [{
|
|
434
|
+
type: NgModule,
|
|
435
|
+
args: [{
|
|
436
|
+
declarations: [IDAnchorComponent],
|
|
437
|
+
imports: [
|
|
438
|
+
CommonModule,
|
|
439
|
+
RouterModule,
|
|
440
|
+
],
|
|
441
|
+
exports: [IDAnchorComponent]
|
|
442
|
+
}]
|
|
443
|
+
}] });
|
|
444
|
+
|
|
445
|
+
class IDBreadcrumbsModule {
|
|
446
|
+
}
|
|
447
|
+
IDBreadcrumbsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
448
|
+
IDBreadcrumbsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsModule, declarations: [IDBreadcrumbsComponent], imports: [CommonModule,
|
|
449
|
+
IDAnchorModule], exports: [IDBreadcrumbsComponent] });
|
|
450
|
+
IDBreadcrumbsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsModule, imports: [[
|
|
451
|
+
CommonModule,
|
|
452
|
+
IDAnchorModule
|
|
453
|
+
]] });
|
|
454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDBreadcrumbsModule, decorators: [{
|
|
455
|
+
type: NgModule,
|
|
456
|
+
args: [{
|
|
457
|
+
declarations: [
|
|
458
|
+
IDBreadcrumbsComponent
|
|
459
|
+
],
|
|
460
|
+
exports: [
|
|
461
|
+
IDBreadcrumbsComponent
|
|
462
|
+
],
|
|
463
|
+
imports: [
|
|
464
|
+
CommonModule,
|
|
465
|
+
IDAnchorModule
|
|
466
|
+
],
|
|
467
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
468
|
+
}]
|
|
469
|
+
}] });
|
|
470
|
+
|
|
233
471
|
class IDDateLabelComponent {
|
|
234
472
|
constructor() {
|
|
235
473
|
this.date = null;
|
|
@@ -902,167 +1140,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
902
1140
|
}]
|
|
903
1141
|
}] });
|
|
904
1142
|
|
|
905
|
-
class IDLink {
|
|
906
|
-
constructor(_label, _id, _classes) {
|
|
907
|
-
this._label = _label;
|
|
908
|
-
this._id = _id;
|
|
909
|
-
this._classes = _classes;
|
|
910
|
-
}
|
|
911
|
-
get label() {
|
|
912
|
-
return this._label;
|
|
913
|
-
}
|
|
914
|
-
get id() {
|
|
915
|
-
return this._id;
|
|
916
|
-
}
|
|
917
|
-
get classes() {
|
|
918
|
-
return this._classes;
|
|
919
|
-
}
|
|
920
|
-
set label(label) {
|
|
921
|
-
this._label = label;
|
|
922
|
-
}
|
|
923
|
-
set id(id) {
|
|
924
|
-
this._id = id;
|
|
925
|
-
}
|
|
926
|
-
set classes(classes) {
|
|
927
|
-
this._classes = classes;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
class IDLinkFunction extends IDLink {
|
|
932
|
-
constructor(_label, _action, _id, _classes) {
|
|
933
|
-
super(_label, _id, _classes);
|
|
934
|
-
this._action = _action;
|
|
935
|
-
}
|
|
936
|
-
get action() {
|
|
937
|
-
return this._action;
|
|
938
|
-
}
|
|
939
|
-
set action(action) {
|
|
940
|
-
this._action = action;
|
|
941
|
-
}
|
|
942
|
-
click() {
|
|
943
|
-
this._action();
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
class IDLinkRoute extends IDLink {
|
|
948
|
-
constructor(_label, _route, _queries = {}, router, _id, _classes) {
|
|
949
|
-
super(_label, _id, _classes);
|
|
950
|
-
this._route = _route;
|
|
951
|
-
this._queries = _queries;
|
|
952
|
-
this.router = router;
|
|
953
|
-
}
|
|
954
|
-
get route() {
|
|
955
|
-
return this._route;
|
|
956
|
-
}
|
|
957
|
-
set route(route) {
|
|
958
|
-
this._route = route;
|
|
959
|
-
}
|
|
960
|
-
get queries() {
|
|
961
|
-
return this._queries;
|
|
962
|
-
}
|
|
963
|
-
set queries(_queries) {
|
|
964
|
-
this._queries = _queries;
|
|
965
|
-
}
|
|
966
|
-
click() {
|
|
967
|
-
if (this.router) {
|
|
968
|
-
this.router.navigate([this.route]);
|
|
969
|
-
}
|
|
970
|
-
else {
|
|
971
|
-
console.error('No router supplied in IcLinkRoute Object');
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
class IDLinkWeb extends IDLink {
|
|
977
|
-
constructor(_label, _url, _target, _id, _classes) {
|
|
978
|
-
super(_label, _id, _classes);
|
|
979
|
-
this._url = _url;
|
|
980
|
-
this._target = _target;
|
|
981
|
-
}
|
|
982
|
-
get target() {
|
|
983
|
-
return this._target;
|
|
984
|
-
}
|
|
985
|
-
set target(target) {
|
|
986
|
-
this._target = target;
|
|
987
|
-
}
|
|
988
|
-
get url() {
|
|
989
|
-
return this._url;
|
|
990
|
-
}
|
|
991
|
-
set url(url) {
|
|
992
|
-
this._url = url;
|
|
993
|
-
}
|
|
994
|
-
click() {
|
|
995
|
-
window.open(this._url, this.target);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
class IDAnchorComponent {
|
|
1000
|
-
constructor(sanitizer) {
|
|
1001
|
-
this.sanitizer = sanitizer;
|
|
1002
|
-
this.linkType = '';
|
|
1003
|
-
this.isLinkExternal = false;
|
|
1004
|
-
this.isLinkRoute = false;
|
|
1005
|
-
this.isLinkWeb = false;
|
|
1006
|
-
this.isLinkFunction = false;
|
|
1007
|
-
this.classes = '';
|
|
1008
|
-
this.scriptHref = this.sanitizer.bypassSecurityTrustUrl('javascript:');
|
|
1009
|
-
/** Apply classes to <a> element */
|
|
1010
|
-
this.contextClasses = [];
|
|
1011
|
-
}
|
|
1012
|
-
setLinkType() {
|
|
1013
|
-
this.isLinkRoute = this.link instanceof IDLinkRoute;
|
|
1014
|
-
this.isLinkWeb = this.link instanceof IDLinkWeb;
|
|
1015
|
-
this.isLinkFunction = this.link instanceof IDLinkFunction;
|
|
1016
|
-
if (this.link && this.isLinkWeb) {
|
|
1017
|
-
const weblink = this.link;
|
|
1018
|
-
this.isLinkExternal = weblink.target === '_blank' || weblink.target === 'blank';
|
|
1019
|
-
}
|
|
1020
|
-
else {
|
|
1021
|
-
this.isLinkExternal = false;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
setClasses() {
|
|
1025
|
-
if (this.link && this.link.classes) {
|
|
1026
|
-
this.classes = [...this.contextClasses, ...this.link.classes].join(' ');
|
|
1027
|
-
}
|
|
1028
|
-
else {
|
|
1029
|
-
this.classes = this.contextClasses.join(' ');
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
get linkWeb() {
|
|
1033
|
-
return this.link;
|
|
1034
|
-
}
|
|
1035
|
-
get linkRoute() {
|
|
1036
|
-
return this.link;
|
|
1037
|
-
}
|
|
1038
|
-
get linkFunction() {
|
|
1039
|
-
return this.link;
|
|
1040
|
-
}
|
|
1041
|
-
ngOnChanges(changes) {
|
|
1042
|
-
if (changes.link) {
|
|
1043
|
-
this.setLinkType();
|
|
1044
|
-
this.setClasses();
|
|
1045
|
-
}
|
|
1046
|
-
if (changes.contextClasses) {
|
|
1047
|
-
this.setClasses();
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
IDAnchorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1052
|
-
IDAnchorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IDAnchorComponent, selector: "id-anchor", inputs: { link: "link", contextClasses: "contextClasses" }, usesOnChanges: true, ngImport: i0, template: "<a *ngIf=\"isLinkRoute\" \n [attr.id]=\"linkRoute.id\"\n [class]=\"classes\" \n [routerLink]=\"linkRoute.route\"\n routerLinkActive=\"selected\"\n [queryParams]=\"linkRoute.queries\">\n {{linkRoute.label}}\n</a>\n<a *ngIf=\"isLinkWeb\" \n [attr.id]=\"linkWeb.id\"\n [class]=\"classes\" \n [href]=\"linkWeb.url\"\n [class.ic-link--external]=\"isLinkExternal\"\n [attr.target]=\"linkWeb.target\"\n [attr.rel]=\"isLinkExternal ? 'noopener' : null\">\n {{linkWeb.label}}\n</a>\n<a *ngIf=\"isLinkFunction\" \n [attr.id]=\"linkFunction.id\"\n [class]=\"classes\" \n [attr.href]=\"scriptHref\"\n (click)=\"linkFunction.action()\">\n {{linkFunction.label}}\n</a>", styles: ["a { color: inherit; text-decoration: inherit; font-size: inherit }"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }] });
|
|
1053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorComponent, decorators: [{
|
|
1054
|
-
type: Component,
|
|
1055
|
-
args: [{
|
|
1056
|
-
selector: 'id-anchor',
|
|
1057
|
-
templateUrl: './anchor.component.html',
|
|
1058
|
-
styles: ['a { color: inherit; text-decoration: inherit; font-size: inherit }',]
|
|
1059
|
-
}]
|
|
1060
|
-
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { link: [{
|
|
1061
|
-
type: Input
|
|
1062
|
-
}], contextClasses: [{
|
|
1063
|
-
type: Input
|
|
1064
|
-
}] } });
|
|
1065
|
-
|
|
1066
1143
|
class IDLinkComponent {
|
|
1067
1144
|
constructor() {
|
|
1068
1145
|
this.link = null;
|
|
@@ -1119,27 +1196,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1119
1196
|
type: Input
|
|
1120
1197
|
}] } });
|
|
1121
1198
|
|
|
1122
|
-
class IDAnchorModule {
|
|
1123
|
-
}
|
|
1124
|
-
IDAnchorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1125
|
-
IDAnchorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, declarations: [IDAnchorComponent], imports: [CommonModule,
|
|
1126
|
-
RouterModule], exports: [IDAnchorComponent] });
|
|
1127
|
-
IDAnchorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, imports: [[
|
|
1128
|
-
CommonModule,
|
|
1129
|
-
RouterModule,
|
|
1130
|
-
]] });
|
|
1131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDAnchorModule, decorators: [{
|
|
1132
|
-
type: NgModule,
|
|
1133
|
-
args: [{
|
|
1134
|
-
declarations: [IDAnchorComponent],
|
|
1135
|
-
imports: [
|
|
1136
|
-
CommonModule,
|
|
1137
|
-
RouterModule,
|
|
1138
|
-
],
|
|
1139
|
-
exports: [IDAnchorComponent]
|
|
1140
|
-
}]
|
|
1141
|
-
}] });
|
|
1142
|
-
|
|
1143
1199
|
class IDLinkModule {
|
|
1144
1200
|
}
|
|
1145
1201
|
IDLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1458,15 +1514,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1458
1514
|
class IDHeaderComponent {
|
|
1459
1515
|
constructor() {
|
|
1460
1516
|
this.type = '';
|
|
1461
|
-
this.
|
|
1517
|
+
this.brandText = '';
|
|
1518
|
+
this.brandTextTop = '';
|
|
1519
|
+
this.brandTextBottom = '';
|
|
1462
1520
|
this.hideRegionPicker = false;
|
|
1463
1521
|
this.hideBrand = false;
|
|
1464
1522
|
this.pickRegionText = 'Välj region';
|
|
1465
1523
|
this.srLogoLabel = 'Logotyp';
|
|
1524
|
+
this.didToggleRegion = new EventEmitter();
|
|
1466
1525
|
}
|
|
1467
1526
|
}
|
|
1468
1527
|
IDHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1469
|
-
IDHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IDHeaderComponent, selector: "id-header", inputs: { type: "type",
|
|
1528
|
+
IDHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IDHeaderComponent, selector: "id-header", inputs: { type: "type", brandText: "brandText", brandTextTop: "brandTextTop", brandTextBottom: "brandTextBottom", hideRegionPicker: "hideRegionPicker", hideBrand: "hideBrand", pickRegionText: "pickRegionText", regionIcon: "regionIcon", width: "width", srLogoLabel: "srLogoLabel", items: "items", avatar: "avatar", navItems: "navItems", mobileItems: "mobileItems", mobileMenuItems: "mobileMenuItems" }, outputs: { didToggleRegion: "didToggleRegion" }, ngImport: i0, template: "<ids-header \r\n [attr.type]=\"type\"\r\n [attr.brandtext]=\"brandText\"\r\n [attr.brandtexttop]=\"brandTextTop\"\r\n [attr.brandtextbottom]=\"brandTextBottom\"\r\n [hideregionpicker]=\"hideRegionPicker\"\r\n [hidebrand]=\"hideBrand\"\r\n [pickregiontext]=\"pickRegionText\"\r\n [regionicon]=\"regionIcon\"\r\n [width]=\"width\"\r\n [srlogolabel]=\"srLogoLabel\"\r\n (didToggleRegion)=\"didToggleRegion.emit(true)\">\r\n\r\n <ids-header-item *ngFor=\"let item of items\" \r\n [icon]=\"item.iconName\" \r\n [mobile]=\"item.mobile\">\r\n <id-anchor [link]=\"item.link\"></id-anchor>\r\n </ids-header-item>\r\n\r\n <ids-header-nav *ngIf=\"navItems || mobileItems\">\r\n <ids-header-nav-item *ngFor=\"let navItem of navItems; let i = index\" [label]=\"navItem.label\" [link]=\"navItem.link\">\r\n <id-anchor *ngIf=\"navItem.link\" [link]=\"navItem.link\"></id-anchor>\r\n <ids-link slot=\"col-1\" [block]=\"true\" *ngFor=\"let link of navItem.col1\">\r\n <ids-icon *ngIf=\"type.indexOf('1177')\" name=\"arrow\"></ids-icon>\r\n <ids-icon *ngIf=\"type.indexOf('inera')\" color=\"var(--color-main)\" name=\"arrow\"></ids-icon>\r\n <id-anchor [link]=\"link\"></id-anchor>\r\n </ids-link> \r\n <ids-link slot=\"col-2\" [block]=\"true\" *ngFor=\"let link of navItem.col2\">\r\n <ids-icon *ngIf=\"type.indexOf('1177')\" name=\"arrow\"></ids-icon>\r\n <ids-icon *ngIf=\"type.indexOf('inera')\" color=\"var(--color-main)\" name=\"arrow\"></ids-icon>\r\n <id-anchor [link]=\"link\"></id-anchor>\r\n </ids-link>\r\n <ids-link slot=\"col-3\" [block]=\"true\" *ngFor=\"let link of navItem.col3\">\r\n <ids-icon *ngIf=\"type.indexOf('1177')\" name=\"arrow\"></ids-icon>\r\n <ids-icon *ngIf=\"type.indexOf('inera')\" color=\"var(--color-main)\" name=\"arrow\"></ids-icon>\r\n <id-anchor [link]=\"link\"></id-anchor>\r\n </ids-link>\r\n <div slot=\"col-4\">\r\n <h2 style=\"margin-bottom: 15px; color: var(--header-nav-item-heading_color);\" class=\"h2\">{{navItem.headline}}</h2>\r\n <p class=\"body\">{{navItem.paragraph}}</p>\r\n <id-anchor>{{navItem.paragraphLink}}</id-anchor>\r\n </div>\r\n </ids-header-nav-item>\r\n <ids-header-mobile-item *ngFor=\"let mobileItem of mobileItems\" [icon]=\"mobileItem.iconName\">\r\n <id-anchor [link]=\"mobileItem.link\"></id-anchor>\r\n </ids-header-mobile-item>\r\n \r\n <ids-header-mobile-menu *ngIf=\"mobileMenuItems\">\r\n Menu\r\n <ids-mobile-menu-item *ngFor=\"let item of mobileMenuItems\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n [secondary]=\"item?.secondary\"\r\n [active]=\"item?.active\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n [secondary]=\"item?.secondary\"\r\n [active]=\"item?.active\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n [secondary]=\"item?.secondary\"\r\n [active]=\"item?.active\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n [secondary]=\"item?.secondary\"\r\n [active]=\"item?.active\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-header-mobile-menu>\r\n </ids-header-nav>\r\n\r\n <ids-header-avatar *ngIf=\"avatar\" [username]=\"avatar.username\">\r\n <ng-content select=\"[avatar]\"></ng-content>\r\n <span slot=\"avatar-text\">{{avatar.serviceName}}</span>\r\n <id-anchor [link]=\"avatar.linkLeft\" slot=\"avatar-left\"></id-anchor>\r\n <id-anchor [link]=\"avatar.linkRight\" slot=\"avatar-right\"></id-anchor>\r\n </ids-header-avatar>\r\n\r\n <ng-content></ng-content>\r\n\r\n <ids-header-mobile-menu \r\n *ngIf=\"type !== '1177' && (mobileMenuItems || avatar)\"\r\n [type]=\"type\">\r\n <ids-mobile-menu-avatar *ngIf=\"avatar\" [username]=\"avatar.username\">\r\n <ng-content select=\"[avatarMobile]\"></ng-content>\r\n </ids-mobile-menu-avatar>\r\n <ids-mobile-menu-item *ngFor=\"let item of mobileMenuItems\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n <ids-mobile-menu-item *ngFor=\"let item of item.items\"\r\n [attr.type]=\"type\"\r\n [headline]=\"item?.headline\"\r\n [expanded]=\"item?.expanded\"\r\n (didToggleExpansion)=\"item.togleExpansion()\">\r\n <id-anchor *ngIf=\"item.link\" [link]=\"item.link\"></id-anchor>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-mobile-menu-item>\r\n </ids-header-mobile-menu>\r\n</ids-header>", components: [{ type: IDAnchorComponent, selector: "id-anchor", inputs: ["link", "contextClasses"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1470
1529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IDHeaderComponent, decorators: [{
|
|
1471
1530
|
type: Component,
|
|
1472
1531
|
args: [{
|
|
@@ -1475,7 +1534,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1475
1534
|
}]
|
|
1476
1535
|
}], ctorParameters: function () { return []; }, propDecorators: { type: [{
|
|
1477
1536
|
type: Input
|
|
1478
|
-
}],
|
|
1537
|
+
}], brandText: [{
|
|
1538
|
+
type: Input
|
|
1539
|
+
}], brandTextTop: [{
|
|
1540
|
+
type: Input
|
|
1541
|
+
}], brandTextBottom: [{
|
|
1479
1542
|
type: Input
|
|
1480
1543
|
}], hideRegionPicker: [{
|
|
1481
1544
|
type: Input
|
|
@@ -1499,6 +1562,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1499
1562
|
type: Input
|
|
1500
1563
|
}], mobileMenuItems: [{
|
|
1501
1564
|
type: Input
|
|
1565
|
+
}], didToggleRegion: [{
|
|
1566
|
+
type: Output
|
|
1502
1567
|
}] } });
|
|
1503
1568
|
|
|
1504
1569
|
class IDHeaderModule {
|
|
@@ -1672,5 +1737,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1672
1737
|
* Generated bundle index. Do not edit.
|
|
1673
1738
|
*/
|
|
1674
1739
|
|
|
1675
|
-
export { IDAlertComponent, IDAlertGlobalComponent, IDAlertGlobalModule, IDAlertModule, IDButtonComponent, IDButtonGroupComponent, IDButtonGroupModule, IDButtonModule, IDCheckboxComponent, IDCheckboxGroupComponent, IDCheckboxGroupModule, IDCheckboxModule, IDColumnComponent, IDColumnModule, IDContainerComponent, IDContainerModule, IDDateLabelComponent, IDDateLabelModule, IDErrorMessageComponent, IDErrorMessageModule, IDFooterComponent, IDFooterModule, IDHeaderAvatar, IDHeaderComponent, IDHeaderItem, IDHeaderModule, IDHeaderNavItem, IDIcon, IDIconComponent, IDIconModule, IDInputComponent, IDInputModule, IDLink, IDLinkComponent, IDLinkFunction, IDLinkModule, IDLinkRoute, IDLinkWeb, IDListComponent, IDListItemComponent, IDListItemInfoComponent, IDListItemInfoModule, IDListItemModule, IDListModule, IDMobileMenuComponent, IDMobileMenuItem, IDMobileMenuModule, IDNotificationBadge, IDNotificationBadgeComponent, IDNotificationBadgeModule, IDRadioComponent, IDRadioGroupComponent, IDRadioModule, IDRangeComponent, IDRangeModule, IDRowComponent, IDRowModule, IDSelectComponent, IDSelectModule, IDSelectMultipleComponent, IDSelectMultipleModule, IDSpinnerComponent, IDSpinnerModule, IDTabComponent, IDTabPanelComponent, IDTabsComponent, IDTabsModule, IDTextareaComponent, IDTextareaModule, IDTimeComponent, IDTimeModule };
|
|
1740
|
+
export { IDAlertComponent, IDAlertGlobalComponent, IDAlertGlobalModule, IDAlertModule, IDBreadcrumbsComponent, IDBreadcrumbsModule, IDButtonComponent, IDButtonGroupComponent, IDButtonGroupModule, IDButtonModule, IDCheckboxComponent, IDCheckboxGroupComponent, IDCheckboxGroupModule, IDCheckboxModule, IDColumnComponent, IDColumnModule, IDContainerComponent, IDContainerModule, IDDateLabelComponent, IDDateLabelModule, IDErrorMessageComponent, IDErrorMessageModule, IDFooterComponent, IDFooterModule, IDHeaderAvatar, IDHeaderComponent, IDHeaderItem, IDHeaderModule, IDHeaderNavItem, IDIcon, IDIconComponent, IDIconModule, IDInputComponent, IDInputModule, IDLink, IDLinkComponent, IDLinkFunction, IDLinkModule, IDLinkRoute, IDLinkWeb, IDListComponent, IDListItemComponent, IDListItemInfoComponent, IDListItemInfoModule, IDListItemModule, IDListModule, IDMobileMenuComponent, IDMobileMenuItem, IDMobileMenuModule, IDNotificationBadge, IDNotificationBadgeComponent, IDNotificationBadgeModule, IDRadioComponent, IDRadioGroupComponent, IDRadioModule, IDRangeComponent, IDRangeModule, IDRowComponent, IDRowModule, IDSelectComponent, IDSelectModule, IDSelectMultipleComponent, IDSelectMultipleModule, IDSpinnerComponent, IDSpinnerModule, IDTabComponent, IDTabPanelComponent, IDTabsComponent, IDTabsModule, IDTextareaComponent, IDTextareaModule, IDTimeComponent, IDTimeModule };
|
|
1676
1741
|
//# sourceMappingURL=inera-ids-angular.js.map
|