@valtimo/migration 4.15.3-next-main.16 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,381 +1,381 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@valtimo/process'), require('ngx-logger'), require('@valtimo/components'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/contract'), require('@angular/forms'), require('bpmn-js/dist/bpmn-navigated-viewer.production.min.js'), require('@ngx-translate/core')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/migration', ['exports', '@angular/core', '@valtimo/process', 'ngx-logger', '@valtimo/components', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/contract', '@angular/forms', 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js', '@ngx-translate/core'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.migration = {}), global.ng.core, global.process, global.ngxLogger, global.components, global.ng.router, global.ng.common, global.security, global.contract, global.ng.forms, global.BpmnJS, global.core));
5
- }(this, (function (exports, i0, process, ngxLogger, components, router, common, security, contract, forms, BpmnJS, core) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@valtimo/process'), require('ngx-logger'), require('@valtimo/components'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/config'), require('@angular/forms'), require('bpmn-js/dist/bpmn-navigated-viewer.production.min.js'), require('@ngx-translate/core')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/migration', ['exports', '@angular/core', '@valtimo/process', 'ngx-logger', '@valtimo/components', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/config', '@angular/forms', 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js', '@ngx-translate/core'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.migration = {}), global.ng.core, global.process, global.ngxLogger, global.components, global.ng.router, global.ng.common, global.security, global.config, global.ng.forms, global.BpmnJS, global.core));
5
+ }(this, (function (exports, i0, process, ngxLogger, components, router, common, security, config, forms, BpmnJS, core) { 'use strict';
6
6
 
7
- /*
8
- * Copyright 2015-2020 Ritense BV, the Netherlands.
9
- *
10
- * Licensed under EUPL, Version 1.2 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" basis,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- var MigrationService = /** @class */ (function () {
23
- function MigrationService() {
24
- }
25
- return MigrationService;
26
- }());
27
- MigrationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
28
- MigrationService.decorators = [
29
- { type: i0.Injectable, args: [{
30
- providedIn: 'root',
31
- },] }
32
- ];
7
+ /*
8
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
9
+ *
10
+ * Licensed under EUPL, Version 1.2 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" basis,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ var MigrationService = /** @class */ (function () {
23
+ function MigrationService() {
24
+ }
25
+ return MigrationService;
26
+ }());
27
+ MigrationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
28
+ MigrationService.decorators = [
29
+ { type: i0.Injectable, args: [{
30
+ providedIn: 'root',
31
+ },] }
32
+ ];
33
33
  MigrationService.ctorParameters = function () { return []; };
34
34
 
35
- /*
36
- * Copyright 2015-2020 Ritense BV, the Netherlands.
37
- *
38
- * Licensed under EUPL, Version 1.2 (the "License");
39
- * you may not use this file except in compliance with the License.
40
- * You may obtain a copy of the License at
41
- *
42
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
43
- *
44
- * Unless required by applicable law or agreed to in writing, software
45
- * distributed under the License is distributed on an "AS IS" basis,
46
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47
- * See the License for the specific language governing permissions and
48
- * limitations under the License.
49
- */
50
- var MigrationComponent = /** @class */ (function () {
51
- function MigrationComponent(processService, logger, alertService) {
52
- this.processService = processService;
53
- this.logger = logger;
54
- this.alertService = alertService;
55
- this.processDefinitions = [];
56
- this.selectedVersions = {
57
- source: [],
58
- target: [],
59
- };
60
- this.selectedId = {
61
- source: null,
62
- target: null,
63
- };
64
- this.loaded = {
65
- source: false,
66
- target: false,
67
- };
68
- this.fields = {
69
- source: {
70
- definition: null,
71
- version: null,
72
- },
73
- target: {
74
- definition: null,
75
- version: null,
76
- },
77
- };
78
- this.processCount = null;
79
- this.uniqueFlowNodeMap = [];
80
- this.taskMapping = {};
81
- this.diagram = null;
82
- }
83
- MigrationComponent.prototype.ngOnInit = function () {
84
- this.loadProcessDefinitions();
85
- };
86
- MigrationComponent.prototype.ngAfterViewInit = function () {
87
- this.diagram = {
88
- source: this.sourceDiagram,
89
- target: this.targetDiagram,
90
- };
91
- };
92
- Object.defineProperty(MigrationComponent.prototype, "taskMappingLength", {
93
- get: function () {
94
- return Object.keys(this.taskMapping).length;
95
- },
96
- enumerable: false,
97
- configurable: true
98
- });
99
- MigrationComponent.prototype.loadProcessDefinitions = function () {
100
- var _this = this;
101
- this.processService
102
- .getProcessDefinitions()
103
- .subscribe(function (processDefinitions) {
104
- _this.processDefinitions = processDefinitions;
105
- });
106
- };
107
- MigrationComponent.prototype.loadProcessDefinitionVersions = function (key, type) {
108
- var _this = this;
109
- this.fields[type].definition = key;
110
- this.selectedVersions[type] = [];
111
- this.clearProcess(type);
112
- if (key) {
113
- this.processService
114
- .getProcessDefinitionVersions(key)
115
- .subscribe(function (processDefinitionVersions) {
116
- _this.selectedVersions[type] = processDefinitionVersions;
117
- });
118
- }
119
- };
120
- MigrationComponent.prototype.loadProcess = function (id, type) {
121
- this.fields[type].version = id;
122
- this.clearProcess(type);
123
- if (id) {
124
- this.loadProcessDefinitionXML(id, type);
125
- if (type === 'source') {
126
- this.loadProcessCount(id);
127
- }
128
- }
129
- };
130
- MigrationComponent.prototype.clearProcess = function (type) {
131
- this.loaded[type] = false;
132
- this.selectedId[type] = null;
133
- this.diagram[type].clear();
134
- if (type === 'source') {
135
- this.processCount = null;
136
- }
137
- };
138
- MigrationComponent.prototype.loadProcessDefinitionXML = function (id, type) {
139
- var _this = this;
140
- this.processService.getProcessDefinitionXml(id).subscribe(function (xml) {
141
- _this.diagram[type].loadXml(xml['bpmn20Xml']);
142
- _this.selectedId[type] = id;
143
- });
144
- };
145
- MigrationComponent.prototype.loadProcessCount = function (id) {
146
- var _this = this;
147
- this.processService.getProcessCount(id).subscribe(function (response) {
148
- _this.processCount = response.count;
149
- });
150
- };
151
- MigrationComponent.prototype.setUniqueFlowNodeMap = function () {
152
- this.uniqueFlowNodeMap = [];
153
- var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
154
- var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
155
- if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
156
- this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id &&
157
- sourceFlowNode.$type === targetFlowNode.$type; }); });
158
- }
159
- };
160
- MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
161
- var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
162
- return targetFlowNodeMap.filter(function (flowNode) {
163
- return flowNode.$type === flowNodeType;
164
- });
165
- };
166
- MigrationComponent.prototype.diagramLoaded = function (diagramName) {
167
- this.loaded[diagramName] = true;
168
- if (this.loaded.source && this.loaded.target) {
169
- this.taskMapping = {};
170
- this.setUniqueFlowNodeMap();
171
- }
172
- };
173
- MigrationComponent.prototype.migrateProcess = function () {
174
- var _this = this;
175
- this.processService
176
- .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
177
- .subscribe(function (res) {
178
- _this.alertService.success('Process successfully migrated!');
179
- _this.clearProcess('source');
180
- _this.clearProcess('target');
181
- _this.fields = {
182
- source: {
183
- definition: null,
184
- version: null,
185
- },
186
- target: {
187
- definition: null,
188
- version: null,
189
- },
190
- };
191
- }, function (err) {
192
- _this.alertService.error('Process migration failed!');
193
- _this.logger.debug(err);
194
- });
195
- };
196
- return MigrationComponent;
197
- }());
198
- MigrationComponent.decorators = [
199
- { type: i0.Component, args: [{
200
- selector: 'valtimo-migration',
201
- 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\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n",
202
- 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 */"]
203
- },] }
204
- ];
205
- MigrationComponent.ctorParameters = function () { return [
206
- { type: process.ProcessService },
207
- { type: ngxLogger.NGXLogger },
208
- { type: components.AlertService }
209
- ]; };
210
- MigrationComponent.propDecorators = {
211
- sourceDiagram: [{ type: i0.ViewChild, args: ['sourceDiagram',] }],
212
- targetDiagram: [{ type: i0.ViewChild, args: ['targetDiagram',] }]
35
+ /*
36
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
37
+ *
38
+ * Licensed under EUPL, Version 1.2 (the "License");
39
+ * you may not use this file except in compliance with the License.
40
+ * You may obtain a copy of the License at
41
+ *
42
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
43
+ *
44
+ * Unless required by applicable law or agreed to in writing, software
45
+ * distributed under the License is distributed on an "AS IS" basis,
46
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47
+ * See the License for the specific language governing permissions and
48
+ * limitations under the License.
49
+ */
50
+ var MigrationComponent = /** @class */ (function () {
51
+ function MigrationComponent(processService, logger, alertService) {
52
+ this.processService = processService;
53
+ this.logger = logger;
54
+ this.alertService = alertService;
55
+ this.processDefinitions = [];
56
+ this.selectedVersions = {
57
+ source: [],
58
+ target: [],
59
+ };
60
+ this.selectedId = {
61
+ source: null,
62
+ target: null,
63
+ };
64
+ this.loaded = {
65
+ source: false,
66
+ target: false,
67
+ };
68
+ this.fields = {
69
+ source: {
70
+ definition: null,
71
+ version: null,
72
+ },
73
+ target: {
74
+ definition: null,
75
+ version: null,
76
+ },
77
+ };
78
+ this.processCount = null;
79
+ this.uniqueFlowNodeMap = [];
80
+ this.taskMapping = {};
81
+ this.diagram = null;
82
+ }
83
+ MigrationComponent.prototype.ngOnInit = function () {
84
+ this.loadProcessDefinitions();
85
+ };
86
+ MigrationComponent.prototype.ngAfterViewInit = function () {
87
+ this.diagram = {
88
+ source: this.sourceDiagram,
89
+ target: this.targetDiagram,
90
+ };
91
+ };
92
+ Object.defineProperty(MigrationComponent.prototype, "taskMappingLength", {
93
+ get: function () {
94
+ return Object.keys(this.taskMapping).length;
95
+ },
96
+ enumerable: false,
97
+ configurable: true
98
+ });
99
+ MigrationComponent.prototype.loadProcessDefinitions = function () {
100
+ var _this = this;
101
+ this.processService
102
+ .getProcessDefinitions()
103
+ .subscribe(function (processDefinitions) {
104
+ _this.processDefinitions = processDefinitions;
105
+ });
106
+ };
107
+ MigrationComponent.prototype.loadProcessDefinitionVersions = function (key, type) {
108
+ var _this = this;
109
+ this.fields[type].definition = key;
110
+ this.selectedVersions[type] = [];
111
+ this.clearProcess(type);
112
+ if (key) {
113
+ this.processService
114
+ .getProcessDefinitionVersions(key)
115
+ .subscribe(function (processDefinitionVersions) {
116
+ _this.selectedVersions[type] = processDefinitionVersions;
117
+ });
118
+ }
119
+ };
120
+ MigrationComponent.prototype.loadProcess = function (id, type) {
121
+ this.fields[type].version = id;
122
+ this.clearProcess(type);
123
+ if (id) {
124
+ this.loadProcessDefinitionXML(id, type);
125
+ if (type === 'source') {
126
+ this.loadProcessCount(id);
127
+ }
128
+ }
129
+ };
130
+ MigrationComponent.prototype.clearProcess = function (type) {
131
+ this.loaded[type] = false;
132
+ this.selectedId[type] = null;
133
+ this.diagram[type].clear();
134
+ if (type === 'source') {
135
+ this.processCount = null;
136
+ }
137
+ };
138
+ MigrationComponent.prototype.loadProcessDefinitionXML = function (id, type) {
139
+ var _this = this;
140
+ this.processService.getProcessDefinitionXml(id).subscribe(function (xml) {
141
+ _this.diagram[type].loadXml(xml['bpmn20Xml']);
142
+ _this.selectedId[type] = id;
143
+ });
144
+ };
145
+ MigrationComponent.prototype.loadProcessCount = function (id) {
146
+ var _this = this;
147
+ this.processService.getProcessCount(id).subscribe(function (response) {
148
+ _this.processCount = response.count;
149
+ });
150
+ };
151
+ MigrationComponent.prototype.setUniqueFlowNodeMap = function () {
152
+ this.uniqueFlowNodeMap = [];
153
+ var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
154
+ var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
155
+ if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
156
+ this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id &&
157
+ sourceFlowNode.$type === targetFlowNode.$type; }); });
158
+ }
159
+ };
160
+ MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
161
+ var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
162
+ return targetFlowNodeMap.filter(function (flowNode) {
163
+ return flowNode.$type === flowNodeType;
164
+ });
165
+ };
166
+ MigrationComponent.prototype.diagramLoaded = function (diagramName) {
167
+ this.loaded[diagramName] = true;
168
+ if (this.loaded.source && this.loaded.target) {
169
+ this.taskMapping = {};
170
+ this.setUniqueFlowNodeMap();
171
+ }
172
+ };
173
+ MigrationComponent.prototype.migrateProcess = function () {
174
+ var _this = this;
175
+ this.processService
176
+ .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
177
+ .subscribe(function (res) {
178
+ _this.alertService.success('Process successfully migrated!');
179
+ _this.clearProcess('source');
180
+ _this.clearProcess('target');
181
+ _this.fields = {
182
+ source: {
183
+ definition: null,
184
+ version: null,
185
+ },
186
+ target: {
187
+ definition: null,
188
+ version: null,
189
+ },
190
+ };
191
+ }, function (err) {
192
+ _this.alertService.error('Process migration failed!');
193
+ _this.logger.debug(err);
194
+ });
195
+ };
196
+ return MigrationComponent;
197
+ }());
198
+ MigrationComponent.decorators = [
199
+ { type: i0.Component, args: [{
200
+ selector: 'valtimo-migration',
201
+ 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\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n",
202
+ 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 */"]
203
+ },] }
204
+ ];
205
+ MigrationComponent.ctorParameters = function () { return [
206
+ { type: process.ProcessService },
207
+ { type: ngxLogger.NGXLogger },
208
+ { type: components.AlertService }
209
+ ]; };
210
+ MigrationComponent.propDecorators = {
211
+ sourceDiagram: [{ type: i0.ViewChild, args: ['sourceDiagram',] }],
212
+ targetDiagram: [{ type: i0.ViewChild, args: ['targetDiagram',] }]
213
213
  };
