@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.
- package/README.md +24 -0
- package/bundles/valtimo-decision.umd.js +363 -0
- package/bundles/valtimo-decision.umd.js.map +1 -0
- package/bundles/valtimo-decision.umd.min.js +2 -0
- package/bundles/valtimo-decision.umd.min.js.map +1 -0
- package/esm2015/lib/decision-deploy/decision-deploy.component.js +54 -0
- package/esm2015/lib/decision-display/decision-display.component.js +60 -0
- package/esm2015/lib/decision-list/decision-list.component.js +52 -0
- package/esm2015/lib/decision-routing.module.js +51 -0
- package/esm2015/lib/decision.component.js +32 -0
- package/esm2015/lib/decision.module.js +43 -0
- package/esm2015/lib/decision.service.js +52 -0
- package/esm2015/public-api.js +21 -0
- package/esm2015/valtimo-decision.js +10 -0
- package/fesm2015/valtimo-decision.js +341 -0
- package/fesm2015/valtimo-decision.js.map +1 -0
- package/lib/decision-deploy/decision-deploy.component.d.ts +14 -0
- package/lib/decision-display/decision-display.component.d.ts +15 -0
- package/lib/decision-list/decision-list.component.d.ts +17 -0
- package/lib/decision-routing.module.d.ts +2 -0
- package/lib/decision.component.d.ts +6 -0
- package/lib/decision.module.d.ts +2 -0
- package/lib/decision.service.d.ts +13 -0
- package/package.json +20 -0
- package/public-api.d.ts +2 -0
- package/valtimo-decision.d.ts +9 -0
- package/valtimo-decision.metadata.json +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Decision
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project decision` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project decision`.
|
|
8
|
+
> Note: Don't forget to add `--project decision` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build decision` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build decision`, go to the dist folder `cd dist/decision` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test decision` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@angular/common/http'), require('@valtimo/config'), require('dmn-js'), require('@valtimo/contract'), require('@angular/forms'), require('@valtimo/components'), require('@ngx-translate/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@valtimo/decision', ['exports', '@angular/core', '@angular/router', '@angular/common', '@valtimo/security', '@angular/common/http', '@valtimo/config', 'dmn-js', '@valtimo/contract', '@angular/forms', '@valtimo/components', '@ngx-translate/core'], factory) :
|
|
4
|
+
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.decision = {}), global.ng.core, global.ng.router, global.ng.common, global.security, global.ng.common.http, global.config, global.DmnViewer, global.contract, global.ng.forms, global.components, global.core$1));
|
|
5
|
+
}(this, (function (exports, i0, router, common, security, i2, i1, DmnViewer, contract, forms, components, core) { 'use strict';
|
|
6
|
+
|
|
7
|
+
DmnViewer = DmnViewer && Object.prototype.hasOwnProperty.call(DmnViewer, 'default') ? DmnViewer['default'] : DmnViewer;
|
|
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 DecisionComponent = /** @class */ (function () {
|
|
25
|
+
function DecisionComponent() {
|
|
26
|
+
}
|
|
27
|
+
return DecisionComponent;
|
|
28
|
+
}());
|
|
29
|
+
DecisionComponent.decorators = [
|
|
30
|
+
{ type: i0.Component, args: [{
|
|
31
|
+
selector: 'valtimo-decision',
|
|
32
|
+
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> \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",
|
|
33
|
+
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 */"]
|
|
34
|
+
},] }
|
|
35
|
+
];
|
|
36
|
+
DecisionComponent.propDecorators = {
|
|
37
|
+
deploy: [{ type: i0.ViewChild, args: ['decisionDeploy',] }],
|
|
38
|
+
list: [{ type: i0.ViewChild, args: ['decisionList',] }]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
43
|
+
*
|
|
44
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
45
|
+
* you may not use this file except in compliance with the License.
|
|
46
|
+
* You may obtain a copy of the License at
|
|
47
|
+
*
|
|
48
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
49
|
+
*
|
|
50
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
51
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
52
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
53
|
+
* See the License for the specific language governing permissions and
|
|
54
|
+
* limitations under the License.
|
|
55
|
+
*/
|
|
56
|
+
var DecisionService = /** @class */ (function () {
|
|
57
|
+
function DecisionService(configService, http) {
|
|
58
|
+
this.configService = configService;
|
|
59
|
+
this.http = http;
|
|
60
|
+
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
61
|
+
}
|
|
62
|
+
DecisionService.prototype.deployDmn = function (dmn) {
|
|
63
|
+
var formData = new FormData();
|
|
64
|
+
formData.append('file', dmn);
|
|
65
|
+
formData.append('deployment-name', 'dmnTableDeploy');
|
|
66
|
+
formData.append('deployment-source', 'process application');
|
|
67
|
+
return this.http.post(this.valtimoApiConfig.endpointUri + "camunda-rest/engine/default/deployment/create", formData);
|
|
68
|
+
};
|
|
69
|
+
DecisionService.prototype.getDecisions = function () {
|
|
70
|
+
return this.http.get(this.valtimoApiConfig.endpointUri + "camunda-rest/engine/default/decision-definition");
|
|
71
|
+
};
|
|
72
|
+
DecisionService.prototype.getDecisionXml = function (decisionId) {
|
|
73
|
+
return this.http.get(this.valtimoApiConfig.endpointUri + "camunda-rest/engine/default/decision-definition/" + decisionId + "/xml");
|
|
74
|
+
};
|
|
75
|
+
return DecisionService;
|
|
76
|
+
}());
|
|
77
|
+
DecisionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DecisionService_Factory() { return new DecisionService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.HttpClient)); }, token: DecisionService, providedIn: "root" });
|
|
78
|
+
DecisionService.decorators = [
|
|
79
|
+
{ type: i0.Injectable, args: [{
|
|
80
|
+
providedIn: 'root'
|
|
81
|
+
},] }
|
|
82
|
+
];
|
|
83
|
+
DecisionService.ctorParameters = function () { return [
|
|
84
|
+
{ type: i1.ConfigService },
|
|
85
|
+
{ type: i2.HttpClient }
|
|
86
|
+
]; };
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
90
|
+
*
|
|
91
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
92
|
+
* you may not use this file except in compliance with the License.
|
|
93
|
+
* You may obtain a copy of the License at
|
|
94
|
+
*
|
|
95
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
96
|
+
*
|
|
97
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
98
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
99
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
100
|
+
* See the License for the specific language governing permissions and
|
|
101
|
+
* limitations under the License.
|
|
102
|
+
*/
|
|
103
|
+
var DecisionDisplayComponent = /** @class */ (function () {
|
|
104
|
+
function DecisionDisplayComponent(decisionService, route) {
|
|
105
|
+
this.decisionService = decisionService;
|
|
106
|
+
this.route = route;
|
|
107
|
+
}
|
|
108
|
+
DecisionDisplayComponent.prototype.ngOnInit = function () {
|
|
109
|
+
this.viewer = new DmnViewer({
|
|
110
|
+
container: '#canvas'
|
|
111
|
+
});
|
|
112
|
+
this.decisionId = this.route.snapshot.paramMap.get('id');
|
|
113
|
+
this.loadDecisionXml();
|
|
114
|
+
};
|
|
115
|
+
DecisionDisplayComponent.prototype.loadDecisionXml = function () {
|
|
116
|
+
var _this = this;
|
|
117
|
+
this.decisionService.getDecisionXml(this.decisionId).subscribe(function (decision) {
|
|
118
|
+
_this.viewer.importXML(decision.dmnXml);
|
|
119
|
+
_this.decisionXml = decision.dmnXml;
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
DecisionDisplayComponent.prototype.download = function () {
|
|
123
|
+
var file = new Blob([this.decisionXml], { type: 'text/xml' });
|
|
124
|
+
var link = document.createElement('a');
|
|
125
|
+
link.download = "decision_table_" + this.decisionId + ".dmn";
|
|
126
|
+
link.href = window.URL.createObjectURL(file);
|
|
127
|
+
link.click();
|
|
128
|
+
window.URL.revokeObjectURL(link.href);
|
|
129
|
+
link.remove();
|
|
130
|
+
};
|
|
131
|
+
return DecisionDisplayComponent;
|
|
132
|
+
}());
|
|
133
|
+
DecisionDisplayComponent.decorators = [
|
|
134
|
+
{ type: i0.Component, args: [{
|
|
135
|
+
selector: 'valtimo-decision-display',
|
|
136
|
+
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> \n <span>{{ 'Download' | translate }}</span>\n </button>\n </div>\n </div>\n <div id=\"canvas\">\n </div>\n </div>\n</div>\n",
|
|
137
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
138
|
+
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 */"]
|
|
139
|
+
},] }
|
|
140
|
+
];
|
|
141
|
+
DecisionDisplayComponent.ctorParameters = function () { return [
|
|
142
|
+
{ type: DecisionService },
|
|
143
|
+
{ type: router.ActivatedRoute }
|
|
144
|
+
]; };
|
|
145
|
+
|
|
146
|
+
/*
|
|
147
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
148
|
+
*
|
|
149
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
150
|
+
* you may not use this file except in compliance with the License.
|
|
151
|
+
* You may obtain a copy of the License at
|
|
152
|
+
*
|
|
153
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
154
|
+
*
|
|
155
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
156
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
157
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
158
|
+
* See the License for the specific language governing permissions and
|
|
159
|
+
* limitations under the License.
|
|
160
|
+
*/
|
|
161
|
+
var ɵ0 = { title: 'Decision tables', roles: [contract.ROLE_ADMIN] }, ɵ1 = { title: 'Decision tables', roles: [contract.ROLE_ADMIN] };
|
|
162
|
+
var routes = [
|
|
163
|
+
{
|
|
164
|
+
path: 'decision-tables',
|
|
165
|
+
component: DecisionComponent,
|
|
166
|
+
canActivate: [security.AuthGuardService],
|
|
167
|
+
data: ɵ0
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
path: 'decision-tables/:id',
|
|
171
|
+
component: DecisionDisplayComponent,
|
|
172
|
+
canActivate: [security.AuthGuardService],
|
|
173
|
+
data: ɵ1
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
var DecisionRoutingModule = /** @class */ (function () {
|
|
177
|
+
function DecisionRoutingModule() {
|
|
178
|
+
}
|
|
179
|
+
return DecisionRoutingModule;
|
|
180
|
+
}());
|
|
181
|
+
DecisionRoutingModule.decorators = [
|
|
182
|
+
{ type: i0.NgModule, args: [{
|
|
183
|
+
declarations: [],
|
|
184
|
+
imports: [
|
|
185
|
+
common.CommonModule,
|
|
186
|
+
router.RouterModule.forChild(routes)
|
|
187
|
+
],
|
|
188
|
+
exports: [router.RouterModule]
|
|
189
|
+
},] }
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
/*
|
|
193
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
194
|
+
*
|
|
195
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
196
|
+
* you may not use this file except in compliance with the License.
|
|
197
|
+
* You may obtain a copy of the License at
|
|
198
|
+
*
|
|
199
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
200
|
+
*
|
|
201
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
202
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
203
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
204
|
+
* See the License for the specific language governing permissions and
|
|
205
|
+
* limitations under the License.
|
|
206
|
+
*/
|
|
207
|
+
var DecisionDeployComponent = /** @class */ (function () {
|
|
208
|
+
function DecisionDeployComponent(decisionService) {
|
|
209
|
+
this.decisionService = decisionService;
|
|
210
|
+
this.dmn = null;
|
|
211
|
+
this.deploySuccessful = new i0.EventEmitter();
|
|
212
|
+
}
|
|
213
|
+
DecisionDeployComponent.prototype.ngOnInit = function () {
|
|
214
|
+
};
|
|
215
|
+
DecisionDeployComponent.prototype.onChange = function (files) {
|
|
216
|
+
this.dmn = files.item(0);
|
|
217
|
+
};
|
|
218
|
+
DecisionDeployComponent.prototype.deployDmn = function () {
|
|
219
|
+
var _this = this;
|
|
220
|
+
this.decisionService.deployDmn(this.dmn).subscribe(function () {
|
|
221
|
+
_this.modal.hide();
|
|
222
|
+
_this.deploySuccessful.emit();
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
DecisionDeployComponent.prototype.openModal = function () {
|
|
226
|
+
this.modal.show();
|
|
227
|
+
};
|
|
228
|
+
return DecisionDeployComponent;
|
|
229
|
+
}());
|
|
230
|
+
DecisionDeployComponent.decorators = [
|
|
231
|
+
{ type: i0.Component, args: [{
|
|
232
|
+
selector: 'valtimo-decision-deploy',
|
|
233
|
+
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> \n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n\n",
|
|
234
|
+
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 */"]
|
|
235
|
+
},] }
|
|
236
|
+
];
|
|
237
|
+
DecisionDeployComponent.ctorParameters = function () { return [
|
|
238
|
+
{ type: DecisionService }
|
|
239
|
+
]; };
|
|
240
|
+
DecisionDeployComponent.propDecorators = {
|
|
241
|
+
deploySuccessful: [{ type: i0.Output }],
|
|
242
|
+
modal: [{ type: i0.ViewChild, args: ['decisionDeployModal',] }]
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/*
|
|
246
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
247
|
+
*
|
|
248
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
249
|
+
* you may not use this file except in compliance with the License.
|
|
250
|
+
* You may obtain a copy of the License at
|
|
251
|
+
*
|
|
252
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
253
|
+
*
|
|
254
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
255
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
256
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
257
|
+
* See the License for the specific language governing permissions and
|
|
258
|
+
* limitations under the License.
|
|
259
|
+
*/
|
|
260
|
+
var DecisionListComponent = /** @class */ (function () {
|
|
261
|
+
function DecisionListComponent(decisionService, router) {
|
|
262
|
+
this.decisionService = decisionService;
|
|
263
|
+
this.router = router;
|
|
264
|
+
this.fields = [
|
|
265
|
+
{ key: 'key', label: 'Key' },
|
|
266
|
+
{ key: 'name', label: 'Name' },
|
|
267
|
+
{ key: 'version', label: 'Version' },
|
|
268
|
+
];
|
|
269
|
+
}
|
|
270
|
+
DecisionListComponent.prototype.ngOnInit = function () {
|
|
271
|
+
this.loadDecisions();
|
|
272
|
+
};
|
|
273
|
+
DecisionListComponent.prototype.loadDecisions = function () {
|
|
274
|
+
var _this = this;
|
|
275
|
+
this.decisionService.getDecisions().subscribe(function (decisions) {
|
|
276
|
+
_this.decisions = decisions;
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
DecisionListComponent.prototype.viewDecisionTable = function (decision) {
|
|
280
|
+
this.router.navigate(['/decision-tables', decision.id]);
|
|
281
|
+
};
|
|
282
|
+
return DecisionListComponent;
|
|
283
|
+
}());
|
|
284
|
+
DecisionListComponent.decorators = [
|
|
285
|
+
{ type: i0.Component, args: [{
|
|
286
|
+
selector: 'valtimo-decision-list',
|
|
287
|
+
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",
|
|
288
|
+
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 */"]
|
|
289
|
+
},] }
|
|
290
|
+
];
|
|
291
|
+
DecisionListComponent.ctorParameters = function () { return [
|
|
292
|
+
{ type: DecisionService },
|
|
293
|
+
{ type: router.Router }
|
|
294
|
+
]; };
|
|
295
|
+
|
|
296
|
+
/*
|
|
297
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
298
|
+
*
|
|
299
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
300
|
+
* you may not use this file except in compliance with the License.
|
|
301
|
+
* You may obtain a copy of the License at
|
|
302
|
+
*
|
|
303
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
304
|
+
*
|
|
305
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
306
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
307
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
308
|
+
* See the License for the specific language governing permissions and
|
|
309
|
+
* limitations under the License.
|
|
310
|
+
*/
|
|
311
|
+
var DecisionModule = /** @class */ (function () {
|
|
312
|
+
function DecisionModule() {
|
|
313
|
+
}
|
|
314
|
+
return DecisionModule;
|
|
315
|
+
}());
|
|
316
|
+
DecisionModule.decorators = [
|
|
317
|
+
{ type: i0.NgModule, args: [{
|
|
318
|
+
declarations: [DecisionComponent, DecisionDeployComponent, DecisionDisplayComponent, DecisionListComponent],
|
|
319
|
+
imports: [
|
|
320
|
+
DecisionRoutingModule,
|
|
321
|
+
components.WidgetModule,
|
|
322
|
+
components.ListModule,
|
|
323
|
+
core.TranslateModule,
|
|
324
|
+
components.ModalModule,
|
|
325
|
+
common.CommonModule,
|
|
326
|
+
forms.FormsModule
|
|
327
|
+
],
|
|
328
|
+
exports: [DecisionComponent]
|
|
329
|
+
},] }
|
|
330
|
+
];
|
|
331
|
+
|
|
332
|
+
/*
|
|
333
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
334
|
+
*
|
|
335
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
336
|
+
* you may not use this file except in compliance with the License.
|
|
337
|
+
* You may obtain a copy of the License at
|
|
338
|
+
*
|
|
339
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
340
|
+
*
|
|
341
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
342
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
343
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
344
|
+
* See the License for the specific language governing permissions and
|
|
345
|
+
* limitations under the License.
|
|
346
|
+
*/
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Generated bundle index. Do not edit.
|
|
350
|
+
*/
|
|
351
|
+
|
|
352
|
+
exports.DecisionComponent = DecisionComponent;
|
|
353
|
+
exports.DecisionModule = DecisionModule;
|
|
354
|
+
exports.ɵa = DecisionDeployComponent;
|
|
355
|
+
exports.ɵb = DecisionService;
|
|
356
|
+
exports.ɵc = DecisionDisplayComponent;
|
|
357
|
+
exports.ɵd = DecisionListComponent;
|
|
358
|
+
exports.ɵe = DecisionRoutingModule;
|
|
359
|
+
|
|
360
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
361
|
+
|
|
362
|
+
})));
|
|
363
|
+
//# sourceMappingURL=valtimo-decision.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valtimo-decision.umd.js","sources":["../../../../projects/valtimo/decision/src/lib/decision.component.ts","../../../../projects/valtimo/decision/src/lib/decision.service.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-deploy/decision-deploy.component.ts","../../../../projects/valtimo/decision/src/lib/decision-list/decision-list.component.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 {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 {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, 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 {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 {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":["Component","ViewChild","Injectable","ConfigService","HttpClient","ViewEncapsulation","ActivatedRoute","ROLE_ADMIN","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","Output","Router","WidgetModule","ListModule","TranslateModule","ModalModule","FormsModule"],"mappings":";;;;;;;;IA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C,oBAAe;wBACfC,sBAAW;wBACXR,mBAAY;wBACZS,iBAAW;qBACZ;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B;;;ICvCD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@valtimo/security"),require("@angular/common/http"),require("@valtimo/config"),require("dmn-js"),require("@valtimo/contract"),require("@angular/forms"),require("@valtimo/components"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@valtimo/decision",["exports","@angular/core","@angular/router","@angular/common","@valtimo/security","@angular/common/http","@valtimo/config","dmn-js","@valtimo/contract","@angular/forms","@valtimo/components","@ngx-translate/core"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo.decision={}),e.ng.core,e.ng.router,e.ng.common,e.security,e.ng.common.http,e.config,e.DmnViewer,e.contract,e.ng.forms,e.components,e.core$1)}(this,(function(e,n,i,t,o,s,r,a,c,l,d,p){"use strict";a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a;var u=function(){};u.decorators=[{type:n.Component,args:[{selector:"valtimo-decision",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="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> \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 */']}]}],u.propDecorators={deploy:[{type:n.ViewChild,args:["decisionDeploy"]}],list:[{type:n.ViewChild,args:["decisionList"]}]};var m=function(){function e(e,n){this.configService=e,this.http=n,this.valtimoApiConfig=e.config.valtimoApi}return e.prototype.deployDmn=function(e){var n=new FormData;return n.append("file",e),n.append("deployment-name","dmnTableDeploy"),n.append("deployment-source","process application"),this.http.post(this.valtimoApiConfig.endpointUri+"camunda-rest/engine/default/deployment/create",n)},e.prototype.getDecisions=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"camunda-rest/engine/default/decision-definition")},e.prototype.getDecisionXml=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"camunda-rest/engine/default/decision-definition/"+e+"/xml")},e}();m.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new m(n.ɵɵinject(r.ConfigService),n.ɵɵinject(s.HttpClient))},token:m,providedIn:"root"}),m.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:r.ConfigService},{type:s.HttpClient}]};var h=function(){function e(e,n){this.decisionService=e,this.route=n}return e.prototype.ngOnInit=function(){this.viewer=new a({container:"#canvas"}),this.decisionId=this.route.snapshot.paramMap.get("id"),this.loadDecisionXml()},e.prototype.loadDecisionXml=function(){var e=this;this.decisionService.getDecisionXml(this.decisionId).subscribe((function(n){e.viewer.importXML(n.dmnXml),e.decisionXml=n.dmnXml}))},e.prototype.download=function(){var e=new Blob([this.decisionXml],{type:"text/xml"}),n=document.createElement("a");n.download="decision_table_"+this.decisionId+".dmn",n.href=window.URL.createObjectURL(e),n.click(),window.URL.revokeObjectURL(n.href),n.remove()},e}();h.decorators=[{type:n.Component,args:[{selector:"valtimo-decision-display",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="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> \n <span>{{ \'Download\' | translate }}</span>\n </button>\n </div>\n </div>\n <div id="canvas">\n </div>\n </div>\n</div>\n',encapsulation:n.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 */']}]}],h.ctorParameters=function(){return[{type:m},{type:i.ActivatedRoute}]};var f={title:"Decision tables",roles:[c.ROLE_ADMIN]},y={title:"Decision tables",roles:[c.ROLE_ADMIN]},g=[{path:"decision-tables",component:u,canActivate:[o.AuthGuardService],data:f},{path:"decision-tables/:id",component:h,canActivate:[o.AuthGuardService],data:y}],v=function(){};v.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[t.CommonModule,i.RouterModule.forChild(g)],exports:[i.RouterModule]}]}];var b=function(){function e(e){this.decisionService=e,this.dmn=null,this.deploySuccessful=new n.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.onChange=function(e){this.dmn=e.item(0)},e.prototype.deployDmn=function(){var e=this;this.decisionService.deployDmn(this.dmn).subscribe((function(){e.modal.hide(),e.deploySuccessful.emit()}))},e.prototype.openModal=function(){this.modal.show()},e}();b.decorators=[{type:n.Component,args:[{selector:"valtimo-decision-deploy",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<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> \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 */']}]}],b.ctorParameters=function(){return[{type:m}]},b.propDecorators={deploySuccessful:[{type:n.Output}],modal:[{type:n.ViewChild,args:["decisionDeployModal"]}]};var L=function(){function e(e,n){this.decisionService=e,this.router=n,this.fields=[{key:"key",label:"Key"},{key:"name",label:"Name"},{key:"version",label:"Version"}]}return e.prototype.ngOnInit=function(){this.loadDecisions()},e.prototype.loadDecisions=function(){var e=this;this.decisionService.getDecisions().subscribe((function(n){e.decisions=n}))},e.prototype.viewDecisionTable=function(e){this.router.navigate(["/decision-tables",e.id])},e}();L.decorators=[{type:n.Component,args:[{selector:"valtimo-decision-list",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<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 */']}]}],L.ctorParameters=function(){return[{type:m},{type:i.Router}]};var w=function(){};w.decorators=[{type:n.NgModule,args:[{declarations:[u,b,h,L],imports:[v,d.WidgetModule,d.ListModule,p.TranslateModule,d.ModalModule,t.CommonModule,l.FormsModule],exports:[u]}]}],e.DecisionComponent=u,e.DecisionModule=w,e.ɵa=b,e.ɵb=m,e.ɵc=h,e.ɵd=L,e.ɵe=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
|
+
//# sourceMappingURL=valtimo-decision.umd.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../projects/valtimo/decision/src/lib/decision.component.ts","../../../../projects/valtimo/decision/src/lib/decision.service.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-deploy/decision-deploy.component.ts","../../../../projects/valtimo/decision/src/lib/decision-list/decision-list.component.ts","../../../../projects/valtimo/decision/src/lib/decision.module.ts"],"names":["Component","args","selector","template","ViewChild","DecisionService","configService","http","this","valtimoApiConfig","config","valtimoApi","prototype","deployDmn","dmn","formData","FormData","append","post","endpointUri","getDecisions","get","getDecisionXml","decisionId","Injectable","providedIn","ConfigService","HttpClient","DecisionDisplayComponent","decisionService","route","ngOnInit","viewer","DmnViewer","container","snapshot","paramMap","loadDecisionXml","_this","subscribe","decision","importXML","dmnXml","decisionXml","download","file","Blob","type","link","document","createElement","href","window","URL","createObjectURL","click","revokeObjectURL","remove","encapsulation","ViewEncapsulation","None","ActivatedRoute","title","roles","ROLE_ADMIN","ɵ1","routes","path","component","DecisionComponent","canActivate","AuthGuardService","data","ɵ0","NgModule","declarations","imports","CommonModule","RouterModule","forChild","exports","DecisionDeployComponent","deploySuccessful","EventEmitter","onChange","files","item","modal","hide","emit","openModal","show","Output","DecisionListComponent","router","fields","key","label","loadDecisions","decisions","viewDecisionTable","navigate","id","Router","DecisionRoutingModule","WidgetModule","ListModule","TranslateModule","ModalModule","FormsModule"],"mappings":"m9BAyBA,iCALCA,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,mBACVC,SAAA,63DAICC,EAAAA,UAASH,KAAA,CAAC,gCACVG,EAAAA,UAASH,KAAA,CAAC,oCCEX,SAAAI,EACUC,EACAC,GADAC,KAAAF,cAAAA,EACAE,KAAAD,KAAAA,EAERC,KAAKC,iBAAmBH,EAAcI,OAAOC,kBAG/CN,EAAAO,UAAAC,UAAA,SAAUC,GACR,IAAMC,EAAqB,IAAIC,SAI/B,OAHAD,EAASE,OAAO,OAAQH,GACxBC,EAASE,OAAO,kBAAmB,kBACnCF,EAASE,OAAO,oBAAqB,uBAC9BT,KAAKD,KAAKW,KACZV,KAAKC,iBAAiBU,YAAW,gDAAiDJ,IAIzFV,EAAAO,UAAAQ,aAAA,WACE,OAAOZ,KAAKD,KAAKc,IAAmBb,KAAKC,iBAAiBU,YAAW,oDAGvEd,EAAAO,UAAAU,eAAA,SAAeC,GACb,OAAOf,KAAKD,KAAKc,IACZb,KAAKC,iBAAiBU,YAAW,mDAAmDI,EAAU,mLA9BtGC,EAAAA,WAAUvB,KAAA,CAAC,CACVwB,WAAY,oDAHNC,EAAAA,qBAHAC,EAAAA,+BCiBN,SAAAC,EACUC,EACAC,GADAtB,KAAAqB,gBAAAA,EACArB,KAAAsB,MAAAA,SAIVF,EAAAhB,UAAAmB,SAAA,WACEvB,KAAKwB,OAAS,IAAIC,E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E,SAAA,SAASC,GACP7E,KAAKM,IAAMuE,EAAMC,KAAK,IAGxBL,EAAArE,UAAAC,UAAA,WAAA,IAAAyB,EAAA9B,KACEA,KAAKqB,gBAAgBhB,UAAUL,KAAKM,KAAKyB,WAAU,WACjDD,EAAKiD,MAAMC,OACXlD,EAAK4C,iBAAiBO,WAI1BR,EAAArE,UAAA8E,UAAA,WACElF,KAAK+E,MAAMI,iCA9Bd3F,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,0BACVC,SAAA,+gEALME,+CAULuF,EAAAA,sBACAxF,EAAAA,UAASH,KAAA,CAAC,2CCOX,SAAA4F,EACUhE,EACAiE,GADAtF,KAAAqB,gBAAAA,EACArB,KAAAsF,OAAAA,EARHtF,KAAAuF,OAAS,CACd,CAACC,IAAK,MAAOC,MAAO,OACpB,CAACD,IAAK,OAAQC,MAAO,QACrB,CAACD,IAAK,UAAWC,MAAO,mBAS1BJ,EAAAjF,UAAAmB,SAAA,WACEvB,KAAK0F,iBAGPL,EAAAjF,UAAAsF,cAAA,WAAA,IAAA5D,EAAA9B,KACEA,KAAKqB,gBAAgBT,eAAemB,WAAU,SAAC4D,GAC7C7D,EAAK6D,UAAYA,MAIrBN,EAAAjF,UAAAwF,kBAAA,SAAkB5D,GAChBhC,KAAKsF,OAAOO,SAAS,CAAC,mBAAoB7D,EAAS8D,+BA/BtDtG,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,wBACVC,SAAA,4vDALME,SACAkG,EAAAA,gBCqBR,iCAbC7B,EAAAA,SAAQzE,KAAA,CAAC,CACR0E,aAAc,CAACN,EAAmBY,EAAyBrD,EAA0BiE,GACrFjB,QAAS,CACP4B,EACAC,EAAAA,aACAC,EAAAA,WACAC,EAAAA,gBACAC,EAAAA,YACA/B,EAAAA,aACAgC,EAAAA,aAEF7B,QAAS,CAACX","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 {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 {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, 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 {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 {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"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
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, EventEmitter, Output, ViewChild } from '@angular/core';
|
|
17
|
+
import { DecisionService } from '../decision.service';
|
|
18
|
+
import { ModalComponent } from '@valtimo/components';
|
|
19
|
+
export class DecisionDeployComponent {
|
|
20
|
+
constructor(decisionService) {
|
|
21
|
+
this.decisionService = decisionService;
|
|
22
|
+
this.dmn = null;
|
|
23
|
+
this.deploySuccessful = new EventEmitter();
|
|
24
|
+
}
|
|
25
|
+
ngOnInit() {
|
|
26
|
+
}
|
|
27
|
+
onChange(files) {
|
|
28
|
+
this.dmn = files.item(0);
|
|
29
|
+
}
|
|
30
|
+
deployDmn() {
|
|
31
|
+
this.decisionService.deployDmn(this.dmn).subscribe(() => {
|
|
32
|
+
this.modal.hide();
|
|
33
|
+
this.deploySuccessful.emit();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
openModal() {
|
|
37
|
+
this.modal.show();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
DecisionDeployComponent.decorators = [
|
|
41
|
+
{ type: Component, args: [{
|
|
42
|
+
selector: 'valtimo-decision-deploy',
|
|
43
|
+
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> \n {{ 'Upload' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n\n",
|
|
44
|
+
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 */"]
|
|
45
|
+
},] }
|
|
46
|
+
];
|
|
47
|
+
DecisionDeployComponent.ctorParameters = () => [
|
|
48
|
+
{ type: DecisionService }
|
|
49
|
+
];
|
|
50
|
+
DecisionDeployComponent.propDecorators = {
|
|
51
|
+
deploySuccessful: [{ type: Output }],
|
|
52
|
+
modal: [{ type: ViewChild, args: ['decisionDeployModal',] }]
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjaXNpb24tZGVwbG95LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZGVjaXNpb24vc3JjL2xpYi9kZWNpc2lvbi1kZXBsb3kvZGVjaXNpb24tZGVwbG95LmNvbXBvbmVudC50cyJdLCJuYW1l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