adb-shared 0.0.6 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adb-shared.metadata.json +1 -1
- package/bundles/adb-shared.umd.js +43 -8
- package/bundles/adb-shared.umd.js.map +1 -1
- package/bundles/adb-shared.umd.min.js +1 -1
- package/bundles/adb-shared.umd.min.js.map +1 -1
- package/esm2015/lib/adb-header.component.js +38 -4
- package/esm2015/lib/adb-header.module.js +6 -2
- package/esm2015/lib/navigation.model.js +25 -0
- package/esm5/lib/adb-header.component.js +39 -4
- package/esm5/lib/adb-header.module.js +6 -2
- package/esm5/lib/navigation.model.js +25 -0
- package/fesm2015/adb-shared.js +41 -4
- package/fesm2015/adb-shared.js.map +1 -1
- package/fesm5/adb-shared.js +42 -4
- package/fesm5/adb-shared.js.map +1 -1
- package/lib/adb-header.component.d.ts +9 -3
- package/lib/navigation.model.d.ts +8 -0
- package/package.json +7 -6
package/adb-shared.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"ADBHeaderComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"ADBHeaderComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"adb-header2","template":"<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"}]}],"members":{"loginClicked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":11,"character":3}}]}],"user":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":16,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"ADBHeaderModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ADBHeaderComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":10,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":11,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":12,"character":4}],"exports":[{"__symbolic":"reference","name":"ADBHeaderComponent"}]}]}],"members":{}}},"origins":{"ADBHeaderComponent":"./lib/adb-header.component","ADBHeaderModule":"./lib/adb-header.module"},"importAs":"adb-shared"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('adb-shared', ['exports', '@angular/core', '@angular/common'], factory) :
|
|
4
|
-
(global = global || self, factory(global['adb-shared'] = {}, global.ng.core, global.ng.common));
|
|
5
|
-
}(this, (function (exports, core, common) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('rxjs'), require('@angular/common'), require('@ngx-translate/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('adb-shared', ['exports', '@angular/common/http', '@angular/core', 'rxjs', '@angular/common', '@ngx-translate/core'], factory) :
|
|
4
|
+
(global = global || self, factory(global['adb-shared'] = {}, global.ng.common.http, global.ng.core, global.rxjs, global.ng.common, global.core$1));
|
|
5
|
+
}(this, (function (exports, http, core, rxjs, common, core$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @fileoverview added by tsickle
|
|
9
9
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10
10
|
*/
|
|
11
11
|
var ADBHeaderComponent = /** @class */ (function () {
|
|
12
|
-
function ADBHeaderComponent() {
|
|
12
|
+
function ADBHeaderComponent(httpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
this.subscription = new rxjs.Subscription();
|
|
13
15
|
this.loginClicked = new core.EventEmitter();
|
|
14
16
|
this.showPop = false;
|
|
15
17
|
}
|
|
@@ -20,15 +22,34 @@
|
|
|
20
22
|
* @return {?}
|
|
21
23
|
*/
|
|
22
24
|
function () {
|
|
25
|
+
var _this = this;
|
|
26
|
+
this.subscription.add(this.httpClient.get('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe((/**
|
|
27
|
+
* @param {?} result
|
|
28
|
+
* @return {?}
|
|
29
|
+
*/
|
|
30
|
+
function (result) {
|
|
31
|
+
_this.navigation = result;
|
|
32
|
+
})));
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @return {?}
|
|
36
|
+
*/
|
|
37
|
+
ADBHeaderComponent.prototype.ngOnDestroy = /**
|
|
38
|
+
* @return {?}
|
|
39
|
+
*/
|
|
40
|
+
function () {
|
|
41
|
+
this.subscription.unsubscribe();
|
|
23
42
|
};
|
|
24
43
|
ADBHeaderComponent.decorators = [
|
|
25
44
|
{ type: core.Component, args: [{
|
|
26
45
|
selector: 'adb-header2',
|
|
27
|
-
template: "<header
|
|
46
|
+
template: "<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"
|
|
28
47
|
}] }
|
|
29
48
|
];
|
|
30
49
|
/** @nocollapse */
|
|
31
|
-
ADBHeaderComponent.ctorParameters = function () { return [
|
|
50
|
+
ADBHeaderComponent.ctorParameters = function () { return [
|
|
51
|
+
{ type: http.HttpClient }
|
|
52
|
+
]; };
|
|
32
53
|
ADBHeaderComponent.propDecorators = {
|
|
33
54
|
loginClicked: [{ type: core.Output }],
|
|
34
55
|
user: [{ type: core.Input }]
|
|
@@ -36,12 +57,24 @@
|
|
|
36
57
|
return ADBHeaderComponent;
|
|
37
58
|
}());
|
|
38
59
|
if (false) {
|
|
60
|
+
/**
|
|
61
|
+
* @type {?}
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
ADBHeaderComponent.prototype.subscription;
|
|
39
65
|
/** @type {?} */
|
|
40
66
|
ADBHeaderComponent.prototype.loginClicked;
|
|
41
67
|
/** @type {?} */
|
|
42
68
|
ADBHeaderComponent.prototype.user;
|
|
43
69
|
/** @type {?} */
|
|
44
70
|
ADBHeaderComponent.prototype.showPop;
|
|
71
|
+
/** @type {?} */
|
|
72
|
+
ADBHeaderComponent.prototype.navigation;
|
|
73
|
+
/**
|
|
74
|
+
* @type {?}
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
ADBHeaderComponent.prototype.httpClient;
|
|
45
78
|
}
|
|
46
79
|
|
|
47
80
|
/**
|
|
@@ -55,7 +88,9 @@
|
|
|
55
88
|
{ type: core.NgModule, args: [{
|
|
56
89
|
declarations: [ADBHeaderComponent],
|
|
57
90
|
imports: [
|
|
58
|
-
common.CommonModule
|
|
91
|
+
common.CommonModule,
|
|
92
|
+
http.HttpClientModule,
|
|
93
|
+
core$1.TranslateModule //add load to SharedComponentServer
|
|
59
94
|
],
|
|
60
95
|
exports: [ADBHeaderComponent]
|
|
61
96
|
},] }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb-shared.umd.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit {\r\n
|
|
1
|
+
{"version":3,"file":"adb-shared.umd.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Navigation } from './navigation.model';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit, OnDestroy {\r\n private subscription = new Subscription();\r\n @Output() loginClicked = new EventEmitter();\r\n @Input() user: string;\r\n showPop = false;\r\n navigation: Navigation;\r\n\r\n constructor(private httpClient: HttpClient) { }\r\n\r\n\r\n ngOnInit() {\r\n this.subscription.add(this.httpClient.get<Navigation>('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe(result => {\r\n this.navigation = result;\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ADBHeaderComponent } from './adb-header.component';\r\nimport { HttpClientModule} from '@angular/common/http';\r\n\r\n\r\n@NgModule({\r\n declarations: [ADBHeaderComponent],\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n TranslateModule //add load to SharedComponentServer\r\n ],\r\n exports: [ADBHeaderComponent]\r\n})\r\nexport class ADBHeaderModule { }\r\n"],"names":["Subscription","EventEmitter","Component","HttpClient","Output","Input","NgModule","CommonModule","HttpClientModule","TranslateModule"],"mappings":";;;;;;;;;;AAAA;QAgBE,4BAAoB,UAAsB;YAAtB,eAAU,GAAV,UAAU,CAAY;YANlC,iBAAY,GAAG,IAAIA,iBAAY,EAAE,CAAC;YAChC,iBAAY,GAAG,IAAIC,iBAAY,EAAE,CAAC;YAE5C,YAAO,GAAG,KAAK,CAAC;SAG+B;;;;QAG/C,qCAAQ;;;QAAR;YAAA,iBAIC;YAHC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,+DAA+D,CAAC,CAAC,SAAS;;;;YAAC,UAAA,MAAM;gBACrI,KAAI,CAAC,UAAU,GAAG,MAAM,CAAC;aAC1B,EAAC,CAAC,CAAC;SACL;;;;QAED,wCAAW;;;QAAX;YACE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;SACjC;;oBAtBFC,cAAS,SAAC;wBACT,QAAQ,EAAE,aAAa;wBACvB,uuCAA0C;qBAC3C;;;;oBARQC,eAAU;;;mCAWhBC,WAAM;2BACNC,UAAK;;QAiBR,yBAAC;KAxBD,IAwBC;;;;;;QAnBC,0CAA0C;;QAC1C,0CAA4C;;QAC5C,kCAAsB;;QACtB,qCAAgB;;QAChB,wCAAuB;;;;;QAEX,wCAA8B;;;;;;;AChB5C;QAOA;SASgC;;oBAT/BC,aAAQ,SAAC;wBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;wBAClC,OAAO,EAAE;4BACPC,mBAAY;4BACZC,qBAAgB;4BAChBC,sBAAe;yBAChB;wBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;qBAC9B;;QAC8B,sBAAC;KAThC;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(r
|
|
1
|
+
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/common/http"),require("@angular/core"),require("rxjs"),require("@angular/common"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("adb-shared",["exports","@angular/common/http","@angular/core","rxjs","@angular/common","@ngx-translate/core"],r):r((n=n||self)["adb-shared"]={},n.ng.common.http,n.ng.core,n.rxjs,n.ng.common,n.core$1)}(this,(function(n,r,t,e,o,i){"use strict";var a=function(){function n(n){this.httpClient=n,this.subscription=new e.Subscription,this.loginClicked=new t.EventEmitter,this.showPop=!1}return n.prototype.ngOnInit=function(){var n=this;this.subscription.add(this.httpClient.get("https://sharedcomponents-dev.artdata.slu.se/assets/links.json").subscribe((function(r){n.navigation=r})))},n.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},n.decorators=[{type:t.Component,args:[{selector:"adb-header2",template:'<header class="top-header">\r\n <nav>\r\n <div class="logo">\r\n <img src="/assets/images/logo.svg">\r\n </div>\r\n <div class="title">Artfakta</div>\r\n <nav class="quick-nav" *ngIf="navigation">\r\n <ng-container *ngFor="let link of navigation.links">\r\n <a [href]="link.url" *ngIf="link.topLink">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class="btn btn-primary" (click)="showPop=!showPop">\r\n \x3c!-- {{\'ADB_HEADER.MENY\'|translate}} --\x3e MENY\r\n </button>\r\n </nav>\r\n <div class="user">\r\n JA\r\n </div>\r\n </nav>\r\n <div class="pop" *ngIf="showPop">\r\n <div class="pop-body menu">\r\n <ul>\r\n <ng-container *ngFor="let link of navigation.links">\r\n <li>\r\n <a [href]="link.url">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n'}]}],n.ctorParameters=function(){return[{type:r.HttpClient}]},n.propDecorators={loginClicked:[{type:t.Output}],user:[{type:t.Input}]},n}();var s=function(){function n(){}return n.decorators=[{type:t.NgModule,args:[{declarations:[a],imports:[o.CommonModule,r.HttpClientModule,i.TranslateModule],exports:[a]}]}],n}();n.ADBHeaderComponent=a,n.ADBHeaderModule=s,Object.defineProperty(n,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=adb-shared.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"names":["ADBHeaderComponent","this","loginClicked","EventEmitter","showPop","prototype","ngOnInit","Component","args","selector","template","Output","Input","ADBHeaderModule","NgModule","declarations","imports","CommonModule","exports"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"names":["ADBHeaderComponent","httpClient","this","subscription","Subscription","loginClicked","EventEmitter","showPop","prototype","ngOnInit","_this","add","get","subscribe","result","navigation","ngOnDestroy","unsubscribe","Component","args","selector","template","HttpClient","Output","Input","ADBHeaderModule","NgModule","declarations","imports","CommonModule","HttpClientModule","TranslateModule","exports"],"mappings":"kfAAA,IAAAA,EAAA,WAgBE,SAAAA,EAAoBC,GAAAC,KAAAD,WAAAA,EANZC,KAAAC,aAAe,IAAIC,EAAAA,aACjBF,KAAAG,aAAe,IAAIC,EAAAA,aAE7BJ,KAAAK,SAAU,EAgBZ,OAVEP,EAAAQ,UAAAC,SAAA,WAAA,IAAAC,EAAAR,KACEA,KAAKC,aAAaQ,IAAIT,KAAKD,WAAWW,IAAgB,iEAAiEC,WAAS,SAACC,GAC/HJ,EAAKK,WAAaD,OAItBd,EAAAQ,UAAAQ,YAAA,WACEd,KAAKC,aAAac,mCArBrBC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,cACVC,SAAA,ivCAPOC,EAAAA,oDAWNC,EAAAA,qBACAC,EAAAA,SAiBHxB,EA7BA,GCAA,IAAAyB,EAAA,WAOA,SAAAA,KAS+B,2BAT9BC,EAAAA,SAAQP,KAAA,CAAC,CACRQ,aAAc,CAAC3B,GACf4B,QAAS,CACPC,EAAAA,aACAC,EAAAA,iBACAC,EAAAA,iBAEFC,QAAS,CAAChC,OAEmByB,EAhB/B","sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Navigation } from './navigation.model';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit, OnDestroy {\r\n private subscription = new Subscription();\r\n @Output() loginClicked = new EventEmitter();\r\n @Input() user: string;\r\n showPop = false;\r\n navigation: Navigation;\r\n\r\n constructor(private httpClient: HttpClient) { }\r\n\r\n\r\n ngOnInit() {\r\n this.subscription.add(this.httpClient.get<Navigation>('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe(result => {\r\n this.navigation = result;\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ADBHeaderComponent } from './adb-header.component';\r\nimport { HttpClientModule} from '@angular/common/http';\r\n\r\n\r\n@NgModule({\r\n declarations: [ADBHeaderComponent],\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n TranslateModule //add load to SharedComponentServer\r\n ],\r\n exports: [ADBHeaderComponent]\r\n})\r\nexport class ADBHeaderModule { }\r\n"]}
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
* @fileoverview added by tsickle
|
|
3
3
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
4
|
*/
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
6
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { Subscription } from 'rxjs';
|
|
6
8
|
export class ADBHeaderComponent {
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @param {?} httpClient
|
|
11
|
+
*/
|
|
12
|
+
constructor(httpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
this.subscription = new Subscription();
|
|
8
15
|
this.loginClicked = new EventEmitter();
|
|
9
16
|
this.showPop = false;
|
|
10
17
|
}
|
|
@@ -12,26 +19,53 @@ export class ADBHeaderComponent {
|
|
|
12
19
|
* @return {?}
|
|
13
20
|
*/
|
|
14
21
|
ngOnInit() {
|
|
22
|
+
this.subscription.add(this.httpClient.get('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe((/**
|
|
23
|
+
* @param {?} result
|
|
24
|
+
* @return {?}
|
|
25
|
+
*/
|
|
26
|
+
result => {
|
|
27
|
+
this.navigation = result;
|
|
28
|
+
})));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @return {?}
|
|
32
|
+
*/
|
|
33
|
+
ngOnDestroy() {
|
|
34
|
+
this.subscription.unsubscribe();
|
|
15
35
|
}
|
|
16
36
|
}
|
|
17
37
|
ADBHeaderComponent.decorators = [
|
|
18
38
|
{ type: Component, args: [{
|
|
19
39
|
selector: 'adb-header2',
|
|
20
|
-
template: "<header
|
|
40
|
+
template: "<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"
|
|
21
41
|
}] }
|
|
22
42
|
];
|
|
23
43
|
/** @nocollapse */
|
|
24
|
-
ADBHeaderComponent.ctorParameters = () => [
|
|
44
|
+
ADBHeaderComponent.ctorParameters = () => [
|
|
45
|
+
{ type: HttpClient }
|
|
46
|
+
];
|
|
25
47
|
ADBHeaderComponent.propDecorators = {
|
|
26
48
|
loginClicked: [{ type: Output }],
|
|
27
49
|
user: [{ type: Input }]
|
|
28
50
|
};
|
|
29
51
|
if (false) {
|
|
52
|
+
/**
|
|
53
|
+
* @type {?}
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
ADBHeaderComponent.prototype.subscription;
|
|
30
57
|
/** @type {?} */
|
|
31
58
|
ADBHeaderComponent.prototype.loginClicked;
|
|
32
59
|
/** @type {?} */
|
|
33
60
|
ADBHeaderComponent.prototype.user;
|
|
34
61
|
/** @type {?} */
|
|
35
62
|
ADBHeaderComponent.prototype.showPop;
|
|
63
|
+
/** @type {?} */
|
|
64
|
+
ADBHeaderComponent.prototype.navigation;
|
|
65
|
+
/**
|
|
66
|
+
* @type {?}
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
ADBHeaderComponent.prototype.httpClient;
|
|
36
70
|
}
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRiLWhlYWRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hZGItc2hhcmVkLyIsInNvdXJjZXMiOlsibGliL2FkYi1oZWFkZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFxQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUYsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLE1BQU0sQ0FBQztBQU9wQyxNQUFNLE9BQU8sa0JBQWtCOzs7O0lBTzdCLFlBQW9CLFVBQXNCO1FBQXRCLGVBQVUsR0FBVixVQUFVLENBQVk7UUFObEMsaUJBQVksR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO1FBQ2hDLGlCQUFZLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztRQUU1QyxZQUFPLEdBQUcsS0FBSyxDQUFDO0lBRzhCLENBQUM7Ozs7SUFHL0MsUUFBUTtRQUNOLElBQU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Y2xhc3MgQURCSGVhZGVyQ29tcG9uZW50IGltcGxlbWVudHMgT25Jbml0LCBPbkRlc3Ryb3kge1xyXG4gIHByaXZhdGUgc3Vic2NyaXB0aW9uID0gbmV3IFN1YnNjcmlwdGlvbigpO1xyXG4gIEBPdXRwdXQoKSBsb2dpbkNsaWNrZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7XHJcbiAgQElucHV0KCkgdXNlcjogc3RyaW5nO1xyXG4gIHNob3dQb3AgPSBmYWxzZTtcclxuICBuYXZpZ2F0aW9uOiBOYXZpZ2F0aW9uO1xyXG5cclxuICBjb25zdHJ1Y3Rvcihwcml2YXRlIGh0dHBDbGllbnQ6IEh0dHBDbGllbnQpIHsgfVxyXG5cclxuXHJcbiAgbmdPbkluaXQoKSB7XHJcbiAgICB0aGlzLnN1YnNjcmlwdGlvbi5hZGQodGhpcy5odHRwQ2xpZW50LmdldDxOYXZpZ2F0aW9uPignaHR0cHM6Ly9zaGFyZWRjb21wb25lbnRzLWRldi5hcnRkYXRhLnNsdS5zZS9hc3NldHMvbGlua3MuanNvbicpLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICB0aGlzLm5hdmlnYXRpb24gPSByZXN1bHQ7XHJcbiAgICB9KSk7XHJcbiAgfVxyXG5cclxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcclxuICAgIHRoaXMuc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
|
@@ -4,16 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import { NgModule } from '@angular/core';
|
|
7
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
8
|
import { ADBHeaderComponent } from './adb-header.component';
|
|
9
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
8
10
|
export class ADBHeaderModule {
|
|
9
11
|
}
|
|
10
12
|
ADBHeaderModule.decorators = [
|
|
11
13
|
{ type: NgModule, args: [{
|
|
12
14
|
declarations: [ADBHeaderComponent],
|
|
13
15
|
imports: [
|
|
14
|
-
CommonModule
|
|
16
|
+
CommonModule,
|
|
17
|
+
HttpClientModule,
|
|
18
|
+
TranslateModule //add load to SharedComponentServer
|
|
15
19
|
],
|
|
16
20
|
exports: [ADBHeaderComponent]
|
|
17
21
|
},] }
|
|
18
22
|
];
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRiLWhlYWRlci5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hZGItc2hhcmVkLyIsInNvdXJjZXMiOlsibGliL2FkYi1oZWFkZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLGdCQUFnQixFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFZdkQsTUFBTSxPQUFPLGVBQWU7OztZQVQzQixRQUFRLFNBQUM7Z0JBQ1IsWUFBWSxFQUFFLENBQUMsa0JBQWtCLENBQUM7Z0JBQ2xDLE9BQU8sRUFBRTtvQkFDUCxZQUFZO29CQUNaLGdCQUFnQjtvQkFDaEIsZUFBZSxDQUFDLG1DQUFtQztpQkFDcEQ7Z0JBQ0QsT0FBTyxFQUFFLENBQUMsa0JBQWtCLENBQUM7YUFDOUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xyXG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBUcmFuc2xhdGVNb2R1bGUgfSBmcm9tICdAbmd4LXRyYW5zbGF0ZS9jb3JlJztcclxuaW1wb3J0IHsgQURCSGVhZGVyQ29tcG9uZW50IH0gZnJvbSAnLi9hZGItaGVhZGVyLmNvbXBvbmVudCc7XHJcbmltcG9ydCB7IEh0dHBDbGllbnRNb2R1bGV9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbi9odHRwJztcclxuXHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGRlY2xhcmF0aW9uczogW0FEQkhlYWRlckNvbXBvbmVudF0sXHJcbiAgaW1wb3J0czogW1xyXG4gICAgQ29tbW9uTW9kdWxlLFxyXG4gICAgSHR0cENsaWVudE1vZHVsZSxcclxuICAgIFRyYW5zbGF0ZU1vZHVsZSAvL2FkZCBsb2FkIHRvIFNoYXJlZENvbXBvbmVudFNlcnZlclxyXG4gIF0sXHJcbiAgZXhwb3J0czogW0FEQkhlYWRlckNvbXBvbmVudF1cclxufSlcclxuZXhwb3J0IGNsYXNzIEFEQkhlYWRlck1vZHVsZSB7IH1cclxuIl19
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @record
|
|
7
|
+
*/
|
|
8
|
+
export function Navigation() { }
|
|
9
|
+
if (false) {
|
|
10
|
+
/** @type {?} */
|
|
11
|
+
Navigation.prototype.links;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @record
|
|
15
|
+
*/
|
|
16
|
+
export function Link() { }
|
|
17
|
+
if (false) {
|
|
18
|
+
/** @type {?} */
|
|
19
|
+
Link.prototype.transId;
|
|
20
|
+
/** @type {?} */
|
|
21
|
+
Link.prototype.url;
|
|
22
|
+
/** @type {?} */
|
|
23
|
+
Link.prototype.topLink;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2aWdhdGlvbi5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FkYi1zaGFyZWQvIiwic291cmNlcyI6WyJsaWIvbmF2aWdhdGlvbi5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsZ0NBRUM7OztJQURHLDJCQUFjOzs7OztBQUdsQiwwQkFJQzs7O0lBSEcsdUJBQWdCOztJQUNoQixtQkFBWTs7SUFDWix1QkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIE5hdmlnYXRpb24ge1xyXG4gICAgbGlua3M6IExpbmtbXTtcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBMaW5rIHtcclxuICAgIHRyYW5zSWQ6IHN0cmluZztcclxuICAgIHVybDogc3RyaW5nO1xyXG4gICAgdG9wTGluazogYm9vbGVhbjtcclxufSJdfQ==
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
* @fileoverview added by tsickle
|
|
3
3
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
4
|
*/
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
6
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { Subscription } from 'rxjs';
|
|
6
8
|
var ADBHeaderComponent = /** @class */ (function () {
|
|
7
|
-
function ADBHeaderComponent() {
|
|
9
|
+
function ADBHeaderComponent(httpClient) {
|
|
10
|
+
this.httpClient = httpClient;
|
|
11
|
+
this.subscription = new Subscription();
|
|
8
12
|
this.loginClicked = new EventEmitter();
|
|
9
13
|
this.showPop = false;
|
|
10
14
|
}
|
|
@@ -15,15 +19,34 @@ var ADBHeaderComponent = /** @class */ (function () {
|
|
|
15
19
|
* @return {?}
|
|
16
20
|
*/
|
|
17
21
|
function () {
|
|
22
|
+
var _this = this;
|
|
23
|
+
this.subscription.add(this.httpClient.get('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe((/**
|
|
24
|
+
* @param {?} result
|
|
25
|
+
* @return {?}
|
|
26
|
+
*/
|
|
27
|
+
function (result) {
|
|
28
|
+
_this.navigation = result;
|
|
29
|
+
})));
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @return {?}
|
|
33
|
+
*/
|
|
34
|
+
ADBHeaderComponent.prototype.ngOnDestroy = /**
|
|
35
|
+
* @return {?}
|
|
36
|
+
*/
|
|
37
|
+
function () {
|
|
38
|
+
this.subscription.unsubscribe();
|
|
18
39
|
};
|
|
19
40
|
ADBHeaderComponent.decorators = [
|
|
20
41
|
{ type: Component, args: [{
|
|
21
42
|
selector: 'adb-header2',
|
|
22
|
-
template: "<header
|
|
43
|
+
template: "<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"
|
|
23
44
|
}] }
|
|
24
45
|
];
|
|
25
46
|
/** @nocollapse */
|
|
26
|
-
ADBHeaderComponent.ctorParameters = function () { return [
|
|
47
|
+
ADBHeaderComponent.ctorParameters = function () { return [
|
|
48
|
+
{ type: HttpClient }
|
|
49
|
+
]; };
|
|
27
50
|
ADBHeaderComponent.propDecorators = {
|
|
28
51
|
loginClicked: [{ type: Output }],
|
|
29
52
|
user: [{ type: Input }]
|
|
@@ -32,11 +55,23 @@ var ADBHeaderComponent = /** @class */ (function () {
|
|
|
32
55
|
}());
|
|
33
56
|
export { ADBHeaderComponent };
|
|
34
57
|
if (false) {
|
|
58
|
+
/**
|
|
59
|
+
* @type {?}
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
ADBHeaderComponent.prototype.subscription;
|
|
35
63
|
/** @type {?} */
|
|
36
64
|
ADBHeaderComponent.prototype.loginClicked;
|
|
37
65
|
/** @type {?} */
|
|
38
66
|
ADBHeaderComponent.prototype.user;
|
|
39
67
|
/** @type {?} */
|
|
40
68
|
ADBHeaderComponent.prototype.showPop;
|
|
69
|
+
/** @type {?} */
|
|
70
|
+
ADBHeaderComponent.prototype.navigation;
|
|
71
|
+
/**
|
|
72
|
+
* @type {?}
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
ADBHeaderComponent.prototype.httpClient;
|
|
41
76
|
}
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRiLWhlYWRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hZGItc2hhcmVkLyIsInNvdXJjZXMiOlsibGliL2FkYi1oZWFkZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQ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ZGNvbXBvbmVudHMtZGV2LmFydGRhdGEuc2x1LnNlL2Fzc2V0cy9saW5rcy5qc29uJykuc3Vic2NyaWJlKHJlc3VsdCA9PiB7XHJcbiAgICAgIHRoaXMubmF2aWdhdGlvbiA9IHJlc3VsdDtcclxuICAgIH0pKTtcclxuICB9XHJcblxyXG4gIG5nT25EZXN0cm95KCk6IHZvaWQge1xyXG4gICAgdGhpcy5zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import { NgModule } from '@angular/core';
|
|
7
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
8
|
import { ADBHeaderComponent } from './adb-header.component';
|
|
9
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
8
10
|
var ADBHeaderModule = /** @class */ (function () {
|
|
9
11
|
function ADBHeaderModule() {
|
|
10
12
|
}
|
|
@@ -12,7 +14,9 @@ var ADBHeaderModule = /** @class */ (function () {
|
|
|
12
14
|
{ type: NgModule, args: [{
|
|
13
15
|
declarations: [ADBHeaderComponent],
|
|
14
16
|
imports: [
|
|
15
|
-
CommonModule
|
|
17
|
+
CommonModule,
|
|
18
|
+
HttpClientModule,
|
|
19
|
+
TranslateModule //add load to SharedComponentServer
|
|
16
20
|
],
|
|
17
21
|
exports: [ADBHeaderComponent]
|
|
18
22
|
},] }
|
|
@@ -20,4 +24,4 @@ var ADBHeaderModule = /** @class */ (function () {
|
|
|
20
24
|
return ADBHeaderModule;
|
|
21
25
|
}());
|
|
22
26
|
export { ADBHeaderModule };
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRiLWhlYWRlci5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hZGItc2hhcm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tb24vaHR0cCc7XHJcblxyXG5cclxuQE5nTW9kdWxlKHtcclxuICBkZWNsYXJhdGlvbnM6IFtBREJIZWFkZXJDb21wb25lbnRdLFxyXG4gIGltcG9ydHM6IFtcclxuICAgIENvbW1vbk1vZHVsZSxcclxuICAgIEh0dHBDbGllbnRNb2R1bGUsXHJcbiAgICBUcmFuc2xhdGVNb2R1bGUgLy9hZGQgbG9hZCB0byBTaGFyZWRDb21wb25lbnRTZXJ2ZXJcclxuICBdLFxyXG4gIGV4cG9ydHM6IFtBREJIZWFkZXJDb21wb25lbnRdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBBREJIZWFkZXJNb2R1bGUgeyB9XHJcbiJdfQ==
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @record
|
|
7
|
+
*/
|
|
8
|
+
export function Navigation() { }
|
|
9
|
+
if (false) {
|
|
10
|
+
/** @type {?} */
|
|
11
|
+
Navigation.prototype.links;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @record
|
|
15
|
+
*/
|
|
16
|
+
export function Link() { }
|
|
17
|
+
if (false) {
|
|
18
|
+
/** @type {?} */
|
|
19
|
+
Link.prototype.transId;
|
|
20
|
+
/** @type {?} */
|
|
21
|
+
Link.prototype.url;
|
|
22
|
+
/** @type {?} */
|
|
23
|
+
Link.prototype.topLink;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2aWdhdGlvbi5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FkYi1zaGFyZWQvIiwic291cmNlcyI6WyJsaWIvbmF2aWdhdGlvbi5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsZ0NBRUM7OztJQURHLDJCQUFjOzs7OztBQUdsQiwwQkFJQzs7O0lBSEcsdUJBQWdCOztJQUNoQixtQkFBWTs7SUFDWix1QkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIE5hdmlnYXRpb24ge1xyXG4gICAgbGlua3M6IExpbmtbXTtcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBMaW5rIHtcclxuICAgIHRyYW5zSWQ6IHN0cmluZztcclxuICAgIHVybDogc3RyaW5nO1xyXG4gICAgdG9wTGluazogYm9vbGVhbjtcclxufSJdfQ==
|
package/fesm2015/adb-shared.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
1
2
|
import { EventEmitter, Component, Output, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
2
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* @fileoverview added by tsickle
|
|
6
9
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7
10
|
*/
|
|
8
11
|
class ADBHeaderComponent {
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @param {?} httpClient
|
|
14
|
+
*/
|
|
15
|
+
constructor(httpClient) {
|
|
16
|
+
this.httpClient = httpClient;
|
|
17
|
+
this.subscription = new Subscription();
|
|
10
18
|
this.loginClicked = new EventEmitter();
|
|
11
19
|
this.showPop = false;
|
|
12
20
|
}
|
|
@@ -14,27 +22,54 @@ class ADBHeaderComponent {
|
|
|
14
22
|
* @return {?}
|
|
15
23
|
*/
|
|
16
24
|
ngOnInit() {
|
|
25
|
+
this.subscription.add(this.httpClient.get('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe((/**
|
|
26
|
+
* @param {?} result
|
|
27
|
+
* @return {?}
|
|
28
|
+
*/
|
|
29
|
+
result => {
|
|
30
|
+
this.navigation = result;
|
|
31
|
+
})));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @return {?}
|
|
35
|
+
*/
|
|
36
|
+
ngOnDestroy() {
|
|
37
|
+
this.subscription.unsubscribe();
|
|
17
38
|
}
|
|
18
39
|
}
|
|
19
40
|
ADBHeaderComponent.decorators = [
|
|
20
41
|
{ type: Component, args: [{
|
|
21
42
|
selector: 'adb-header2',
|
|
22
|
-
template: "<header
|
|
43
|
+
template: "<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"
|
|
23
44
|
}] }
|
|
24
45
|
];
|
|
25
46
|
/** @nocollapse */
|
|
26
|
-
ADBHeaderComponent.ctorParameters = () => [
|
|
47
|
+
ADBHeaderComponent.ctorParameters = () => [
|
|
48
|
+
{ type: HttpClient }
|
|
49
|
+
];
|
|
27
50
|
ADBHeaderComponent.propDecorators = {
|
|
28
51
|
loginClicked: [{ type: Output }],
|
|
29
52
|
user: [{ type: Input }]
|
|
30
53
|
};
|
|
31
54
|
if (false) {
|
|
55
|
+
/**
|
|
56
|
+
* @type {?}
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
ADBHeaderComponent.prototype.subscription;
|
|
32
60
|
/** @type {?} */
|
|
33
61
|
ADBHeaderComponent.prototype.loginClicked;
|
|
34
62
|
/** @type {?} */
|
|
35
63
|
ADBHeaderComponent.prototype.user;
|
|
36
64
|
/** @type {?} */
|
|
37
65
|
ADBHeaderComponent.prototype.showPop;
|
|
66
|
+
/** @type {?} */
|
|
67
|
+
ADBHeaderComponent.prototype.navigation;
|
|
68
|
+
/**
|
|
69
|
+
* @type {?}
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
ADBHeaderComponent.prototype.httpClient;
|
|
38
73
|
}
|
|
39
74
|
|
|
40
75
|
/**
|
|
@@ -47,7 +82,9 @@ ADBHeaderModule.decorators = [
|
|
|
47
82
|
{ type: NgModule, args: [{
|
|
48
83
|
declarations: [ADBHeaderComponent],
|
|
49
84
|
imports: [
|
|
50
|
-
CommonModule
|
|
85
|
+
CommonModule,
|
|
86
|
+
HttpClientModule,
|
|
87
|
+
TranslateModule //add load to SharedComponentServer
|
|
51
88
|
],
|
|
52
89
|
exports: [ADBHeaderComponent]
|
|
53
90
|
},] }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb-shared.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit {\r\n
|
|
1
|
+
{"version":3,"file":"adb-shared.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Navigation } from './navigation.model';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit, OnDestroy {\r\n private subscription = new Subscription();\r\n @Output() loginClicked = new EventEmitter();\r\n @Input() user: string;\r\n showPop = false;\r\n navigation: Navigation;\r\n\r\n constructor(private httpClient: HttpClient) { }\r\n\r\n\r\n ngOnInit() {\r\n this.subscription.add(this.httpClient.get<Navigation>('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe(result => {\r\n this.navigation = result;\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ADBHeaderComponent } from './adb-header.component';\r\nimport { HttpClientModule} from '@angular/common/http';\r\n\r\n\r\n@NgModule({\r\n declarations: [ADBHeaderComponent],\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n TranslateModule //add load to SharedComponentServer\r\n ],\r\n exports: [ADBHeaderComponent]\r\n})\r\nexport class ADBHeaderModule { }\r\n"],"names":[],"mappings":";;;;;;;;;;AAAA,MASa,kBAAkB;;;;IAO7B,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QANlC,iBAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,iBAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QAE5C,YAAO,GAAG,KAAK,CAAC;KAG+B;;;;IAG/C,QAAQ;QACN,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,+DAA+D,CAAC,CAAC,SAAS;;;;QAAC,MAAM;YACrI,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;SAC1B,EAAC,CAAC,CAAC;KACL;;;;IAED,WAAW;QACT,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;KACjC;;;YAtBF,SAAS,SAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,uuCAA0C;aAC3C;;;;YARQ,UAAU;;;2BAWhB,MAAM;mBACN,KAAK;;;;;;;IAFN,0CAA0C;;IAC1C,0CAA4C;;IAC5C,kCAAsB;;IACtB,qCAAgB;;IAChB,wCAAuB;;;;;IAEX,wCAA8B;;;;;;;AChB5C,MAgBa,eAAe;;;YAT3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;gBAClC,OAAO,EAAE;oBACP,YAAY;oBACZ,gBAAgB;oBAChB,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;;;;;;;;;;;;;"}
|
package/fesm5/adb-shared.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
1
2
|
import { EventEmitter, Component, Output, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
2
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* @fileoverview added by tsickle
|
|
6
9
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7
10
|
*/
|
|
8
11
|
var ADBHeaderComponent = /** @class */ (function () {
|
|
9
|
-
function ADBHeaderComponent() {
|
|
12
|
+
function ADBHeaderComponent(httpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
this.subscription = new Subscription();
|
|
10
15
|
this.loginClicked = new EventEmitter();
|
|
11
16
|
this.showPop = false;
|
|
12
17
|
}
|
|
@@ -17,15 +22,34 @@ var ADBHeaderComponent = /** @class */ (function () {
|
|
|
17
22
|
* @return {?}
|
|
18
23
|
*/
|
|
19
24
|
function () {
|
|
25
|
+
var _this = this;
|
|
26
|
+
this.subscription.add(this.httpClient.get('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe((/**
|
|
27
|
+
* @param {?} result
|
|
28
|
+
* @return {?}
|
|
29
|
+
*/
|
|
30
|
+
function (result) {
|
|
31
|
+
_this.navigation = result;
|
|
32
|
+
})));
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @return {?}
|
|
36
|
+
*/
|
|
37
|
+
ADBHeaderComponent.prototype.ngOnDestroy = /**
|
|
38
|
+
* @return {?}
|
|
39
|
+
*/
|
|
40
|
+
function () {
|
|
41
|
+
this.subscription.unsubscribe();
|
|
20
42
|
};
|
|
21
43
|
ADBHeaderComponent.decorators = [
|
|
22
44
|
{ type: Component, args: [{
|
|
23
45
|
selector: 'adb-header2',
|
|
24
|
-
template: "<header
|
|
46
|
+
template: "<header class=\"top-header\">\r\n <nav>\r\n <div class=\"logo\">\r\n <img src=\"/assets/images/logo.svg\">\r\n </div>\r\n <div class=\"title\">Artfakta</div>\r\n <nav class=\"quick-nav\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a [href]=\"link.url\" *ngIf=\"link.topLink\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n <button class=\"btn btn-primary\" (click)=\"showPop=!showPop\">\r\n <!-- {{'ADB_HEADER.MENY'|translate}} --> MENY\r\n </button>\r\n </nav>\r\n <div class=\"user\">\r\n JA\r\n </div>\r\n </nav>\r\n <div class=\"pop\" *ngIf=\"showPop\">\r\n <div class=\"pop-body menu\">\r\n <ul>\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <li>\r\n <a [href]=\"link.url\">\r\n {{link.transId|translate}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</header>\r\n"
|
|
25
47
|
}] }
|
|
26
48
|
];
|
|
27
49
|
/** @nocollapse */
|
|
28
|
-
ADBHeaderComponent.ctorParameters = function () { return [
|
|
50
|
+
ADBHeaderComponent.ctorParameters = function () { return [
|
|
51
|
+
{ type: HttpClient }
|
|
52
|
+
]; };
|
|
29
53
|
ADBHeaderComponent.propDecorators = {
|
|
30
54
|
loginClicked: [{ type: Output }],
|
|
31
55
|
user: [{ type: Input }]
|
|
@@ -33,12 +57,24 @@ var ADBHeaderComponent = /** @class */ (function () {
|
|
|
33
57
|
return ADBHeaderComponent;
|
|
34
58
|
}());
|
|
35
59
|
if (false) {
|
|
60
|
+
/**
|
|
61
|
+
* @type {?}
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
ADBHeaderComponent.prototype.subscription;
|
|
36
65
|
/** @type {?} */
|
|
37
66
|
ADBHeaderComponent.prototype.loginClicked;
|
|
38
67
|
/** @type {?} */
|
|
39
68
|
ADBHeaderComponent.prototype.user;
|
|
40
69
|
/** @type {?} */
|
|
41
70
|
ADBHeaderComponent.prototype.showPop;
|
|
71
|
+
/** @type {?} */
|
|
72
|
+
ADBHeaderComponent.prototype.navigation;
|
|
73
|
+
/**
|
|
74
|
+
* @type {?}
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
ADBHeaderComponent.prototype.httpClient;
|
|
42
78
|
}
|
|
43
79
|
|
|
44
80
|
/**
|
|
@@ -52,7 +88,9 @@ var ADBHeaderModule = /** @class */ (function () {
|
|
|
52
88
|
{ type: NgModule, args: [{
|
|
53
89
|
declarations: [ADBHeaderComponent],
|
|
54
90
|
imports: [
|
|
55
|
-
CommonModule
|
|
91
|
+
CommonModule,
|
|
92
|
+
HttpClientModule,
|
|
93
|
+
TranslateModule //add load to SharedComponentServer
|
|
56
94
|
],
|
|
57
95
|
exports: [ADBHeaderComponent]
|
|
58
96
|
},] }
|
package/fesm5/adb-shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb-shared.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit {\r\n
|
|
1
|
+
{"version":3,"file":"adb-shared.js","sources":["ng://adb-shared/lib/adb-header.component.ts","ng://adb-shared/lib/adb-header.module.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Navigation } from './navigation.model';\r\n\r\n@Component({\r\n selector: 'adb-header2',\r\n templateUrl: './adb-header.component.html'\r\n})\r\nexport class ADBHeaderComponent implements OnInit, OnDestroy {\r\n private subscription = new Subscription();\r\n @Output() loginClicked = new EventEmitter();\r\n @Input() user: string;\r\n showPop = false;\r\n navigation: Navigation;\r\n\r\n constructor(private httpClient: HttpClient) { }\r\n\r\n\r\n ngOnInit() {\r\n this.subscription.add(this.httpClient.get<Navigation>('https://sharedcomponents-dev.artdata.slu.se/assets/links.json').subscribe(result => {\r\n this.navigation = result;\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ADBHeaderComponent } from './adb-header.component';\r\nimport { HttpClientModule} from '@angular/common/http';\r\n\r\n\r\n@NgModule({\r\n declarations: [ADBHeaderComponent],\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n TranslateModule //add load to SharedComponentServer\r\n ],\r\n exports: [ADBHeaderComponent]\r\n})\r\nexport class ADBHeaderModule { }\r\n"],"names":[],"mappings":";;;;;;;;;;AAAA;IAgBE,4BAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QANlC,iBAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,iBAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QAE5C,YAAO,GAAG,KAAK,CAAC;KAG+B;;;;IAG/C,qCAAQ;;;IAAR;QAAA,iBAIC;QAHC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,+DAA+D,CAAC,CAAC,SAAS;;;;QAAC,UAAA,MAAM;YACrI,KAAI,CAAC,UAAU,GAAG,MAAM,CAAC;SAC1B,EAAC,CAAC,CAAC;KACL;;;;IAED,wCAAW;;;IAAX;QACE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;KACjC;;gBAtBF,SAAS,SAAC;oBACT,QAAQ,EAAE,aAAa;oBACvB,uuCAA0C;iBAC3C;;;;gBARQ,UAAU;;;+BAWhB,MAAM;uBACN,KAAK;;IAiBR,yBAAC;CAxBD,IAwBC;;;;;;IAnBC,0CAA0C;;IAC1C,0CAA4C;;IAC5C,kCAAsB;;IACtB,qCAAgB;;IAChB,wCAAuB;;;;;IAEX,wCAA8B;;;;;;;AChB5C;IAOA;KASgC;;gBAT/B,QAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;IAC8B,sBAAC;CAThC;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
+
import { Navigation } from './navigation.model';
|
|
4
|
+
export declare class ADBHeaderComponent implements OnInit, OnDestroy {
|
|
5
|
+
private httpClient;
|
|
6
|
+
private subscription;
|
|
3
7
|
loginClicked: EventEmitter<any>;
|
|
4
8
|
user: string;
|
|
5
9
|
showPop: boolean;
|
|
6
|
-
|
|
10
|
+
navigation: Navigation;
|
|
11
|
+
constructor(httpClient: HttpClient);
|
|
7
12
|
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
8
14
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adb-shared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"author": "ADB",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/common": "^8.2.0",
|
|
8
|
-
"@angular/core": "^8.2.0"
|
|
8
|
+
"@angular/core": "^8.2.0",
|
|
9
|
+
"@ngx-translate/core": "11.0.1"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"tslib": "^1.9.0"
|
|
9
13
|
},
|
|
10
14
|
"main": "bundles/adb-shared.umd.js",
|
|
11
15
|
"module": "fesm5/adb-shared.js",
|
|
@@ -16,8 +20,5 @@
|
|
|
16
20
|
"fesm2015": "fesm2015/adb-shared.js",
|
|
17
21
|
"typings": "adb-shared.d.ts",
|
|
18
22
|
"metadata": "adb-shared.metadata.json",
|
|
19
|
-
"sideEffects": false
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"tslib": "^1.9.0"
|
|
22
|
-
}
|
|
23
|
+
"sideEffects": false
|
|
23
24
|
}
|