214
214
 
215
- /*
216
- * Copyright 2015-2020 Ritense BV, the Netherlands.
217
- *
218
- * Licensed under EUPL, Version 1.2 (the "License");
219
- * you may not use this file except in compliance with the License.
220
- * You may obtain a copy of the License at
221
- *
222
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
223
- *
224
- * Unless required by applicable law or agreed to in writing, software
225
- * distributed under the License is distributed on an "AS IS" basis,
226
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
227
- * See the License for the specific language governing permissions and
228
- * limitations under the License.
229
- */
230
- var ɵ0 = { title: 'Process migration', roles: [contract.ROLE_ADMIN] };
231
- var routes = [
232
- {
233
- path: 'process-migration',
234
- component: MigrationComponent,
235
- canActivate: [security.AuthGuardService],
236
- data: ɵ0,
237
- },
238
- ];
239
- var MigrationRoutingModule = /** @class */ (function () {
240
- function MigrationRoutingModule() {
241
- }
242
- return MigrationRoutingModule;
243
- }());
244
- MigrationRoutingModule.decorators = [
245
- { type: i0.NgModule, args: [{
246
- imports: [common.CommonModule, router.RouterModule.forChild(routes)],
247
- exports: [router.RouterModule],
248
- },] }
215
+ /*
216
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
217
+ *
218
+ * Licensed under EUPL, Version 1.2 (the "License");
219
+ * you may not use this file except in compliance with the License.
220
+ * You may obtain a copy of the License at
221
+ *
222
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
223
+ *
224
+ * Unless required by applicable law or agreed to in writing, software
225
+ * distributed under the License is distributed on an "AS IS" basis,
226
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
227
+ * See the License for the specific language governing permissions and
228
+ * limitations under the License.
229
+ */
230
+ var ɵ0 = { title: 'Process migration', roles: [config.ROLE_ADMIN] };
231
+ var routes = [
232
+ {
233
+ path: 'process-migration',
234
+ component: MigrationComponent,
235
+ canActivate: [security.AuthGuardService],
236
+ data: ɵ0,
237
+ },
238
+ ];
239
+ var MigrationRoutingModule = /** @class */ (function () {
240
+ function MigrationRoutingModule() {
241
+ }
242
+ return MigrationRoutingModule;
243
+ }());
244
+ MigrationRoutingModule.decorators = [
245
+ { type: i0.NgModule, args: [{
246
+ imports: [common.CommonModule, router.RouterModule.forChild(routes)],
247
+ exports: [router.RouterModule],
248
+ },] }
249
249
  ];
250
250
 
251
- /*
252
- * Copyright 2015-2020 Ritense BV, the Netherlands.
253
- *
254
- * Licensed under EUPL, Version 1.2 (the "License");
255
- * you may not use this file except in compliance with the License.
256
- * You may obtain a copy of the License at
257
- *
258
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
259
- *
260
- * Unless required by applicable law or agreed to in writing, software
261
- * distributed under the License is distributed on an "AS IS" basis,
262
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
263
- * See the License for the specific language governing permissions and
264
- * limitations under the License.
265
- */
266
- var MigrationProcessDiagramComponent = /** @class */ (function () {
267
- function MigrationProcessDiagramComponent(logger) {
268
- this.logger = logger;
269
- this.flowNodeMap = null;
270
- this.loaded = new i0.EventEmitter();
271
- }
272
- MigrationProcessDiagramComponent.prototype.ngOnInit = function () {
273
- var _this = this;
274
- this.bpmnJS = new BpmnJS();
275
- this.bpmnJS.on('import.done', function (_a) {
276
- var error = _a.error;
277
- if (!error) {
278
- var canvas = _this.bpmnJS.get('canvas');
279
- canvas.zoom('fit-viewport', 'auto');
280
- }
281
- });
282
- };
283
- MigrationProcessDiagramComponent.prototype.ngOnDestroy = function () {
284
- if (this.bpmnJS) {
285
- this.bpmnJS.destroy();
286
- }
287
- };
288
- MigrationProcessDiagramComponent.prototype.clear = function () {
289
- this.bpmnJS.clear();
290
- };
291
- MigrationProcessDiagramComponent.prototype.loadXml = function (xml) {
292
- var _this = this;
293
- this.bpmnJS.attachTo(this.el.nativeElement);
294
- this.bpmnJS.importXML(xml, function (err) {
295
- _this.logger.debug(err);
296
- var processElements = _this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
297
- return element.isExecutable;
298
- });
299
- _this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
300
- if (element.name === null || element.name === '') {
301
- element.name = element.id;
302
- }
303
- return element.$type !== 'bpmn:SequenceFlow';
304
- });
305
- _this.loaded.emit(_this.name);
306
- });
307
- };
308
- return MigrationProcessDiagramComponent;
309
- }());
310
- MigrationProcessDiagramComponent.decorators = [
311
- { type: i0.Component, args: [{
312
- selector: 'valtimo-migration-process-diagram',
313
- 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 #ref class=\"diagram-container\"></div>\n",
314
- 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 */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}"]
315
- },] }
316
- ];
317
- MigrationProcessDiagramComponent.ctorParameters = function () { return [
318
- { type: ngxLogger.NGXLogger }
319
- ]; };
320
- MigrationProcessDiagramComponent.propDecorators = {
321
- el: [{ type: i0.ViewChild, args: ['ref',] }],
322
- name: [{ type: i0.Input }],
323
- loaded: [{ type: i0.Output }]
251
+ /*
252
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
253
+ *
254
+ * Licensed under EUPL, Version 1.2 (the "License");
255
+ * you may not use this file except in compliance with the License.
256
+ * You may obtain a copy of the License at
257
+ *
258
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
259
+ *
260
+ * Unless required by applicable law or agreed to in writing, software
261
+ * distributed under the License is distributed on an "AS IS" basis,
262
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
263
+ * See the License for the specific language governing permissions and
264
+ * limitations under the License.
265
+ */
266
+ var MigrationProcessDiagramComponent = /** @class */ (function () {
267
+ function MigrationProcessDiagramComponent(logger) {
268
+ this.logger = logger;
269
+ this.flowNodeMap = null;
270
+ this.loaded = new i0.EventEmitter();
271
+ }
272
+ MigrationProcessDiagramComponent.prototype.ngOnInit = function () {
273
+ var _this = this;
274
+ this.bpmnJS = new BpmnJS();
275
+ this.bpmnJS.on('import.done', function (_a) {
276
+ var error = _a.error;
277
+ if (!error) {
278
+ var canvas = _this.bpmnJS.get('canvas');
279
+ canvas.zoom('fit-viewport', 'auto');
280
+ }
281
+ });
282
+ };
283
+ MigrationProcessDiagramComponent.prototype.ngOnDestroy = function () {
284
+ if (this.bpmnJS) {
285
+ this.bpmnJS.destroy();
286
+ }
287
+ };
288
+ MigrationProcessDiagramComponent.prototype.clear = function () {
289
+ this.bpmnJS.clear();
290
+ };
291
+ MigrationProcessDiagramComponent.prototype.loadXml = function (xml) {
292
+ var _this = this;
293
+ this.bpmnJS.attachTo(this.el.nativeElement);
294
+ this.bpmnJS.importXML(xml, function (err) {
295
+ _this.logger.debug(err);
296
+ var processElements = _this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
297
+ return element.isExecutable;
298
+ });
299
+ _this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
300
+ if (element.name === null || element.name === '') {
301
+ element.name = element.id;
302
+ }
303
+ return element.$type !== 'bpmn:SequenceFlow';
304
+ });
305
+ _this.loaded.emit(_this.name);
306
+ });
307
+ };
308
+ return MigrationProcessDiagramComponent;
309
+ }());
310
+ MigrationProcessDiagramComponent.decorators = [
311
+ { type: i0.Component, args: [{
312
+ selector: 'valtimo-migration-process-diagram',
313
+ 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 #ref class=\"diagram-container\"></div>\n",
314
+ 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 */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}"]
315
+ },] }
316
+ ];
317
+ MigrationProcessDiagramComponent.ctorParameters = function () { return [
318
+ { type: ngxLogger.NGXLogger }
319
+ ]; };
320
+ MigrationProcessDiagramComponent.propDecorators = {
321
+ el: [{ type: i0.ViewChild, args: ['ref',] }],
322
+ name: [{ type: i0.Input }],
323
+ loaded: [{ type: i0.Output }]
324
324
  };
