@valtimo/migration 4.15.2-next-main.14 → 4.15.3-next-main.15

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.
@@ -4,374 +4,374 @@
4
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
5
  }(this, (function (exports, i0, process, ngxLogger, components, router, common, security, contract, 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.getProcessDefinitions().subscribe(function (processDefinitions) {
102
- _this.processDefinitions = processDefinitions;
103
- });
104
- };
105
- MigrationComponent.prototype.loadProcessDefinitionVersions = function (key, type) {
106
- var _this = this;
107
- this.fields[type].definition = key;
108
- this.selectedVersions[type] = [];
109
- this.clearProcess(type);
110
- if (key) {
111
- this.processService.getProcessDefinitionVersions(key).subscribe(function (processDefinitionVersions) {
112
- _this.selectedVersions[type] = processDefinitionVersions;
113
- });
114
- }
115
- };
116
- MigrationComponent.prototype.loadProcess = function (id, type) {
117
- this.fields[type].version = id;
118
- this.clearProcess(type);
119
- if (id) {
120
- this.loadProcessDefinitionXML(id, type);
121
- if (type === 'source') {
122
- this.loadProcessCount(id);
123
- }
124
- }
125
- };
126
- MigrationComponent.prototype.clearProcess = function (type) {
127
- this.loaded[type] = false;
128
- this.selectedId[type] = null;
129
- this.diagram[type].clear();
130
- if (type === 'source') {
131
- this.processCount = null;
132
- }
133
- };
134
- MigrationComponent.prototype.loadProcessDefinitionXML = function (id, type) {
135
- var _this = this;
136
- this.processService.getProcessDefinitionXml(id).subscribe(function (xml) {
137
- _this.diagram[type].loadXml(xml['bpmn20Xml']);
138
- _this.selectedId[type] = id;
139
- });
140
- };
141
- MigrationComponent.prototype.loadProcessCount = function (id) {
142
- var _this = this;
143
- this.processService.getProcessCount(id).subscribe(function (response) {
144
- _this.processCount = response.count;
145
- });
146
- };
147
- MigrationComponent.prototype.setUniqueFlowNodeMap = function () {
148
- this.uniqueFlowNodeMap = [];
149
- var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
150
- var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
151
- if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
152
- this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type; }); });
153
- }
154
- };
155
- MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
156
- var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
157
- return targetFlowNodeMap.filter(function (flowNode) {
158
- return flowNode.$type === flowNodeType;
159
- });
160
- };
161
- MigrationComponent.prototype.diagramLoaded = function (diagramName) {
162
- this.loaded[diagramName] = true;
163
- if (this.loaded.source && this.loaded.target) {
164
- this.taskMapping = {};
165
- this.setUniqueFlowNodeMap();
166
- }
167
- };
168
- MigrationComponent.prototype.migrateProcess = function () {
169
- var _this = this;
170
- this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe(function (res) {
171
- _this.alertService.success('Process successfully migrated!');
172
- _this.clearProcess('source');
173
- _this.clearProcess('target');
174
- _this.fields = {
175
- source: {
176
- definition: null,
177
- version: null
178
- },
179
- target: {
180
- definition: null,
181
- version: null
182
- }
183
- };
184
- }, function (err) {
185
- _this.alertService.error('Process migration failed!');
186
- _this.logger.debug(err);
187
- });
188
- };
189
- return MigrationComponent;
190
- }());
191
- MigrationComponent.decorators = [
192
- { type: i0.Component, args: [{
193
- selector: 'valtimo-migration',
194
- 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\">\n </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 class=\"form-control\" id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\" (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select class=\"form-control\" id=\"sourceVer\" [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select class=\"form-control\" id=\"targetDef\" [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select class=\"form-control\" id=\"targetVer\" [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"source\" (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"target\" (loaded)=\"diagramLoaded($event)\"\n #targetDiagram></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 *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\">{{targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id}}</option>\n </select>\n </td>\n </tr>\n </table>\n <hr>\n <div class=\"btn-group mb-5\">\n <button [disabled]=\"(uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) || !loaded.source || !loaded.target\"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\">Migrate <span *ngIf=\"processCount !== null\"\n class=\"badge badge-pill badge-secondary\">{{processCount}}</span>\n </button>\n </div>\n </div>\n</div>\n",
195
- 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 */"]
196
- },] }
197
- ];
198
- MigrationComponent.ctorParameters = function () { return [
199
- { type: process.ProcessService },
200
- { type: ngxLogger.NGXLogger },
201
- { type: components.AlertService }
202
- ]; };
203
- MigrationComponent.propDecorators = {
204
- sourceDiagram: [{ type: i0.ViewChild, args: ['sourceDiagram',] }],
205
- 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.getProcessDefinitions().subscribe(function (processDefinitions) {
102
+ _this.processDefinitions = processDefinitions;
103
+ });
104
+ };
105
+ MigrationComponent.prototype.loadProcessDefinitionVersions = function (key, type) {
106
+ var _this = this;
107
+ this.fields[type].definition = key;
108
+ this.selectedVersions[type] = [];
109
+ this.clearProcess(type);
110
+ if (key) {
111
+ this.processService.getProcessDefinitionVersions(key).subscribe(function (processDefinitionVersions) {
112
+ _this.selectedVersions[type] = processDefinitionVersions;
113
+ });
114
+ }
115
+ };
116
+ MigrationComponent.prototype.loadProcess = function (id, type) {
117
+ this.fields[type].version = id;
118
+ this.clearProcess(type);
119
+ if (id) {
120
+ this.loadProcessDefinitionXML(id, type);
121
+ if (type === 'source') {
122
+ this.loadProcessCount(id);
123
+ }
124
+ }
125
+ };
126
+ MigrationComponent.prototype.clearProcess = function (type) {
127
+ this.loaded[type] = false;
128
+ this.selectedId[type] = null;
129
+ this.diagram[type].clear();
130
+ if (type === 'source') {
131
+ this.processCount = null;
132
+ }
133
+ };
134
+ MigrationComponent.prototype.loadProcessDefinitionXML = function (id, type) {
135
+ var _this = this;
136
+ this.processService.getProcessDefinitionXml(id).subscribe(function (xml) {
137
+ _this.diagram[type].loadXml(xml['bpmn20Xml']);
138
+ _this.selectedId[type] = id;
139
+ });
140
+ };
141
+ MigrationComponent.prototype.loadProcessCount = function (id) {
142
+ var _this = this;
143
+ this.processService.getProcessCount(id).subscribe(function (response) {
144
+ _this.processCount = response.count;
145
+ });
146
+ };
147
+ MigrationComponent.prototype.setUniqueFlowNodeMap = function () {
148
+ this.uniqueFlowNodeMap = [];
149
+ var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
150
+ var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
151
+ if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
152
+ this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type; }); });
153
+ }
154
+ };
155
+ MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
156
+ var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
157
+ return targetFlowNodeMap.filter(function (flowNode) {
158
+ return flowNode.$type === flowNodeType;
159
+ });
160
+ };
161
+ MigrationComponent.prototype.diagramLoaded = function (diagramName) {
162
+ this.loaded[diagramName] = true;
163
+ if (this.loaded.source && this.loaded.target) {
164
+ this.taskMapping = {};
165
+ this.setUniqueFlowNodeMap();
166
+ }
167
+ };
168
+ MigrationComponent.prototype.migrateProcess = function () {
169
+ var _this = this;
170
+ this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe(function (res) {
171
+ _this.alertService.success('Process successfully migrated!');
172
+ _this.clearProcess('source');
173
+ _this.clearProcess('target');
174
+ _this.fields = {
175
+ source: {
176
+ definition: null,
177
+ version: null
178
+ },
179
+ target: {
180
+ definition: null,
181
+ version: null
182
+ }
183
+ };
184
+ }, function (err) {
185
+ _this.alertService.error('Process migration failed!');
186
+ _this.logger.debug(err);
187
+ });
188
+ };
189
+ return MigrationComponent;
190
+ }());
191
+ MigrationComponent.decorators = [
192
+ { type: i0.Component, args: [{
193
+ selector: 'valtimo-migration',
194
+ 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\">\n </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 class=\"form-control\" id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\" (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select class=\"form-control\" id=\"sourceVer\" [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select class=\"form-control\" id=\"targetDef\" [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select class=\"form-control\" id=\"targetVer\" [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"source\" (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"target\" (loaded)=\"diagramLoaded($event)\"\n #targetDiagram></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 *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\">{{targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id}}</option>\n </select>\n </td>\n </tr>\n </table>\n <hr>\n <div class=\"btn-group mb-5\">\n <button [disabled]=\"(uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) || !loaded.source || !loaded.target\"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\">Migrate <span *ngIf=\"processCount !== null\"\n class=\"badge badge-pill badge-secondary\">{{processCount}}</span>\n </button>\n </div>\n </div>\n</div>\n",
195
+ 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 */"]
196
+ },] }
197
+ ];
198
+ MigrationComponent.ctorParameters = function () { return [
199
+ { type: process.ProcessService },
200
+ { type: ngxLogger.NGXLogger },
201
+ { type: components.AlertService }
202
+ ]; };
203
+ MigrationComponent.propDecorators = {
204
+ sourceDiagram: [{ type: i0.ViewChild, args: ['sourceDiagram',] }],
205
+ targetDiagram: [{ type: i0.ViewChild, args: ['targetDiagram',] }]
206
206
  };
