@valtimo/decision 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,341 @@
1
+ import { ɵɵdefineInjectable, ɵɵinject, Injectable, EventEmitter, Component, Output, ViewChild, ViewEncapsulation, NgModule } from '@angular/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { ConfigService } from '@valtimo/config';
4
+ import { WidgetModule, ListModule, ModalModule } from '@valtimo/components';
5
+ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
6
+ import { CommonModule } from '@angular/common';
7
+ import { AuthGuardService } from '@valtimo/security';
8
+ import DmnViewer from 'dmn-js';
9
+ import { ROLE_ADMIN } from '@valtimo/contract';
10
+ import { FormsModule } from '@angular/forms';
11
+ import { TranslateModule } from '@ngx-translate/core';
12
+
13
+ /*
14
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
15
+ *
16
+ * Licensed under EUPL, Version 1.2 (the "License");
17
+ * you may not use this file except in compliance with the License.
18
+ * You may obtain a copy of the License at
19
+ *
20
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software
23
+ * distributed under the License is distributed on an "AS IS" basis,
24
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
+ * See the License for the specific language governing permissions and
26
+ * limitations under the License.
27
+ */
28
+ class DecisionService {
29
+ constructor(configService, http) {
30
+ this.configService = configService;
31
+ this.http = http;
32
+ this.valtimoApiConfig = configService.config.valtimoApi;
33
+ }
34
+ deployDmn(dmn) {
35
+ const formData = new FormData();
36
+ formData.append('file', dmn);
37
+ formData.append('deployment-name', 'dmnTableDeploy');
38
+ formData.append('deployment-source', 'process application');
39
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/deployment/create`, formData);
40
+ }
41
+ getDecisions() {
42
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/decision-definition`);
43
+ }
44
+ getDecisionXml(decisionId) {
45
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/decision-definition/${decisionId}/xml`);
46
+ }
47
+ }
48
+ DecisionService.ɵprov = ɵɵdefineInjectable({ factory: function DecisionService_Factory() { return new DecisionService(ɵɵinject(ConfigService), ɵɵinject(HttpClient)); }, token: DecisionService, providedIn: "root" });
49
+ DecisionService.decorators = [
50
+ { type: Injectable, args: [{
51
+ providedIn: 'root'
52
+ },] }
53
+ ];
54
+ DecisionService.ctorParameters = () => [
55
+ { type: ConfigService },
56
+ { type: HttpClient }
57
+ ];
58
+
59
+ /*
60
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
61
+ *
62
+ * Licensed under EUPL, Version 1.2 (the "License");
63
+ * you may not use this file except in compliance with the License.
64
+ * You may obtain a copy of the License at
65
+ *
66
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
67
+ *
68
+ * Unless required by applicable law or agreed to in writing, software
69
+ * distributed under the License is distributed on an "AS IS" basis,
70
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
+ * See the License for the specific language governing permissions and
72
+ * limitations under the License.
73
+ */
74
+ class DecisionDeployComponent {
75
+ constructor(decisionService) {
76
+ this.decisionService = decisionService;
77
+ this.dmn = null;
78
+ this.deploySuccessful = new EventEmitter();
79
+ }
80
+ ngOnInit() {
81
+ }
82
+ onChange(files) {
83
+ this.dmn = files.item(0);
84
+ }
85
+ deployDmn() {
86
+ this.decisionService.deployDmn(this.dmn).subscribe(() => {
87
+ this.modal.hide();
88
+ this.deploySuccessful.emit();
89
+ });
90
+ }
91
+ openModal() {
92
+ this.modal.show();
93
+ }
94
+ }
95
+ DecisionDeployComponent.decorators = [
96
+ { type: Component, args: [{
97
+ selector: 'valtimo-decision-deploy',
98
+ 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<valtimo-modal #decisionDeployModal elementId=\"decisionDeployModal\" title=\"Upload Decision table\" [showFooter]=\"true\">\n <div body>\n <div class=\"mt-3\">{{ 'decisions.upload.description' | translate }}</div>\n <div class=\"form-group mt-3 mb-3\">\n <input type=\"file\"\n id=\"file\"\n accept=\".dmn\"\n (change)=\"onChange($event.target.files)\">\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-right\">\n <button [disabled]=\"!dmn\" class=\"btn btn-primary btn-space\" type=\"button\" (click)=\"deployDmn()\">\n <i class=\"fa fa-upload\"></i> &nbsp;\n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n\n",
99
+ 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 */"]
100
+ },] }
101
+ ];
102
+ DecisionDeployComponent.ctorParameters = () => [
103
+ { type: DecisionService }
104
+ ];
105
+ DecisionDeployComponent.propDecorators = {
106
+ deploySuccessful: [{ type: Output }],
107
+ modal: [{ type: ViewChild, args: ['decisionDeployModal',] }]
108
+ };
109
+
110
+ /*
111
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
112
+ *
113
+ * Licensed under EUPL, Version 1.2 (the "License");
114
+ * you may not use this file except in compliance with the License.
115
+ * You may obtain a copy of the License at
116
+ *
117
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
118
+ *
119
+ * Unless required by applicable law or agreed to in writing, software
120
+ * distributed under the License is distributed on an "AS IS" basis,
121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
+ * See the License for the specific language governing permissions and
123
+ * limitations under the License.
124
+ */
125
+ class DecisionListComponent {
126
+ constructor(decisionService, router) {
127
+ this.decisionService = decisionService;
128
+ this.router = router;
129
+ this.fields = [
130
+ { key: 'key', label: 'Key' },
131
+ { key: 'name', label: 'Name' },
132
+ { key: 'version', label: 'Version' },
133
+ ];
134
+ }
135
+ ngOnInit() {
136
+ this.loadDecisions();
137
+ }
138
+ loadDecisions() {
139
+ this.decisionService.getDecisions().subscribe((decisions) => {
140
+ this.decisions = decisions;
141
+ });
142
+ }
143
+ viewDecisionTable(decision) {
144
+ this.router.navigate(['/decision-tables', decision.id]);
145
+ }
146
+ }
147
+ DecisionListComponent.decorators = [
148
+ { type: Component, args: [{
149
+ selector: 'valtimo-decision-list',
150
+ 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<valtimo-widget>\n <valtimo-list [items]=\"decisions\" [fields]=\"fields\" (rowClicked)=\"viewDecisionTable($event)\"\n [header]=\"true\" [viewMode]=\"true\" [isSearchable]=\"true\">\n <div header>\n <h3 class=\"list-header-title\">{{ 'Decision tables' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Decision tables' | translate }}</h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n",
151
+ 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 */"]
152
+ },] }
153
+ ];
154
+ DecisionListComponent.ctorParameters = () => [
155
+ { type: DecisionService },
156
+ { type: Router }
157
+ ];
158
+
159
+ /*
160
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
161
+ *
162
+ * Licensed under EUPL, Version 1.2 (the "License");
163
+ * you may not use this file except in compliance with the License.
164
+ * You may obtain a copy of the License at
165
+ *
166
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
167
+ *
168
+ * Unless required by applicable law or agreed to in writing, software
169
+ * distributed under the License is distributed on an "AS IS" basis,
170
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
171
+ * See the License for the specific language governing permissions and
172
+ * limitations under the License.
173
+ */
174
+ class DecisionComponent {
175
+ }
176
+ DecisionComponent.decorators = [
177
+ { type: Component, args: [{
178
+ selector: 'valtimo-decision',
179
+ 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=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button (click)=\"this.deploy.openModal()\" class=\"btn btn-secondary btn-space mr-0\">\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n <valtimo-decision-list #decisionList></valtimo-decision-list>\n <valtimo-decision-deploy #decisionDeploy (deploySuccessful)=\"this.list.loadDecisions()\"></valtimo-decision-deploy>\n </div>\n</div>\n",
180
+ 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 */"]
181
+ },] }
182
+ ];
183
+ DecisionComponent.propDecorators = {
184
+ deploy: [{ type: ViewChild, args: ['decisionDeploy',] }],
185
+ list: [{ type: ViewChild, args: ['decisionList',] }]
186
+ };
187
+
188
+ /*
189
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
190
+ *
191
+ * Licensed under EUPL, Version 1.2 (the "License");
192
+ * you may not use this file except in compliance with the License.
193
+ * You may obtain a copy of the License at
194
+ *
195
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
196
+ *
197
+ * Unless required by applicable law or agreed to in writing, software
198
+ * distributed under the License is distributed on an "AS IS" basis,
199
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ * See the License for the specific language governing permissions and
201
+ * limitations under the License.
202
+ */
203
+ class DecisionDisplayComponent {
204
+ constructor(decisionService, route) {
205
+ this.decisionService = decisionService;
206
+ this.route = route;
207
+ }
208
+ ngOnInit() {
209
+ this.viewer = new DmnViewer({
210
+ container: '#canvas'
211
+ });
212
+ this.decisionId = this.route.snapshot.paramMap.get('id');
213
+ this.loadDecisionXml();
214
+ }
215
+ loadDecisionXml() {
216
+ this.decisionService.getDecisionXml(this.decisionId).subscribe((decision) => {
217
+ this.viewer.importXML(decision.dmnXml);
218
+ this.decisionXml = decision.dmnXml;
219
+ });
220
+ }
221
+ download() {
222
+ const file = new Blob([this.decisionXml], { type: 'text/xml' });
223
+ const link = document.createElement('a');
224
+ link.download = `decision_table_${this.decisionId}.dmn`;
225
+ link.href = window.URL.createObjectURL(file);
226
+ link.click();
227
+ window.URL.revokeObjectURL(link.href);
228
+ link.remove();
229
+ }
230
+ }
231
+ DecisionDisplayComponent.decorators = [
232
+ { type: Component, args: [{
233
+ selector: 'valtimo-decision-display',
234
+ 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=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button (click)=\"download()\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"fa fa-save\"></i> &nbsp;\n <span>{{ 'Download' | translate }}</span>\n </button>\n </div>\n </div>\n <div id=\"canvas\">\n </div>\n </div>\n</div>\n",
235
+ encapsulation: ViewEncapsulation.None,
236
+ 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 */"]
237
+ },] }
238
+ ];
239
+ DecisionDisplayComponent.ctorParameters = () => [
240
+ { type: DecisionService },
241
+ { type: ActivatedRoute }
242
+ ];
243
+
244
+ /*
245
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
246
+ *
247
+ * Licensed under EUPL, Version 1.2 (the "License");
248
+ * you may not use this file except in compliance with the License.
249
+ * You may obtain a copy of the License at
250
+ *
251
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
252
+ *
253
+ * Unless required by applicable law or agreed to in writing, software
254
+ * distributed under the License is distributed on an "AS IS" basis,
255
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
256
+ * See the License for the specific language governing permissions and
257
+ * limitations under the License.
258
+ */
259
+ const ɵ0 = { title: 'Decision tables', roles: [ROLE_ADMIN] }, ɵ1 = { title: 'Decision tables', roles: [ROLE_ADMIN] };
260
+ const routes = [
261
+ {
262
+ path: 'decision-tables',
263
+ component: DecisionComponent,
264
+ canActivate: [AuthGuardService],
265
+ data: ɵ0
266
+ },
267
+ {
268
+ path: 'decision-tables/:id',
269
+ component: DecisionDisplayComponent,
270
+ canActivate: [AuthGuardService],
271
+ data: ɵ1
272
+ }
273
+ ];
274
+ class DecisionRoutingModule {
275
+ }
276
+ DecisionRoutingModule.decorators = [
277
+ { type: NgModule, args: [{
278
+ declarations: [],
279
+ imports: [
280
+ CommonModule,
281
+ RouterModule.forChild(routes)
282
+ ],
283
+ exports: [RouterModule]
284
+ },] }
285
+ ];
286
+
287
+ /*
288
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
289
+ *
290
+ * Licensed under EUPL, Version 1.2 (the "License");
291
+ * you may not use this file except in compliance with the License.
292
+ * You may obtain a copy of the License at
293
+ *
294
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
295
+ *
296
+ * Unless required by applicable law or agreed to in writing, software
297
+ * distributed under the License is distributed on an "AS IS" basis,
298
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
299
+ * See the License for the specific language governing permissions and
300
+ * limitations under the License.
301
+ */
302
+ class DecisionModule {
303
+ }
304
+ DecisionModule.decorators = [
305
+ { type: NgModule, args: [{
306
+ declarations: [DecisionComponent, DecisionDeployComponent, DecisionDisplayComponent, DecisionListComponent],
307
+ imports: [
308
+ DecisionRoutingModule,
309
+ WidgetModule,
310
+ ListModule,
311
+ TranslateModule,
312
+ ModalModule,
313
+ CommonModule,
314
+ FormsModule
315
+ ],
316
+ exports: [DecisionComponent]
317
+ },] }
318
+ ];
319
+
320
+ /*
321
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
322
+ *
323
+ * Licensed under EUPL, Version 1.2 (the "License");
324
+ * you may not use this file except in compliance with the License.
325
+ * You may obtain a copy of the License at
326
+ *
327
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
328
+ *
329
+ * Unless required by applicable law or agreed to in writing, software
330
+ * distributed under the License is distributed on an "AS IS" basis,
331
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
332
+ * See the License for the specific language governing permissions and
333
+ * limitations under the License.
334
+ */
335
+
336
+ /**
337
+ * Generated bundle index. Do not edit.
338
+ */
339
+
340
+ export { DecisionComponent, DecisionModule, DecisionDeployComponent as ɵa, DecisionService as ɵb, DecisionDisplayComponent as ɵc, DecisionListComponent as ɵd, DecisionRoutingModule as ɵe };
341
+ //# sourceMappingURL=valtimo-decision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-decision.js","sources":["../../../../projects/valtimo/decision/src/lib/decision.service.ts","../../../../projects/valtimo/decision/src/lib/decision-deploy/decision-deploy.component.ts","../../../../projects/valtimo/decision/src/lib/decision-list/decision-list.component.ts","../../../../projects/valtimo/decision/src/lib/decision.component.ts","../../../../projects/valtimo/decision/src/lib/decision-display/decision-display.component.ts","../../../../projects/valtimo/decision/src/lib/decision-routing.module.ts","../../../../projects/valtimo/decision/src/lib/decision.module.ts","../../../../projects/valtimo/decision/src/public-api.ts","../../../../projects/valtimo/decision/src/valtimo-decision.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 {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {Decision, DecisionXml} from '@valtimo/contract';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DecisionService {\n\n private valtimoApiConfig: any;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n deployDmn(dmn: File): Observable<any> {\n const formData: FormData = new FormData();\n formData.append('file', dmn);\n formData.append('deployment-name', 'dmnTableDeploy');\n formData.append('deployment-source', 'process application');\n return this.http.post<any>(\n `${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/deployment/create`, formData\n );\n }\n\n getDecisions(): Observable<Decision[]> {\n return this.http.get<Decision[]>(`${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/decision-definition`);\n }\n\n getDecisionXml(decisionId: string): Observable<DecisionXml> {\n return this.http.get<DecisionXml>(\n `${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/decision-definition/${decisionId}/xml`\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 {Component, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';\nimport {DecisionService} from '../decision.service';\nimport {ModalComponent} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-decision-deploy',\n templateUrl: './decision-deploy.component.html',\n styleUrls: ['./decision-deploy.component.scss']\n})\nexport class DecisionDeployComponent implements OnInit {\n public dmn: File | null = null;\n @Output() deploySuccessful = new EventEmitter();\n @ViewChild('decisionDeployModal') modal: ModalComponent;\n\n constructor(\n private decisionService: DecisionService\n ) {\n }\n\n ngOnInit() {\n }\n\n onChange(files: FileList): void {\n this.dmn = files.item(0);\n }\n\n deployDmn(): void {\n this.decisionService.deployDmn(this.dmn).subscribe(() => {\n this.modal.hide();\n this.deploySuccessful.emit();\n });\n }\n\n openModal() {\n this.modal.show();\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 {Component, OnInit} from '@angular/core';\nimport {Decision} from '@valtimo/contract';\nimport {DecisionService} from '../decision.service';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-decision-list',\n templateUrl: './decision-list.component.html',\n styleUrls: ['./decision-list.component.scss']\n})\nexport class DecisionListComponent implements OnInit {\n\n public decisions: Decision[];\n public fields = [\n {key: 'key', label: 'Key'},\n {key: 'name', label: 'Name'},\n {key: 'version', label: 'Version'},\n ];\n\n constructor(\n private decisionService: DecisionService,\n private router: Router\n ) {\n }\n\n ngOnInit() {\n this.loadDecisions();\n }\n\n loadDecisions() {\n this.decisionService.getDecisions().subscribe((decisions: Decision[]) => {\n this.decisions = decisions;\n });\n }\n\n viewDecisionTable(decision: Decision) {\n this.router.navigate(['/decision-tables', decision.id]);\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 {Component, ViewChild} from '@angular/core';\nimport {DecisionDeployComponent} from './decision-deploy/decision-deploy.component';\nimport {DecisionListComponent} from './decision-list/decision-list.component';\n\n@Component({\n selector: 'valtimo-decision',\n templateUrl: './decision.component.html',\n styleUrls: ['./decision.component.scss']\n})\nexport class DecisionComponent {\n @ViewChild('decisionDeploy') deploy: DecisionDeployComponent;\n @ViewChild('decisionList') list: DecisionListComponent;\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 {Component, OnInit, ViewEncapsulation} from '@angular/core';\nimport {DecisionService} from '../decision.service';\nimport DmnViewer from 'dmn-js';\nimport {DecisionXml} from '@valtimo/contract';\nimport {ActivatedRoute} from '@angular/router';\n\n@Component({\n selector: 'valtimo-decision-display',\n templateUrl: './decision-display.component.html',\n styleUrls: ['./decision-display.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class DecisionDisplayComponent implements OnInit {\n\n public viewer: DmnViewer;\n private decisionId: string;\n public decisionXml: string;\n\n constructor(\n private decisionService: DecisionService,\n private route: ActivatedRoute\n ) {\n }\n\n ngOnInit() {\n this.viewer = new DmnViewer({\n container: '#canvas'\n });\n this.decisionId = this.route.snapshot.paramMap.get('id');\n this.loadDecisionXml();\n }\n\n loadDecisionXml(): void {\n this.decisionService.getDecisionXml(this.decisionId).subscribe((decision: DecisionXml) => {\n this.viewer.importXML(decision.dmnXml);\n this.decisionXml = decision.dmnXml;\n });\n }\n\n download(): void {\n const file = new Blob([this.decisionXml], {type: 'text/xml'});\n const link = document.createElement('a');\n link.download = `decision_table_${this.decisionId}.dmn`;\n link.href = window.URL.createObjectURL(file);\n link.click();\n window.URL.revokeObjectURL(link.href);\n link.remove();\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 {DecisionComponent} from './decision.component';\nimport {DecisionDisplayComponent} from './decision-display/decision-display.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'decision-tables',\n component: DecisionComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Decision tables', roles: [ROLE_ADMIN]}\n },\n {\n path: 'decision-tables/:id',\n component: DecisionDisplayComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Decision tables', roles: [ROLE_ADMIN]}\n }\n];\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes)\n ],\n exports: [RouterModule]\n})\nexport class DecisionRoutingModule {\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 {DecisionComponent} from './decision.component';\nimport {DecisionRoutingModule} from './decision-routing.module';\nimport {DecisionDeployComponent} from './decision-deploy/decision-deploy.component';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {DecisionDisplayComponent} from './decision-display/decision-display.component';\nimport {DecisionListComponent} from './decision-list/decision-list.component';\nimport {ListModule, ModalModule, WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [DecisionComponent, DecisionDeployComponent, DecisionDisplayComponent, DecisionListComponent],\n imports: [\n DecisionRoutingModule,\n WidgetModule,\n ListModule,\n TranslateModule,\n ModalModule,\n CommonModule,\n FormsModule\n ],\n exports: [DecisionComponent]\n})\nexport class DecisionModule {\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 decision\n */\n\nexport * from './lib/decision.module';\nexport * from './lib/decision.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {DecisionDeployComponent as ɵa} from './lib/decision-deploy/decision-deploy.component';\nexport {DecisionDisplayComponent as ɵc} from './lib/decision-display/decision-display.component';\nexport {DecisionListComponent as ɵd} from './lib/decision-list/decision-list.component';\nexport {DecisionRoutingModule as ɵe} from './lib/decision-routing.module';\nexport {DecisionService as ɵb} from './lib/decision.service';"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,eAAe;IAI1B,YACU,aAA4B,EAC5B,IAAgB;QADhB,kBAAa,GAAb,aAAa,CAAe;QAC5B,SAAI,GAAJ,IAAI,CAAY;QAExB,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;KACzD;IAED,SAAS,CAAC,GAAS;QACjB,MAAM,QAAQ,GAAa,IAAI,QAAQ,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QACrD,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,IAA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;QAC5B,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,IAAI,IAAiD;KACtD;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,SAAS,EAAE,wBAAwB;QACnC,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,IAAI,IAAiD;KACtD;CACF,CAAC;MAUW,qBAAqB;;;YARjC,QAAQ,SAAC;gBACR,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE;oBACP,YAAY;oBACZ,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC9B;gBACD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;AC9CD;;;;;;;;;;;;;;;MAwCa,cAAc;;;YAb1B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,iBAAiB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,qBAAqB,CAAC;gBAC3G,OAAO,EAAE;oBACP,qBAAqB;oBACrB,YAAY;oBACZ,UAAU;oBACV,eAAe;oBACf,WAAW;oBACX,YAAY;oBACZ,WAAW;iBACZ;gBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;aAC7B;;;ACvCD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -0,0 +1,14 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { DecisionService } from '../decision.service';
3
+ import { ModalComponent } from '@valtimo/components';
4
+ export declare class DecisionDeployComponent implements OnInit {
5
+ private decisionService;
6
+ dmn: File | null;
7
+ deploySuccessful: EventEmitter<any>;
8
+ modal: ModalComponent;
9
+ constructor(decisionService: DecisionService);
10
+ ngOnInit(): void;
11
+ onChange(files: FileList): void;
12
+ deployDmn(): void;
13
+ openModal(): void;
14
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { DecisionService } from '../decision.service';
3
+ import DmnViewer from 'dmn-js';
4
+ import { ActivatedRoute } from '@angular/router';
5
+ export declare class DecisionDisplayComponent implements OnInit {
6
+ private decisionService;
7
+ private route;
8
+ viewer: DmnViewer;
9
+ private decisionId;
10
+ decisionXml: string;
11
+ constructor(decisionService: DecisionService, route: ActivatedRoute);
12
+ ngOnInit(): void;
13
+ loadDecisionXml(): void;
14
+ download(): void;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Decision } from '@valtimo/contract';
3
+ import { DecisionService } from '../decision.service';
4
+ import { Router } from '@angular/router';
5
+ export declare class DecisionListComponent implements OnInit {
6
+ private decisionService;
7
+ private router;
8
+ decisions: Decision[];
9
+ fields: {
10
+ key: string;
11
+ label: string;
12
+ }[];
13
+ constructor(decisionService: DecisionService, router: Router);
14
+ ngOnInit(): void;
15
+ loadDecisions(): void;
16
+ viewDecisionTable(decision: Decision): void;
17
+ }
@@ -0,0 +1,2 @@
1
+ export declare class DecisionRoutingModule {
2
+ }
@@ -0,0 +1,6 @@
1
+ import { DecisionDeployComponent } from './decision-deploy/decision-deploy.component';
2
+ import { DecisionListComponent } from './decision-list/decision-list.component';
3
+ export declare class DecisionComponent {
4
+ deploy: DecisionDeployComponent;
5
+ list: DecisionListComponent;
6
+ }
@@ -0,0 +1,2 @@
1
+ export declare class DecisionModule {
2
+ }
@@ -0,0 +1,13 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Decision, DecisionXml } from '@valtimo/contract';
4
+ import { ConfigService } from '@valtimo/config';
5
+ export declare class DecisionService {
6
+ private configService;
7
+ private http;
8
+ private valtimoApiConfig;
9
+ constructor(configService: ConfigService, http: HttpClient);
10
+ deployDmn(dmn: File): Observable<any>;
11
+ getDecisions(): Observable<Decision[]>;
12
+ getDecisionXml(decisionId: string): Observable<DecisionXml>;
13
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@valtimo/decision",
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
+ "dmn-js": "^7.3.0",
10
+ "tslib": "^2.0.0"
11
+ },
12
+ "main": "bundles/valtimo-decision.umd.js",
13
+ "module": "fesm2015/valtimo-decision.js",
14
+ "es2015": "fesm2015/valtimo-decision.js",
15
+ "esm2015": "esm2015/valtimo-decision.js",
16
+ "fesm2015": "fesm2015/valtimo-decision.js",
17
+ "typings": "valtimo-decision.d.ts",
18
+ "metadata": "valtimo-decision.metadata.json",
19
+ "sideEffects": false
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/decision.module';
2
+ export * from './lib/decision.component';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ export { DecisionDeployComponent as ɵa } from './lib/decision-deploy/decision-deploy.component';
6
+ export { DecisionDisplayComponent as ɵc } from './lib/decision-display/decision-display.component';
7
+ export { DecisionListComponent as ɵd } from './lib/decision-list/decision-list.component';
8
+ export { DecisionRoutingModule as ɵe } from './lib/decision-routing.module';
9
+ export { DecisionService as ɵb } from './lib/decision.service';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"DecisionModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":27,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"DecisionComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","name":"ɵd"}],"imports":[{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","module":"@valtimo/components","name":"WidgetModule","line":31,"character":4},{"__symbolic":"reference","module":"@valtimo/components","name":"ListModule","line":32,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":33,"character":4},{"__symbolic":"reference","module":"@valtimo/components","name":"ModalModule","line":34,"character":4},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":35,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":36,"character":4}],"exports":[{"__symbolic":"reference","name":"DecisionComponent"}]}]}],"members":{}},"DecisionComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"valtimo-decision","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=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button (click)=\"this.deploy.openModal()\" class=\"btn btn-secondary btn-space mr-0\">\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n <valtimo-decision-list #decisionList></valtimo-decision-list>\n <valtimo-decision-deploy #decisionDeploy (deploySuccessful)=\"this.list.loadDecisions()\"></valtimo-decision-deploy>\n </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 */"]}]}],"members":{"deploy":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":26,"character":3},"arguments":["decisionDeploy"]}]}],"list":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":27,"character":3},"arguments":["decisionList"]}]}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"valtimo-decision-deploy","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<valtimo-modal #decisionDeployModal elementId=\"decisionDeployModal\" title=\"Upload Decision table\" [showFooter]=\"true\">\n <div body>\n <div class=\"mt-3\">{{ 'decisions.upload.description' | translate }}</div>\n <div class=\"form-group mt-3 mb-3\">\n <input type=\"file\"\n id=\"file\"\n accept=\".dmn\"\n (change)=\"onChange($event.target.files)\">\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-right\">\n <button [disabled]=\"!dmn\" class=\"btn btn-primary btn-space\" type=\"button\" (click)=\"deployDmn()\">\n <i class=\"fa fa-upload\"></i> &nbsp;\n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n\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 */"]}]}],"members":{"deploySuccessful":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":27,"character":3}}]}],"modal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":28,"character":3},"arguments":["decisionDeployModal"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵb"}]}],"ngOnInit":[{"__symbolic":"method"}],"onChange":[{"__symbolic":"method"}],"deployDmn":[{"__symbolic":"method"}],"openModal":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":30,"character":27},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":31,"character":18}]}],"deployDmn":[{"__symbolic":"method"}],"getDecisions":[{"__symbolic":"method"}],"getDecisionXml":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"valtimo-decision-display","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=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button (click)=\"download()\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"fa fa-save\"></i> &nbsp;\n <span>{{ 'Download' | translate }}</span>\n </button>\n </div>\n </div>\n <div id=\"canvas\">\n </div>\n </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 */"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute","line":36,"character":19}]}],"ngOnInit":[{"__symbolic":"method"}],"loadDecisionXml":[{"__symbolic":"method"}],"download":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"valtimo-decision-list","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<valtimo-widget>\n <valtimo-list [items]=\"decisions\" [fields]=\"fields\" (rowClicked)=\"viewDecisionTable($event)\"\n [header]=\"true\" [viewMode]=\"true\" [isSearchable]=\"true\">\n <div header>\n <h3 class=\"list-header-title\">{{ 'Decision tables' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Decision tables' | translate }}</h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\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 */"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":37,"character":20}]}],"ngOnInit":[{"__symbolic":"method"}],"loadDecisions":[{"__symbolic":"method"}],"viewDecisionTable":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":39,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":42,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":43,"character":4},"member":"forChild"},"arguments":[[{"path":"decision-tables","component":{"__symbolic":"reference","name":"DecisionComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":28,"character":18}],"data":{"title":"Decision tables","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_ADMIN","line":29,"character":45}]}},{"path":"decision-tables/:id","component":{"__symbolic":"reference","name":"ɵc"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":34,"character":18}],"data":{"title":"Decision tables","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_ADMIN","line":35,"character":45}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":45,"character":12}]}]}],"members":{}}},"origins":{"DecisionModule":"./lib/decision.module","DecisionComponent":"./lib/decision.component","ɵa":"./lib/decision-deploy/decision-deploy.component","ɵb":"./lib/decision.service","ɵc":"./lib/decision-display/decision-display.component","ɵd":"./lib/decision-list/decision-list.component","ɵe":"./lib/decision-routing.module"},"importAs":"@valtimo/decision"}