325
325
 
326
- /*
327
- * Copyright 2015-2020 Ritense BV, the Netherlands.
328
- *
329
- * Licensed under EUPL, Version 1.2 (the "License");
330
- * you may not use this file except in compliance with the License.
331
- * You may obtain a copy of the License at
332
- *
333
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
334
- *
335
- * Unless required by applicable law or agreed to in writing, software
336
- * distributed under the License is distributed on an "AS IS" basis,
337
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
338
- * See the License for the specific language governing permissions and
339
- * limitations under the License.
340
- */
341
- var MigrationModule = /** @class */ (function () {
342
- function MigrationModule() {
343
- }
344
- return MigrationModule;
345
- }());
346
- MigrationModule.decorators = [
347
- { type: i0.NgModule, args: [{
348
- declarations: [MigrationComponent, MigrationProcessDiagramComponent],
349
- imports: [
350
- common.CommonModule,
351
- MigrationRoutingModule,
352
- forms.ReactiveFormsModule,
353
- components.WidgetModule,
354
- forms.FormsModule,
355
- core.TranslateModule,
356
- ],
357
- exports: [MigrationComponent],
358
- },] }
326
+ /*
327
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
328
+ *
329
+ * Licensed under EUPL, Version 1.2 (the "License");
330
+ * you may not use this file except in compliance with the License.
331
+ * You may obtain a copy of the License at
332
+ *
333
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
334
+ *
335
+ * Unless required by applicable law or agreed to in writing, software
336
+ * distributed under the License is distributed on an "AS IS" basis,
337
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
338
+ * See the License for the specific language governing permissions and
339
+ * limitations under the License.
340
+ */
341
+ var MigrationModule = /** @class */ (function () {
342
+ function MigrationModule() {
343
+ }
344
+ return MigrationModule;
345
+ }());
346
+ MigrationModule.decorators = [
347
+ { type: i0.NgModule, args: [{
348
+ declarations: [MigrationComponent, MigrationProcessDiagramComponent],
349
+ imports: [
350
+ common.CommonModule,
351
+ MigrationRoutingModule,
352
+ forms.ReactiveFormsModule,
353
+ components.WidgetModule,
354
+ forms.FormsModule,
355
+ core.TranslateModule,
356
+ ],
357
+ exports: [MigrationComponent],
358
+ },] }
359
359
  ];
360
360
 
361
- /*
362
- * Copyright 2015-2020 Ritense BV, the Netherlands.
363
- *
364
- * Licensed under EUPL, Version 1.2 (the "License");
365
- * you may not use this file except in compliance with the License.
366
- * You may obtain a copy of the License at
367
- *
368
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
369
- *
370
- * Unless required by applicable law or agreed to in writing, software
371
- * distributed under the License is distributed on an "AS IS" basis,
372
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
373
- * See the License for the specific language governing permissions and
374
- * limitations under the License.
361
+ /*
362
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
363
+ *
364
+ * Licensed under EUPL, Version 1.2 (the "License");
365
+ * you may not use this file except in compliance with the License.
366
+ * You may obtain a copy of the License at
367
+ *
368
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
369
+ *
370
+ * Unless required by applicable law or agreed to in writing, software
371
+ * distributed under the License is distributed on an "AS IS" basis,
372
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
373
+ * See the License for the specific language governing permissions and
374
+ * limitations under the License.
375
375
  */
376
376
 
377
- /**
378
- * Generated bundle index. Do not edit.
377
+ /**
378
+ * Generated bundle index. Do not edit.
379
379
  */
380
380
 
381
381
  exports.MigrationComponent = MigrationComponent;