207
207
 
208
- /*
209
- * Copyright 2015-2020 Ritense BV, the Netherlands.
210
- *
211
- * Licensed under EUPL, Version 1.2 (the "License");
212
- * you may not use this file except in compliance with the License.
213
- * You may obtain a copy of the License at
214
- *
215
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
216
- *
217
- * Unless required by applicable law or agreed to in writing, software
218
- * distributed under the License is distributed on an "AS IS" basis,
219
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
- * See the License for the specific language governing permissions and
221
- * limitations under the License.
222
- */
223
- var ɵ0 = { title: 'Process migration', roles: [contract.ROLE_ADMIN] };
224
- var routes = [
225
- {
226
- path: 'process-migration',
227
- component: MigrationComponent,
228
- canActivate: [security.AuthGuardService],
229
- data: ɵ0,
230
- },
231
- ];
232
- var MigrationRoutingModule = /** @class */ (function () {
233
- function MigrationRoutingModule() {
234
- }
235
- return MigrationRoutingModule;
236
- }());
237
- MigrationRoutingModule.decorators = [
238
- { type: i0.NgModule, args: [{
239
- imports: [
240
- common.CommonModule,
241
- router.RouterModule.forChild(routes),
242
- ],
243
- exports: [router.RouterModule]
244
- },] }
208
+ /*
209
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
210
+ *
211
+ * Licensed under EUPL, Version 1.2 (the "License");
212
+ * you may not use this file except in compliance with the License.
213
+ * You may obtain a copy of the License at
214
+ *
215
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
216
+ *
217
+ * Unless required by applicable law or agreed to in writing, software
218
+ * distributed under the License is distributed on an "AS IS" basis,
219
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
+ * See the License for the specific language governing permissions and
221
+ * limitations under the License.
222
+ */
223
+ var ɵ0 = { title: 'Process migration', roles: [contract.ROLE_ADMIN] };
224
+ var routes = [
225
+ {
226
+ path: 'process-migration',
227
+ component: MigrationComponent,
228
+ canActivate: [security.AuthGuardService],
229
+ data: ɵ0,
230
+ },
231
+ ];
232
+ var MigrationRoutingModule = /** @class */ (function () {
233
+ function MigrationRoutingModule() {
234
+ }
235
+ return MigrationRoutingModule;
236
+ }());
237
+ MigrationRoutingModule.decorators = [
238
+ { type: i0.NgModule, args: [{
239
+ imports: [
240
+ common.CommonModule,
241
+ router.RouterModule.forChild(routes),
242
+ ],
243
+ exports: [router.RouterModule]
244
+ },] }
245
245
  ];
246
246
 
247
- /*
248
- * Copyright 2015-2020 Ritense BV, the Netherlands.
249
- *
250
- * Licensed under EUPL, Version 1.2 (the "License");
251
- * you may not use this file except in compliance with the License.
252
- * You may obtain a copy of the License at
253
- *
254
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
255
- *
256
- * Unless required by applicable law or agreed to in writing, software
257
- * distributed under the License is distributed on an "AS IS" basis,
258
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
259
- * See the License for the specific language governing permissions and
260
- * limitations under the License.
261
- */
262
- var MigrationProcessDiagramComponent = /** @class */ (function () {
263
- function MigrationProcessDiagramComponent(logger) {
264
- this.logger = logger;
265
- this.flowNodeMap = null;
266
- this.loaded = new i0.EventEmitter();
267
- }
268
- MigrationProcessDiagramComponent.prototype.ngOnInit = function () {
269
- var _this = this;
270
- this.bpmnJS = new BpmnJS();
271
- this.bpmnJS.on('import.done', function (_a) {
272
- var error = _a.error;
273
- if (!error) {
274
- var canvas = _this.bpmnJS.get('canvas');
275
- canvas.zoom('fit-viewport', 'auto');
276
- }
277
- });
278
- };
279
- MigrationProcessDiagramComponent.prototype.ngOnDestroy = function () {
280
- if (this.bpmnJS) {
281
- this.bpmnJS.destroy();
282
- }
283
- };
284
- MigrationProcessDiagramComponent.prototype.clear = function () {
285
- this.bpmnJS.clear();
286
- };
287
- MigrationProcessDiagramComponent.prototype.loadXml = function (xml) {
288
- var _this = this;
289
- this.bpmnJS.attachTo(this.el.nativeElement);
290
- this.bpmnJS.importXML(xml, function (err) {
291
- _this.logger.debug(err);
292
- var processElements = _this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
293
- return element.isExecutable;
294
- });
295
- _this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
296
- if (element.name === null || element.name === '') {
297
- element.name = element.id;
298
- }
299
- return element.$type !== 'bpmn:SequenceFlow';
300
- });
301
- _this.loaded.emit(_this.name);
302
- });
303
- };
304
- return MigrationProcessDiagramComponent;
305
- }());
306
- MigrationProcessDiagramComponent.decorators = [
307
- { type: i0.Component, args: [{
308
- selector: 'valtimo-migration-process-diagram',
309
- 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",
310
- 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}"]
311
- },] }
312
- ];
313
- MigrationProcessDiagramComponent.ctorParameters = function () { return [
314
- { type: ngxLogger.NGXLogger }
315
- ]; };
316
- MigrationProcessDiagramComponent.propDecorators = {
317
- el: [{ type: i0.ViewChild, args: ['ref',] }],
318
- name: [{ type: i0.Input }],
319
- loaded: [{ type: i0.Output }]
247
+ /*
248
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
249
+ *
250
+ * Licensed under EUPL, Version 1.2 (the "License");
251
+ * you may not use this file except in compliance with the License.
252
+ * You may obtain a copy of the License at
253
+ *
254
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
255
+ *
256
+ * Unless required by applicable law or agreed to in writing, software
257
+ * distributed under the License is distributed on an "AS IS" basis,
258
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
259
+ * See the License for the specific language governing permissions and
260
+ * limitations under the License.
261
+ */
262
+ var MigrationProcessDiagramComponent = /** @class */ (function () {
263
+ function MigrationProcessDiagramComponent(logger) {
264
+ this.logger = logger;
265
+ this.flowNodeMap = null;
266
+ this.loaded = new i0.EventEmitter();
267
+ }
268
+ MigrationProcessDiagramComponent.prototype.ngOnInit = function () {
269
+ var _this = this;
270
+ this.bpmnJS = new BpmnJS();
271
+ this.bpmnJS.on('import.done', function (_a) {
272
+ var error = _a.error;
273
+ if (!error) {
274
+ var canvas = _this.bpmnJS.get('canvas');
275
+ canvas.zoom('fit-viewport', 'auto');
276
+ }
277
+ });
278
+ };
279
+ MigrationProcessDiagramComponent.prototype.ngOnDestroy = function () {
280
+ if (this.bpmnJS) {
281
+ this.bpmnJS.destroy();
282
+ }
283
+ };
284
+ MigrationProcessDiagramComponent.prototype.clear = function () {
285
+ this.bpmnJS.clear();
286
+ };
287
+ MigrationProcessDiagramComponent.prototype.loadXml = function (xml) {
288
+ var _this = this;
289
+ this.bpmnJS.attachTo(this.el.nativeElement);
290
+ this.bpmnJS.importXML(xml, function (err) {
291
+ _this.logger.debug(err);
292
+ var processElements = _this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
293
+ return element.isExecutable;
294
+ });
295
+ _this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
296
+ if (element.name === null || element.name === '') {
297
+ element.name = element.id;
298
+ }
299
+ return element.$type !== 'bpmn:SequenceFlow';
300
+ });
301
+ _this.loaded.emit(_this.name);
302
+ });
303
+ };
304
+ return MigrationProcessDiagramComponent;
305
+ }());
306
+ MigrationProcessDiagramComponent.decorators = [
307
+ { type: i0.Component, args: [{
308
+ selector: 'valtimo-migration-process-diagram',
309
+ 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",
310
+ 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}"]
311
+ },] }
312
+ ];
313
+ MigrationProcessDiagramComponent.ctorParameters = function () { return [
314
+ { type: ngxLogger.NGXLogger }
315
+ ]; };
316
+ MigrationProcessDiagramComponent.propDecorators = {
317
+ el: [{ type: i0.ViewChild, args: ['ref',] }],
318
+ name: [{ type: i0.Input }],
319
+ loaded: [{ type: i0.Output }]
320
320
  };
