@valtimo/swagger 4.15.2-next-main.8

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.
@@ -0,0 +1,164 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@valtimo/security'), require('swagger-ui'), require('ngx-logger'), require('@valtimo/config'), require('@angular/router'), require('@valtimo/contract')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/swagger', ['exports', '@angular/core', '@angular/common', '@valtimo/security', 'swagger-ui', 'ngx-logger', '@valtimo/config', '@angular/router', '@valtimo/contract'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.swagger = {}), global.ng.core, global.ng.common, global.security, global.SwaggerUI, global.ngxLogger, global.config, global.ng.router, global.contract));
5
+ }(this, (function (exports, core, common, security, SwaggerUI, ngxLogger, config, router, contract) { 'use strict';
6
+
7
+ SwaggerUI = SwaggerUI && Object.prototype.hasOwnProperty.call(SwaggerUI, 'default') ? SwaggerUI['default'] : SwaggerUI;
8
+
9
+ /*
10
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
11
+ *
12
+ * Licensed under EUPL, Version 1.2 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" basis,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ var SwaggerComponent = /** @class */ (function () {
25
+ function SwaggerComponent(configService, el, userProviderService, logger) {
26
+ this.configService = configService;
27
+ this.el = el;
28
+ this.userProviderService = userProviderService;
29
+ this.logger = logger;
30
+ this.valtimoSwaggerConfig = configService.config.swagger;
31
+ }
32
+ SwaggerComponent.prototype.ngAfterViewInit = function () {
33
+ var _this = this;
34
+ this.userProviderService.getToken().then(function (authToken) {
35
+ _this.logger.debug("swagger ngAfterViewInit token: " + authToken);
36
+ SwaggerUI({
37
+ url: _this.valtimoSwaggerConfig.endpointUri,
38
+ domNode: _this.el.nativeElement.querySelector('.swagger-container'),
39
+ deepLinking: true,
40
+ presets: [
41
+ SwaggerUI.presets.apis
42
+ ],
43
+ requestInterceptor: function (request) {
44
+ request.headers.Authorization = "Bearer " + authToken;
45
+ return request;
46
+ }
47
+ });
48
+ });
49
+ };
50
+ return SwaggerComponent;
51
+ }());
52
+ SwaggerComponent.decorators = [
53
+ { type: core.Component, args: [{
54
+ selector: 'valtimo-swagger',
55
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"container-fluid\">\n <div class='swagger-container'></div>\n</div>\n",
56
+ encapsulation: core.ViewEncapsulation.None,
57
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.swagger-ui .info .title{height:auto}.swagger-ui .info .title small pre{background-color:inherit}"]
58
+ },] }
59
+ ];
60
+ SwaggerComponent.ctorParameters = function () { return [
61
+ { type: config.ConfigService },
62
+ { type: core.ElementRef },
63
+ { type: security.UserProviderService },
64
+ { type: ngxLogger.NGXLogger }
65
+ ]; };
66
+
67
+ /*
68
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
69
+ *
70
+ * Licensed under EUPL, Version 1.2 (the "License");
71
+ * you may not use this file except in compliance with the License.
72
+ * You may obtain a copy of the License at
73
+ *
74
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
75
+ *
76
+ * Unless required by applicable law or agreed to in writing, software
77
+ * distributed under the License is distributed on an "AS IS" basis,
78
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79
+ * See the License for the specific language governing permissions and
80
+ * limitations under the License.
81
+ */
82
+ var ɵ0 = { title: 'Swagger', roles: [contract.ROLE_USER] };
83
+ var routes = [
84
+ {
85
+ path: 'swagger',
86
+ component: SwaggerComponent,
87
+ canActivate: [security.AuthGuardService],
88
+ data: ɵ0
89
+ }
90
+ ];
91
+ var SwaggerRoutingModule = /** @class */ (function () {
92
+ function SwaggerRoutingModule() {
93
+ }
94
+ return SwaggerRoutingModule;
95
+ }());
96
+ SwaggerRoutingModule.decorators = [
97
+ { type: core.NgModule, args: [{
98
+ imports: [
99
+ common.CommonModule,
100
+ router.RouterModule.forChild(routes),
101
+ ],
102
+ exports: [router.RouterModule]
103
+ },] }
104
+ ];
105
+
106
+ /*
107
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
108
+ *
109
+ * Licensed under EUPL, Version 1.2 (the "License");
110
+ * you may not use this file except in compliance with the License.
111
+ * You may obtain a copy of the License at
112
+ *
113
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
114
+ *
115
+ * Unless required by applicable law or agreed to in writing, software
116
+ * distributed under the License is distributed on an "AS IS" basis,
117
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
118
+ * See the License for the specific language governing permissions and
119
+ * limitations under the License.
120
+ */
121
+ var SwaggerModule = /** @class */ (function () {
122
+ function SwaggerModule() {
123
+ }
124
+ return SwaggerModule;
125
+ }());
126
+ SwaggerModule.decorators = [
127
+ { type: core.NgModule, args: [{
128
+ declarations: [SwaggerComponent],
129
+ imports: [
130
+ common.CommonModule,
131
+ SwaggerRoutingModule
132
+ ],
133
+ exports: [SwaggerComponent]
134
+ },] }
135
+ ];
136
+
137
+ /*
138
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
139
+ *
140
+ * Licensed under EUPL, Version 1.2 (the "License");
141
+ * you may not use this file except in compliance with the License.
142
+ * You may obtain a copy of the License at
143
+ *
144
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
145
+ *
146
+ * Unless required by applicable law or agreed to in writing, software
147
+ * distributed under the License is distributed on an "AS IS" basis,
148
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149
+ * See the License for the specific language governing permissions and
150
+ * limitations under the License.
151
+ */
152
+
153
+ /**
154
+ * Generated bundle index. Do not edit.
155
+ */
156
+
157
+ exports.SwaggerComponent = SwaggerComponent;
158
+ exports.SwaggerModule = SwaggerModule;
159
+ exports.ɵa = SwaggerRoutingModule;
160
+
161
+ Object.defineProperty(exports, '__esModule', { value: true });
162
+
163
+ })));
164
+ //# sourceMappingURL=valtimo-swagger.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-swagger.umd.js","sources":["../../../../projects/valtimo/swagger/src/lib/swagger.component.ts","../../../../projects/valtimo/swagger/src/lib/swagger-routing.module.ts","../../../../projects/valtimo/swagger/src/lib/swagger.module.ts","../../../../projects/valtimo/swagger/src/public_api.ts","../../../../projects/valtimo/swagger/src/valtimo-swagger.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, ElementRef, ViewEncapsulation} from '@angular/core';\nimport {UserProviderService} from '@valtimo/security';\nimport SwaggerUI from 'swagger-ui';\nimport {NGXLogger} from 'ngx-logger';\nimport {ConfigService} from '@valtimo/config';\n\n@Component({\n selector: 'valtimo-swagger',\n templateUrl: './swagger.component.html',\n styleUrls: ['./swagger.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SwaggerComponent implements AfterViewInit {\n\n private valtimoSwaggerConfig: any;\n\n constructor(\n private configService: ConfigService,\n private el: ElementRef,\n private userProviderService: UserProviderService,\n private logger: NGXLogger\n ) {\n this.valtimoSwaggerConfig = configService.config.swagger;\n }\n\n ngAfterViewInit() {\n this.userProviderService.getToken().then((authToken: string) => {\n this.logger.debug(`swagger ngAfterViewInit token: ${authToken}`);\n SwaggerUI({\n url: this.valtimoSwaggerConfig.endpointUri,\n domNode: this.el.nativeElement.querySelector('.swagger-container'),\n deepLinking: true,\n presets: [\n SwaggerUI.presets.apis\n ],\n requestInterceptor(request) {\n request.headers.Authorization = `Bearer ${authToken}`;\n return request;\n }\n });\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {SwaggerComponent} from './swagger.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'swagger',\n component: SwaggerComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Swagger', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class SwaggerRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {SwaggerComponent} from './swagger.component';\nimport {SwaggerRoutingModule} from './swagger-routing.module';\n\n@NgModule({\n declarations: [SwaggerComponent],\n imports: [\n CommonModule,\n SwaggerRoutingModule\n ],\n exports: [SwaggerComponent]\n})\nexport class SwaggerModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of swagger\n */\n\nexport * from './lib/swagger.module';\nexport * from './lib/swagger.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {SwaggerRoutingModule as ɵa} from './lib/swagger-routing.module';"],"names":["Component","ViewEncapsulation","ConfigService","ElementRef","UserProviderService","NGXLogger","ROLE_USER","AuthGuardService","NgModule","CommonModule","RouterModule"],"mappings":";;;;;;;;IAAA;;;;;;;;;;;;;;;;QAgCE,0BACU,aAA4B,EAC5B,EAAc,EACd,mBAAwC,EACxC,MAAiB;YAHjB,kBAAa,GAAb,aAAa,CAAe;YAC5B,OAAE,GAAF,EAAE,CAAY;YACd,wBAAmB,GAAnB,mBAAmB,CAAqB;YACxC,WAAM,GAAN,MAAM,CAAW;YAEzB,IAAI,CAAC,oBAAoB,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC;SAC1D;QAED,0CAAe,GAAf;YAAA,iBAgBC;YAfC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAC,SAAiB;gBACzD,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oCAAkC,SAAW,CAAC,CAAC;gBACjE,SAAS,CAAC;oBACR,GAAG,EAAE,KAAI,CAAC,oBAAoB,CAAC,WAAW;oBAC1C,OAAO,EAAE,KAAI,CAAC,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC;oBAClE,WAAW,EAAE,IAAI;oBACjB,OAAO,EAAE;wBACP,SAAS,CAAC,OAAO,CAAC,IAAI;qBACvB;oBACD,kBAAkB,YAAC,OAAO;wBACxB,OAAO,CAAC,OAAO,CAAC,aAAa,GAAG,YAAU,SAAW,CAAC;wBACtD,OAAO,OAAO,CAAC;qBAChB;iBACF,CAAC,CAAC;aACJ,CAAC,CAAC;SACJ;;;;gBAnCFA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,8uBAAuC;oBAEvC,aAAa,EAAEC,sBAAiB,CAAC,IAAI;;iBACtC;;;gBAPOC,oBAAa;gBAJaC,eAAU;gBACpCC,4BAAmB;gBAEnBC,mBAAS;;;ICnBjB;;;;;;;;;;;;;;;aA4BU,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAACC,kBAAS,CAAC,EAAC;IALhD,IAAM,MAAM,GAAW;QACrB;YACE,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,gBAAgB;YAC3B,WAAW,EAAE,CAACC,yBAAgB,CAAC;YAC/B,IAAI,IAAwC;SAC7C;KACF,CAAC;;QASF;;;;;gBAPCC,aAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,mBAAY;wBACZC,mBAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;qBAC9B;oBACD,OAAO,EAAE,CAACA,mBAAY,CAAC;iBACxB;;;ICtCD;;;;;;;;;;;;;;;;QA6BA;;;;;gBARCF,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE;wBACPC,mBAAY;wBACZ,oBAAoB;qBACrB;oBACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;iBAC5B;;;IC5BD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@valtimo/security"),require("swagger-ui"),require("ngx-logger"),require("@valtimo/config"),require("@angular/router"),require("@valtimo/contract")):"function"==typeof define&&define.amd?define("@valtimo/swagger",["exports","@angular/core","@angular/common","@valtimo/security","swagger-ui","ngx-logger","@valtimo/config","@angular/router","@valtimo/contract"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.swagger={}),e.ng.core,e.ng.common,e.security,e.SwaggerUI,e.ngxLogger,e.config,e.ng.router,e.contract)}(this,(function(e,t,n,i,r,o,a,s,u){"use strict";r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var c=function(){function e(e,t,n,i){this.configService=e,this.el=t,this.userProviderService=n,this.logger=i,this.valtimoSwaggerConfig=e.config.swagger}return e.prototype.ngAfterViewInit=function(){var e=this;this.userProviderService.getToken().then((function(t){e.logger.debug("swagger ngAfterViewInit token: "+t),r({url:e.valtimoSwaggerConfig.endpointUri,domNode:e.el.nativeElement.querySelector(".swagger-container"),deepLinking:!0,presets:[r.presets.apis],requestInterceptor:function(e){return e.headers.Authorization="Bearer "+t,e}})}))},e}();c.decorators=[{type:t.Component,args:[{selector:"valtimo-swagger",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="container-fluid">\n <div class=\'swagger-container\'></div>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.swagger-ui .info .title{height:auto}.swagger-ui .info .title small pre{background-color:inherit}']}]}],c.ctorParameters=function(){return[{type:a.ConfigService},{type:t.ElementRef},{type:i.UserProviderService},{type:o.NGXLogger}]};var g={title:"Swagger",roles:[u.ROLE_USER]},l=[{path:"swagger",component:c,canActivate:[i.AuthGuardService],data:g}],p=function(){};p.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,s.RouterModule.forChild(l)],exports:[s.RouterModule]}]}];var d=function(){};d.decorators=[{type:t.NgModule,args:[{declarations:[c],imports:[n.CommonModule,p],exports:[c]}]}],e.SwaggerComponent=c,e.SwaggerModule=d,e.ɵa=p,Object.defineProperty(e,"__esModule",{value:!0})}));
2
+ //# sourceMappingURL=valtimo-swagger.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../projects/valtimo/swagger/src/lib/swagger.component.ts","../../../../projects/valtimo/swagger/src/lib/swagger-routing.module.ts","../../../../projects/valtimo/swagger/src/lib/swagger.module.ts"],"names":["SwaggerComponent","configService","el","userProviderService","logger","this","valtimoSwaggerConfig","config","swagger","prototype","ngAfterViewInit","_this","getToken","then","authToken","debug","SwaggerUI","url","endpointUri","domNode","nativeElement","querySelector","deepLinking","presets","apis","requestInterceptor","request","headers","Authorization","Component","args","selector","template","encapsulation","ViewEncapsulation","None","ConfigService","ElementRef","UserProviderService","NGXLogger","title","roles","ROLE_USER","routes","path","component","canActivate","AuthGuardService","data","ɵ0","NgModule","imports","CommonModule","RouterModule","forChild","exports","declarations","SwaggerRoutingModule"],"mappings":"+wBAgCE,SAAAA,EACUC,EACAC,EACAC,EACAC,GAHAC,KAAAJ,cAAAA,EACAI,KAAAH,GAAAA,EACAG,KAAAF,oBAAAA,EACAE,KAAAD,OAAAA,EAERC,KAAKC,qBAAuBL,EAAcM,OAAOC,eAGnDR,EAAAS,UAAAC,gBAAA,WAAA,IAAAC,EAAAN,KACEA,KAAKF,oBAAoBS,WAAWC,MAAK,SAACC,GACxCH,EAAKP,OAAOW,MAAM,kCAAkCD,GACpDE,EAAU,CACRC,IAAKN,EAAKL,qBAAqBY,YAC/BC,QAASR,EAAKT,GAAGkB,cAAcC,cAAc,sBAC7CC,aAAa,EACbC,QAAS,CACPP,EAAUO,QAAQC,MAEpBC,mBAAkB,SAACC,GAEjB,OADAA,EAAQC,QAAQC,cAAgB,UAAUd,EACnCY,kCA/BhBG,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,uuBAEAC,cAAeC,EAAAA,kBAAkBC,uxBAN3BC,EAAAA,qBAJ0BC,EAAAA,kBAC1BC,EAAAA,2BAEAC,EAAAA,mBCSE,CAACC,MAAO,UAAWC,MAAO,CAACC,EAAAA,YAL/BC,EAAiB,CACrB,CACEC,KAAM,UACNC,UAAW7C,EACX8C,YAAa,CAACC,EAAAA,kBACdC,KAAIC,MAWR,iCAPCC,EAAAA,SAAQpB,KAAA,CAAC,CACRqB,QAAS,CACPC,EAAAA,aACAC,EAAAA,aAAaC,SAASX,IAExBY,QAAS,CAACF,EAAAA,wBCRZ,iCARCH,EAAAA,SAAQpB,KAAA,CAAC,CACR0B,aAAc,CAACxD,GACfmD,QAAS,CACPC,EAAAA,aACAK,GAEFF,QAAS,CAACvD","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, ElementRef, ViewEncapsulation} from '@angular/core';\nimport {UserProviderService} from '@valtimo/security';\nimport SwaggerUI from 'swagger-ui';\nimport {NGXLogger} from 'ngx-logger';\nimport {ConfigService} from '@valtimo/config';\n\n@Component({\n selector: 'valtimo-swagger',\n templateUrl: './swagger.component.html',\n styleUrls: ['./swagger.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SwaggerComponent implements AfterViewInit {\n\n private valtimoSwaggerConfig: any;\n\n constructor(\n private configService: ConfigService,\n private el: ElementRef,\n private userProviderService: UserProviderService,\n private logger: NGXLogger\n ) {\n this.valtimoSwaggerConfig = configService.config.swagger;\n }\n\n ngAfterViewInit() {\n this.userProviderService.getToken().then((authToken: string) => {\n this.logger.debug(`swagger ngAfterViewInit token: ${authToken}`);\n SwaggerUI({\n url: this.valtimoSwaggerConfig.endpointUri,\n domNode: this.el.nativeElement.querySelector('.swagger-container'),\n deepLinking: true,\n presets: [\n SwaggerUI.presets.apis\n ],\n requestInterceptor(request) {\n request.headers.Authorization = `Bearer ${authToken}`;\n return request;\n }\n });\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {SwaggerComponent} from './swagger.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'swagger',\n component: SwaggerComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Swagger', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class SwaggerRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {SwaggerComponent} from './swagger.component';\nimport {SwaggerRoutingModule} from './swagger-routing.module';\n\n@NgModule({\n declarations: [SwaggerComponent],\n imports: [\n CommonModule,\n SwaggerRoutingModule\n ],\n exports: [SwaggerComponent]\n})\nexport class SwaggerModule {\n\n}\n"]}
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NgModule } from '@angular/core';
17
+ import { RouterModule } from '@angular/router';
18
+ import { CommonModule } from '@angular/common';
19
+ import { AuthGuardService } from '@valtimo/security';
20
+ import { SwaggerComponent } from './swagger.component';
21
+ import { ROLE_USER } from '@valtimo/contract';
22
+ const ɵ0 = { title: 'Swagger', roles: [ROLE_USER] };
23
+ const routes = [
24
+ {
25
+ path: 'swagger',
26
+ component: SwaggerComponent,
27
+ canActivate: [AuthGuardService],
28
+ data: ɵ0
29
+ }
30
+ ];
31
+ export class SwaggerRoutingModule {
32
+ }
33
+ SwaggerRoutingModule.decorators = [
34
+ { type: NgModule, args: [{
35
+ imports: [
36
+ CommonModule,
37
+ RouterModule.forChild(routes),
38
+ ],
39
+ exports: [RouterModule]
40
+ },] }
41
+ ];
42
+ export { ɵ0 };
43
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dhZ2dlci1yb3V0aW5nLm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RoR3VhcmRTZXJ2aWNlfSBmcm9tICdAdmFsdGltby9zZWN1cml0eSc7XG5pbXBvcnQge1N3YWdnZXJDb21wb25lbnR9IGZyb20gJy4vc3dhZ2dlci5jb21wb25lbnQnO1xuaW1wb3J0IHtST0xFX1VTRVJ9IGZyb20gJ0B2YWx0aW1vL2NvbnRyYWN0JztcblxuY29uc3Qgcm91dGVzOiBSb3V0ZXMgPSBbXG4gIHtcbiAgICBwYXRoOiAnc3dhZ2dlcicsXG4gICAgY29tcG9uZW50OiBTd2FnZ2VyQ29tcG9uZW50LFxuICAgIGNhbkFjdGl2YXRlOiBbQXV0aEd1YXJkU2VydmljZV0sXG4gICAgZGF0YToge3RpdGxlOiAnU3dhZ2dlcicsIHJvbGVzOiBbUk9MRV9VU0VSXX1cbiAgfVxuXTtcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZSxcbiAgICBSb3V0ZXJNb2R1bGUuZm9yQ2hpbGQocm91dGVzKSxcbiAgXSxcbiAgZXhwb3J0czogW1JvdXRlck1vZHVsZV1cbn0pXG5leHBvcnQgY2xhc3MgU3dhZ2dlclJvdXRpbmdNb2R1bGUge1xufVxuIl19
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Component, ElementRef, ViewEncapsulation } from '@angular/core';
17
+ import { UserProviderService } from '@valtimo/security';
18
+ import SwaggerUI from 'swagger-ui';
19
+ import { NGXLogger } from 'ngx-logger';
20
+ import { ConfigService } from '@valtimo/config';
21
+ export class SwaggerComponent {
22
+ constructor(configService, el, userProviderService, logger) {
23
+ this.configService = configService;
24
+ this.el = el;
25
+ this.userProviderService = userProviderService;
26
+ this.logger = logger;
27
+ this.valtimoSwaggerConfig = configService.config.swagger;
28
+ }
29
+ ngAfterViewInit() {
30
+ this.userProviderService.getToken().then((authToken) => {
31
+ this.logger.debug(`swagger ngAfterViewInit token: ${authToken}`);
32
+ SwaggerUI({
33
+ url: this.valtimoSwaggerConfig.endpointUri,
34
+ domNode: this.el.nativeElement.querySelector('.swagger-container'),
35
+ deepLinking: true,
36
+ presets: [
37
+ SwaggerUI.presets.apis
38
+ ],
39
+ requestInterceptor(request) {
40
+ request.headers.Authorization = `Bearer ${authToken}`;
41
+ return request;
42
+ }
43
+ });
44
+ });
45
+ }
46
+ }
47
+ SwaggerComponent.decorators = [
48
+ { type: Component, args: [{
49
+ selector: 'valtimo-swagger',
50
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"container-fluid\">\n <div class='swagger-container'></div>\n</div>\n",
51
+ encapsulation: ViewEncapsulation.None,
52
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.swagger-ui .info .title{height:auto}.swagger-ui .info .title small pre{background-color:inherit}"]
53
+ },] }
54
+ ];
55
+ SwaggerComponent.ctorParameters = () => [
56
+ { type: ConfigService },
57
+ { type: ElementRef },
58
+ { type: UserProviderService },
59
+ { type: NGXLogger }
60
+ ];
61
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dhZ2dlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL3N3YWdnZXIvc3JjL2xpYi9zd2FnZ2VyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBZ0IsU0FBUyxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN0RixPQUFPLEVBQUMsbUJBQW1CLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUN0RCxPQUFPLFNBQVMsTUFBTSxZQUFZLENBQUM7QUFDbkMsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLFlBQVksQ0FBQztBQUNyQyxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFROUMsTUFBTSxPQUFPLGdCQUFnQjtJQUkzQixZQUNVLGFBQTRCLEVBQzVCLEVBQWMsRUFDZCxtQkFBd0MsRUFDeEMsTUFBaUI7UUFIakIsa0JBQWEsR0FBYixhQUFhLENBQWU7UUFDNUIsT0FBRSxHQUFGLEVBQUUsQ0FBWTtRQUNkLHdCQUFtQixHQUFuQixtQkFBbUIsQ0FBcUI7UUFDeEMsV0FBTSxHQUF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W1vU3dhZ2dlckNvbmZpZy5lbmRwb2ludFVyaSxcbiAgICAgICAgZG9tTm9kZTogdGhpcy5lbC5uYXRpdmVFbGVtZW50LnF1ZXJ5U2VsZWN0b3IoJy5zd2FnZ2VyLWNvbnRhaW5lcicpLFxuICAgICAgICBkZWVwTGlua2luZzogdHJ1ZSxcbiAgICAgICAgcHJlc2V0czogW1xuICAgICAgICAgIFN3YWdnZXJVSS5wcmVzZXRzLmFwaXNcbiAgICAgICAgXSxcbiAgICAgICAgcmVxdWVzdEludGVyY2VwdG9yKHJlcXVlc3QpIHtcbiAgICAgICAgICByZXF1ZXN0LmhlYWRlcnMuQXV0aG9yaXphdGlvbiA9IGBCZWFyZXIgJHthdXRoVG9rZW59YDtcbiAgICAgICAgICByZXR1cm4gcmVxdWVzdDtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxufVxuIl19
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NgModule } from '@angular/core';
17
+ import { CommonModule } from '@angular/common';
18
+ import { SwaggerComponent } from './swagger.component';
19
+ import { SwaggerRoutingModule } from './swagger-routing.module';
20
+ export class SwaggerModule {
21
+ }
22
+ SwaggerModule.decorators = [
23
+ { type: NgModule, args: [{
24
+ declarations: [SwaggerComponent],
25
+ imports: [
26
+ CommonModule,
27
+ SwaggerRoutingModule
28
+ ],
29
+ exports: [SwaggerComponent]
30
+ },] }
31
+ ];
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 -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /*
17
+ * Public API Surface of swagger
18
+ */
19
+ export * from './lib/swagger.module';
20
+ export * from './lib/swagger.component';
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vc3dhZ2dlci9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVIOztHQUVHO0FBRUgsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIENvcHlyaWdodCAyMDE1LTIwMjAgUml0ZW5zZSBCViwgdGhlIE5ldGhlcmxhbmRzLlxuICpcbiAqIExpY2Vuc2VkIHVuZGVyIEVVUEwsIFZlcnNpb24gMS4yICh0aGUgXCJMaWNlbnNlXCIpO1xuICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0XG4gKlxuICogaHR0cHM6Ly9qb2ludXAuZWMuZXVyb3BhLmV1L2NvbGxlY3Rpb24vZXVwbC9ldXBsLXRleHQtZXVwbC0xMlxuICpcbiAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmVcbiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuIFwiQVMgSVNcIiBiYXNpcyxcbiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLlxuICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZFxuICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuXG4gKi9cblxuLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBzd2FnZ2VyXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvc3dhZ2dlci5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc3dhZ2dlci5jb21wb25lbnQnO1xuIl19
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public_api';
5
+ export { SwaggerRoutingModule as ɵa } from './lib/swagger-routing.module';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1zd2FnZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9zd2FnZ2VyL3NyYy92YWx0aW1vLXN3YWdnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsb0JBQW9CLElBQUksRUFBRSxFQUFDLE1BQU0sOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG5cbmV4cG9ydCB7U3dhZ2dlclJvdXRpbmdNb2R1bGUgYXMgybVhfSBmcm9tICcuL2xpYi9zd2FnZ2VyLXJvdXRpbmcubW9kdWxlJzsiXX0=
@@ -0,0 +1,151 @@
1
+ import { Component, ViewEncapsulation, ElementRef, NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { UserProviderService, AuthGuardService } from '@valtimo/security';
4
+ import SwaggerUI from 'swagger-ui';
5
+ import { NGXLogger } from 'ngx-logger';
6
+ import { ConfigService } from '@valtimo/config';
7
+ import { RouterModule } from '@angular/router';
8
+ import { ROLE_USER } from '@valtimo/contract';
9
+
10
+ /*
11
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
12
+ *
13
+ * Licensed under EUPL, Version 1.2 (the "License");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" basis,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+ class SwaggerComponent {
26
+ constructor(configService, el, userProviderService, logger) {
27
+ this.configService = configService;
28
+ this.el = el;
29
+ this.userProviderService = userProviderService;
30
+ this.logger = logger;
31
+ this.valtimoSwaggerConfig = configService.config.swagger;
32
+ }
33
+ ngAfterViewInit() {
34
+ this.userProviderService.getToken().then((authToken) => {
35
+ this.logger.debug(`swagger ngAfterViewInit token: ${authToken}`);
36
+ SwaggerUI({
37
+ url: this.valtimoSwaggerConfig.endpointUri,
38
+ domNode: this.el.nativeElement.querySelector('.swagger-container'),
39
+ deepLinking: true,
40
+ presets: [
41
+ SwaggerUI.presets.apis
42
+ ],
43
+ requestInterceptor(request) {
44
+ request.headers.Authorization = `Bearer ${authToken}`;
45
+ return request;
46
+ }
47
+ });
48
+ });
49
+ }
50
+ }
51
+ SwaggerComponent.decorators = [
52
+ { type: Component, args: [{
53
+ selector: 'valtimo-swagger',
54
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"container-fluid\">\n <div class='swagger-container'></div>\n</div>\n",
55
+ encapsulation: ViewEncapsulation.None,
56
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.swagger-ui .info .title{height:auto}.swagger-ui .info .title small pre{background-color:inherit}"]
57
+ },] }
58
+ ];
59
+ SwaggerComponent.ctorParameters = () => [
60
+ { type: ConfigService },
61
+ { type: ElementRef },
62
+ { type: UserProviderService },
63
+ { type: NGXLogger }
64
+ ];
65
+
66
+ /*
67
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
68
+ *
69
+ * Licensed under EUPL, Version 1.2 (the "License");
70
+ * you may not use this file except in compliance with the License.
71
+ * You may obtain a copy of the License at
72
+ *
73
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
74
+ *
75
+ * Unless required by applicable law or agreed to in writing, software
76
+ * distributed under the License is distributed on an "AS IS" basis,
77
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
78
+ * See the License for the specific language governing permissions and
79
+ * limitations under the License.
80
+ */
81
+ const ɵ0 = { title: 'Swagger', roles: [ROLE_USER] };
82
+ const routes = [
83
+ {
84
+ path: 'swagger',
85
+ component: SwaggerComponent,
86
+ canActivate: [AuthGuardService],
87
+ data: ɵ0
88
+ }
89
+ ];
90
+ class SwaggerRoutingModule {
91
+ }
92
+ SwaggerRoutingModule.decorators = [
93
+ { type: NgModule, args: [{
94
+ imports: [
95
+ CommonModule,
96
+ RouterModule.forChild(routes),
97
+ ],
98
+ exports: [RouterModule]
99
+ },] }
100
+ ];
101
+
102
+ /*
103
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
104
+ *
105
+ * Licensed under EUPL, Version 1.2 (the "License");
106
+ * you may not use this file except in compliance with the License.
107
+ * You may obtain a copy of the License at
108
+ *
109
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
110
+ *
111
+ * Unless required by applicable law or agreed to in writing, software
112
+ * distributed under the License is distributed on an "AS IS" basis,
113
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114
+ * See the License for the specific language governing permissions and
115
+ * limitations under the License.
116
+ */
117
+ class SwaggerModule {
118
+ }
119
+ SwaggerModule.decorators = [
120
+ { type: NgModule, args: [{
121
+ declarations: [SwaggerComponent],
122
+ imports: [
123
+ CommonModule,
124
+ SwaggerRoutingModule
125
+ ],
126
+ exports: [SwaggerComponent]
127
+ },] }
128
+ ];
129
+
130
+ /*
131
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
132
+ *
133
+ * Licensed under EUPL, Version 1.2 (the "License");
134
+ * you may not use this file except in compliance with the License.
135
+ * You may obtain a copy of the License at
136
+ *
137
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
138
+ *
139
+ * Unless required by applicable law or agreed to in writing, software
140
+ * distributed under the License is distributed on an "AS IS" basis,
141
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142
+ * See the License for the specific language governing permissions and
143
+ * limitations under the License.
144
+ */
145
+
146
+ /**
147
+ * Generated bundle index. Do not edit.
148
+ */
149
+
150
+ export { SwaggerComponent, SwaggerModule, SwaggerRoutingModule as ɵa };
151
+ //# sourceMappingURL=valtimo-swagger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-swagger.js","sources":["../../../../projects/valtimo/swagger/src/lib/swagger.component.ts","../../../../projects/valtimo/swagger/src/lib/swagger-routing.module.ts","../../../../projects/valtimo/swagger/src/lib/swagger.module.ts","../../../../projects/valtimo/swagger/src/public_api.ts","../../../../projects/valtimo/swagger/src/valtimo-swagger.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, ElementRef, ViewEncapsulation} from '@angular/core';\nimport {UserProviderService} from '@valtimo/security';\nimport SwaggerUI from 'swagger-ui';\nimport {NGXLogger} from 'ngx-logger';\nimport {ConfigService} from '@valtimo/config';\n\n@Component({\n selector: 'valtimo-swagger',\n templateUrl: './swagger.component.html',\n styleUrls: ['./swagger.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SwaggerComponent implements AfterViewInit {\n\n private valtimoSwaggerConfig: any;\n\n constructor(\n private configService: ConfigService,\n private el: ElementRef,\n private userProviderService: UserProviderService,\n private logger: NGXLogger\n ) {\n this.valtimoSwaggerConfig = configService.config.swagger;\n }\n\n ngAfterViewInit() {\n this.userProviderService.getToken().then((authToken: string) => {\n this.logger.debug(`swagger ngAfterViewInit token: ${authToken}`);\n SwaggerUI({\n url: this.valtimoSwaggerConfig.endpointUri,\n domNode: this.el.nativeElement.querySelector('.swagger-container'),\n deepLinking: true,\n presets: [\n SwaggerUI.presets.apis\n ],\n requestInterceptor(request) {\n request.headers.Authorization = `Bearer ${authToken}`;\n return request;\n }\n });\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {SwaggerComponent} from './swagger.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'swagger',\n component: SwaggerComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Swagger', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class SwaggerRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {SwaggerComponent} from './swagger.component';\nimport {SwaggerRoutingModule} from './swagger-routing.module';\n\n@NgModule({\n declarations: [SwaggerComponent],\n imports: [\n CommonModule,\n SwaggerRoutingModule\n ],\n exports: [SwaggerComponent]\n})\nexport class SwaggerModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of swagger\n */\n\nexport * from './lib/swagger.module';\nexport * from './lib/swagger.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {SwaggerRoutingModule as ɵa} from './lib/swagger-routing.module';"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;MA4Ba,gBAAgB;IAI3B,YACU,aAA4B,EAC5B,EAAc,EACd,mBAAwC,EACxC,MAAiB;QAHjB,kBAAa,GAAb,aAAa,CAAe;QAC5B,OAAE,GAAF,EAAE,CAAY;QACd,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,WAAM,GAAN,MAAM,CAAW;QAEzB,IAAI,CAAC,oBAAoB,GAAG,aAAa,CAAC,MAAM,C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AQ,SAAC;gBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;gBAChC,OAAO,EAAE;oBACP,YAAY;oBACZ,oBAAoB;iBACrB;gBACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;aAC5B;;;AC5BD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare class SwaggerRoutingModule {
2
+ }
@@ -0,0 +1,13 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import { UserProviderService } from '@valtimo/security';
3
+ import { NGXLogger } from 'ngx-logger';
4
+ import { ConfigService } from '@valtimo/config';
5
+ export declare class SwaggerComponent implements AfterViewInit {
6
+ private configService;
7
+ private el;
8
+ private userProviderService;
9
+ private logger;
10
+ private valtimoSwaggerConfig;
11
+ constructor(configService: ConfigService, el: ElementRef, userProviderService: UserProviderService, logger: NGXLogger);
12
+ ngAfterViewInit(): void;
13
+ }
@@ -0,0 +1,2 @@
1
+ export declare class SwaggerModule {
2
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@valtimo/swagger",
3
+ "version": "4.15.2-next-main.8",
4
+ "peerDependencies": {
5
+ "@angular/common": "^10.0.11",
6
+ "@angular/core": "^10.0.11"
7
+ },
8
+ "dependencies": {
9
+ "swagger-ui": "^3.25.0",
10
+ "tslib": "^2.0.0"
11
+ },
12
+ "main": "bundles/valtimo-swagger.umd.js",
13
+ "module": "fesm2015/valtimo-swagger.js",
14
+ "es2015": "fesm2015/valtimo-swagger.js",
15
+ "esm2015": "esm2015/valtimo-swagger.js",
16
+ "fesm2015": "fesm2015/valtimo-swagger.js",
17
+ "typings": "valtimo-swagger.d.ts",
18
+ "metadata": "valtimo-swagger.metadata.json",
19
+ "sideEffects": false
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/swagger.module';
2
+ export * from './lib/swagger.component';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public_api';
5
+ export { SwaggerRoutingModule as ɵa } from './lib/swagger-routing.module';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"SwaggerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":21,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SwaggerComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"SwaggerComponent"}]}]}],"members":{}},"SwaggerComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"valtimo-swagger","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":26,"character":17},"member":"None"},"template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"container-fluid\">\n <div class='swagger-container'></div>\n</div>\n","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.swagger-ui .info .title{height:auto}.swagger-ui .info .title small pre{background-color:inherit}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":33,"character":27},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":34,"character":16},{"__symbolic":"reference","module":"@valtimo/security","name":"UserProviderService","line":35,"character":33},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":36,"character":20}]}],"ngAfterViewInit":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":34,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":35,"character":4},"member":"forChild"},"arguments":[[{"path":"swagger","component":{"__symbolic":"reference","name":"SwaggerComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":27,"character":18}],"data":{"title":"Swagger","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_USER","line":28,"character":37}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":37,"character":12}]}]}],"members":{}}},"origins":{"SwaggerModule":"./lib/swagger.module","SwaggerComponent":"./lib/swagger.component","ɵa":"./lib/swagger-routing.module"},"importAs":"@valtimo/swagger"}