321
321
 
322
- /*
323
- * Copyright 2015-2020 Ritense BV, the Netherlands.
324
- *
325
- * Licensed under EUPL, Version 1.2 (the "License");
326
- * you may not use this file except in compliance with the License.
327
- * You may obtain a copy of the License at
328
- *
329
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
330
- *
331
- * Unless required by applicable law or agreed to in writing, software
332
- * distributed under the License is distributed on an "AS IS" basis,
333
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
334
- * See the License for the specific language governing permissions and
335
- * limitations under the License.
336
- */
337
- var MigrationModule = /** @class */ (function () {
338
- function MigrationModule() {
339
- }
340
- return MigrationModule;
341
- }());
342
- MigrationModule.decorators = [
343
- { type: i0.NgModule, args: [{
344
- declarations: [MigrationComponent, MigrationProcessDiagramComponent],
345
- imports: [
346
- common.CommonModule,
347
- MigrationRoutingModule,
348
- forms.ReactiveFormsModule,
349
- components.WidgetModule,
350
- forms.FormsModule,
351
- core.TranslateModule
352
- ],
353
- exports: [MigrationComponent]
354
- },] }
322
+ /*
323
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
324
+ *
325
+ * Licensed under EUPL, Version 1.2 (the "License");
326
+ * you may not use this file except in compliance with the License.
327
+ * You may obtain a copy of the License at
328
+ *
329
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
330
+ *
331
+ * Unless required by applicable law or agreed to in writing, software
332
+ * distributed under the License is distributed on an "AS IS" basis,
333
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
334
+ * See the License for the specific language governing permissions and
335
+ * limitations under the License.
336
+ */
337
+ var MigrationModule = /** @class */ (function () {
338
+ function MigrationModule() {
339
+ }
340
+ return MigrationModule;
341
+ }());
342
+ MigrationModule.decorators = [
343
+ { type: i0.NgModule, args: [{
344
+ declarations: [MigrationComponent, MigrationProcessDiagramComponent],
345
+ imports: [
346
+ common.CommonModule,
347
+ MigrationRoutingModule,
348
+ forms.ReactiveFormsModule,
349
+ components.WidgetModule,
350
+ forms.FormsModule,
351
+ core.TranslateModule
352
+ ],
353
+ exports: [MigrationComponent]
354
+ },] }
355
355
  ];
356
356
 
357
- /*
358
- * Copyright 2015-2020 Ritense BV, the Netherlands.
359
- *
360
- * Licensed under EUPL, Version 1.2 (the "License");
361
- * you may not use this file except in compliance with the License.
362
- * You may obtain a copy of the License at
363
- *
364
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
365
- *
366
- * Unless required by applicable law or agreed to in writing, software
367
- * distributed under the License is distributed on an "AS IS" basis,
368
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
369
- * See the License for the specific language governing permissions and
370
- * limitations under the License.
357
+ /*
358
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
359
+ *
360
+ * Licensed under EUPL, Version 1.2 (the "License");
361
+ * you may not use this file except in compliance with the License.
362
+ * You may obtain a copy of the License at
363
+ *
364
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
365
+ *
366
+ * Unless required by applicable law or agreed to in writing, software
367
+ * distributed under the License is distributed on an "AS IS" basis,
368
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
369
+ * See the License for the specific language governing permissions and
370
+ * limitations under the License.
371
371
  */
372
372
 
373
- /**
374
- * Generated bundle index. Do not edit.
373
+ /**
374
+ * Generated bundle index. Do not edit.
375
375
  */
376
376
 
377
377
  exports.MigrationComponent = MigrationComponent;