@valtimo/migration 4.15.2 → 4.16.0-next-main.19

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,8 +1,8 @@
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
7
  /*
8
8
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -27,7 +27,7 @@
27
27
  MigrationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
28
28
  MigrationService.decorators = [
29
29
  { type: i0.Injectable, args: [{
30
- providedIn: 'root'
30
+ providedIn: 'root',
31
31
  },] }
32
32
  ];
33
33
  MigrationService.ctorParameters = function () { return []; };
@@ -55,25 +55,25 @@
55
55
  this.processDefinitions = [];
56
56
  this.selectedVersions = {
57
57
  source: [],
58
- target: []
58
+ target: [],
59
59
  };
60
60
  this.selectedId = {
61
61
  source: null,
62
- target: null
62
+ target: null,
63
63
  };
64
64
  this.loaded = {
65
65
  source: false,
66
- target: false
66
+ target: false,
67
67
  };
68
68
  this.fields = {
69
69
  source: {
70
70
  definition: null,
71
- version: null
71
+ version: null,
72
72
  },
73
73
  target: {
74
74
  definition: null,
75
- version: null
76
- }
75
+ version: null,
76
+ },
77
77
  };
78
78
  this.processCount = null;
79
79
  this.uniqueFlowNodeMap = [];
@@ -86,7 +86,7 @@
86
86
  MigrationComponent.prototype.ngAfterViewInit = function () {
87
87
  this.diagram = {
88
88
  source: this.sourceDiagram,
89
- target: this.targetDiagram
89
+ target: this.targetDiagram,
90
90
  };
91
91
  };
92
92
  Object.defineProperty(MigrationComponent.prototype, "taskMappingLength", {
@@ -98,7 +98,9 @@
98
98
  });
99
99
  MigrationComponent.prototype.loadProcessDefinitions = function () {
100
100
  var _this = this;
101
- this.processService.getProcessDefinitions().subscribe(function (processDefinitions) {
101
+ this.processService
102
+ .getProcessDefinitions()
103
+ .subscribe(function (processDefinitions) {
102
104
  _this.processDefinitions = processDefinitions;
103
105
  });
104
106
  };
@@ -108,7 +110,9 @@
108
110
  this.selectedVersions[type] = [];
109
111
  this.clearProcess(type);
110
112
  if (key) {
111
- this.processService.getProcessDefinitionVersions(key).subscribe(function (processDefinitionVersions) {
113
+ this.processService
114
+ .getProcessDefinitionVersions(key)
115
+ .subscribe(function (processDefinitionVersions) {
112
116
  _this.selectedVersions[type] = processDefinitionVersions;
113
117
  });
114
118
  }
@@ -149,7 +153,8 @@
149
153
  var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
150
154
  var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
151
155
  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; }); });
156
+ this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id &&
157
+ sourceFlowNode.$type === targetFlowNode.$type; }); });
153
158
  }
154
159
  };
155
160
  MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
@@ -167,19 +172,21 @@
167
172
  };
168
173
  MigrationComponent.prototype.migrateProcess = function () {
169
174
  var _this = this;
170
- this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe(function (res) {
175
+ this.processService
176
+ .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
177
+ .subscribe(function (res) {
171
178
  _this.alertService.success('Process successfully migrated!');
172
179
  _this.clearProcess('source');
173
180
  _this.clearProcess('target');
174
181
  _this.fields = {
175
182
  source: {
176
183
  definition: null,
177
- version: null
184
+ version: null,
178
185
  },
179
186
  target: {
180
187
  definition: null,
181
- version: null
182
- }
188
+ version: null,
189
+ },
183
190
  };
184
191
  }, function (err) {
185
192
  _this.alertService.error('Process migration failed!');
@@ -191,7 +198,7 @@
191
198
  MigrationComponent.decorators = [
192
199
  { type: i0.Component, args: [{
193
200
  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",
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",
195
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 */"]
196
203
  },] }
197
204
  ];
@@ -220,7 +227,7 @@
220
227
  * See the License for the specific language governing permissions and
221
228
  * limitations under the License.
222
229
  */
223
- var ɵ0 = { title: 'Process migration', roles: [contract.ROLE_ADMIN] };
230
+ var ɵ0 = { title: 'Process migration', roles: [config.ROLE_ADMIN] };
224
231
  var routes = [
225
232
  {
226
233
  path: 'process-migration',
@@ -236,11 +243,8 @@
236
243
  }());
237
244
  MigrationRoutingModule.decorators = [
238
245
  { type: i0.NgModule, args: [{
239
- imports: [
240
- common.CommonModule,
241
- router.RouterModule.forChild(routes),
242
- ],
243
- exports: [router.RouterModule]
246
+ imports: [common.CommonModule, router.RouterModule.forChild(routes)],
247
+ exports: [router.RouterModule],
244
248
  },] }
245
249
  ];
246
250
 
@@ -348,9 +352,9 @@
348
352
  forms.ReactiveFormsModule,
349
353
  components.WidgetModule,
350
354
  forms.FormsModule,
351
- core.TranslateModule
355
+ core.TranslateModule,
352
356
  ],
353
- exports: [MigrationComponent]
357
+ exports: [MigrationComponent],
354
358
  },] }
355
359
  ];
356
360
 
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-migration.umd.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MigrationService {\n\n constructor() {\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 {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss']\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: []\n };\n public selectedId = {\n source: null,\n target: null\n };\n public loaded = {\n source: false,\n target: false\n };\n public fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(private processService: ProcessService, private logger: NGXLogger, private alertService: AlertService) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService.getProcessDefinitionVersions(key).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode =>\n !targetFlowNodeMap.some(targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type));\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe((res) => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n }, err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class MigrationRoutingModule {\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, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss']\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {\n }\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, (err) => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\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 {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule\n ],\n exports: [MigrationComponent]\n})\nexport class MigrationModule {\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 migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":["Injectable","Component","ProcessService","NGXLogger","AlertService","ViewChild","ROLE_ADMIN","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","Input","Output","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAuBE;SACC;;;;;gBANFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;ICpBD;;;;;;;;;;;;;;;;QA+DE,4BAAoB,cAA8B,EAAU,MAAiB,EAAU,YAA0B;YAA7F,mBAAc,GAAd,cAAc,CAAgB;YAAU,WAAM,GAAN,MAAM,CAAW;YAAU,iBAAY,GAAZ,YAAY,CAAc;YAjC1G,uBAAkB,GAAwB,EAAE,CAAC;YAC7C,qBAAgB,GAAG;gBACxB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACX,CAAC;YACK,eAAU,GAAG;gBAClB,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,IAAI;aACb,CAAC;YACK,WAAM,GAAG;gBACd,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,KAAK;aACd,CAAC;YACK,WAAM,GAAG;gBACd,MAAM,EAAE;oBACN,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,IAAI;iBACd;gBACD,MAAM,EAAE;oBACN,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,IAAI;iBACd;aACF,CAAC;YAEK,iBAAY,GAAkB,IAAI,CAAC;YACnC,sBAAiB,GAAU,EAAE,CAAC;YAC9B,gBAAW,GAAQ,EAAE,CAAC;YAKtB,YAAO,GAAQ,IAAI,CAAC;SAG1B;QAED,qCAAQ,GAAR;YACE,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC/B;QAED,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YAAS,SAAC,KAAK;uBACfO,QAAK;yBACLC,SAAM;;;ICjCT;;;;;;;;;;;;;;;;QAsCA;;;;;gBAZCL,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;oBACpE,OAAO,EAAE;wBACPC,mBAAY;wBACZ,sBAAsB;wBACtBK,yBAAmB;wBACnBC,uBAAY;wBACZC,iBAAW;wBACXC,oBAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICrCD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"valtimo-migration.umd.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MigrationService {\n constructor() {}\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 {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: [],\n };\n public selectedId = {\n source: null,\n target: null,\n };\n public loaded = {\n source: false,\n target: false,\n };\n public fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(\n private processService: ProcessService,\n private logger: NGXLogger,\n private alertService: AlertService\n ) {}\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService\n .getProcessDefinitionVersions(key)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(\n sourceFlowNode =>\n !targetFlowNodeMap.some(\n targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id &&\n sourceFlowNode.$type === targetFlowNode.$type\n )\n );\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService\n .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)\n .subscribe(\n res => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n },\n err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MigrationRoutingModule {}\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 {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss'],\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {}\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, err => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\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 {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n ],\n exports: [MigrationComponent],\n})\nexport class MigrationModule {}\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 migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":["Injectable","Component","ProcessService","NGXLogger","AlertService","ViewChild","ROLE_ADMIN","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","Input","Output","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAsBE;SAAgB;;;;;gBAJjBA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;ICpBD;;;;;;;;;;;;;;;;QA6DE,4BACU,cAA8B,EAC9B,MAAiB,EACjB,YAA0B;YAF1B,mBAAc,GAAd,cAAc,CAAgB;YAC9B,WAAM,GAAN,MAAM,CAAW;YACjB,iBAAY,GAAZ,YAAY,CAAc;YApC7B,uBAAk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AAC,cAAc,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,OAAO;oBACxF,OAAO,OAAO,CAAC,YAAY,CAAC;iBAC7B,CAAC,CAAC;gBACH,KAAI,CAAC,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,OAAO;oBACzE,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,EAAE,EAAE;wBAChD,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC;qBAC3B;oBACD,OAAO,OAAO,CAAC,KAAK,KAAK,mBAAmB,CAAC;iBAC9C,CAAC,CAAC;gBACH,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,IAAI,CAAC,CAAC;aAC7B,CAAC,CAAC;SACJ;;;;gBAlDFV,YAAS,SAAC;oBACT,QAAQ,EAAE,mCAAmC;oBAC7C,0sBAAyD;;iBAE1D;;;gBANOE,mBAAS;;;qBAWdE,YAAS,SAAC,KAAK;uBACfO,QAAK;yBACLC,SAAM;;;ICzCT;;;;;;;;;;;;;;;;QAqCA;;;;;gBAZCL,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;oBACpE,OAAO,EAAE;wBACPC,mBAAY;wBACZ,sBAAsB;wBACtBK,yBAAmB;wBACnBC,uBAAY;wBACZC,iBAAW;wBACXC,oBAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICpCD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(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")):"function"==typeof define&&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"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo.migration={}),e.ng.core,e.process,e.ngxLogger,e.components,e.ng.router,e.ng.common,e.security,e.contract,e.ng.forms,e.BpmnJS,e.core)}(this,(function(e,n,t,o,i,r,s,a,l,c,d,u){"use strict";var p=function(){};p.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[]};var g=function(){function e(e,n,t){this.processService=e,this.logger=n,this.alertService=t,this.processDefinitions=[],this.selectedVersions={source:[],target:[]},this.selectedId={source:null,target:null},this.loaded={source:!1,target:!1},this.fields={source:{definition:null,version:null},target:{definition:null,version:null}},this.processCount=null,this.uniqueFlowNodeMap=[],this.taskMapping={},this.diagram=null}return e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.ngAfterViewInit=function(){this.diagram={source:this.sourceDiagram,target:this.targetDiagram}},Object.defineProperty(e.prototype,"taskMappingLength",{get:function(){return Object.keys(this.taskMapping).length},enumerable:!1,configurable:!0}),e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.loadProcessDefinitionVersions=function(e,n){var t=this;this.fields[n].definition=e,this.selectedVersions[n]=[],this.clearProcess(n),e&&this.processService.getProcessDefinitionVersions(e).subscribe((function(e){t.selectedVersions[n]=e}))},e.prototype.loadProcess=function(e,n){this.fields[n].version=e,this.clearProcess(n),e&&(this.loadProcessDefinitionXML(e,n),"source"===n&&this.loadProcessCount(e))},e.prototype.clearProcess=function(e){this.loaded[e]=!1,this.selectedId[e]=null,this.diagram[e].clear(),"source"===e&&(this.processCount=null)},e.prototype.loadProcessDefinitionXML=function(e,n){var t=this;this.processService.getProcessDefinitionXml(e).subscribe((function(o){t.diagram[n].loadXml(o.bpmn20Xml),t.selectedId[n]=e}))},e.prototype.loadProcessCount=function(e){var n=this;this.processService.getProcessCount(e).subscribe((function(e){n.processCount=e.count}))},e.prototype.setUniqueFlowNodeMap=function(){this.uniqueFlowNodeMap=[];var e=this.sourceDiagram.flowNodeMap,n=this.targetDiagram.flowNodeMap;null!=e&&null!=n&&(this.uniqueFlowNodeMap=e.filter((function(e){return!n.some((function(n){return e.id===n.id&&e.$type===n.$type}))})))},e.prototype.getFilteredTargetFlowNodeMap=function(e){return this.targetDiagram.flowNodeMap.filter((function(n){return n.$type===e}))},e.prototype.diagramLoaded=function(e){this.loaded[e]=!0,this.loaded.source&&this.loaded.target&&(this.taskMapping={},this.setUniqueFlowNodeMap())},e.prototype.migrateProcess=function(){var e=this;this.processService.migrateProcess(this.selectedId.source,this.selectedId.target,this.taskMapping).subscribe((function(n){e.alertService.success("Process successfully migrated!"),e.clearProcess("source"),e.clearProcess("target"),e.fields={source:{definition:null,version:null},target:{definition:null,version:null}}}),(function(n){e.alertService.error("Process migration failed!"),e.logger.debug(n)}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-migration",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">\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',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 */']}]}],g.ctorParameters=function(){return[{type:t.ProcessService},{type:o.NGXLogger},{type:i.AlertService}]},g.propDecorators={sourceDiagram:[{type:n.ViewChild,args:["sourceDiagram"]}],targetDiagram:[{type:n.ViewChild,args:["targetDiagram"]}]};var m={title:"Process migration",roles:[l.ROLE_ADMIN]},f=[{path:"process-migration",component:g,canActivate:[a.AuthGuardService],data:m}],h=function(){};h.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,r.RouterModule.forChild(f)],exports:[r.RouterModule]}]}];var v=function(){function e(e){this.logger=e,this.flowNodeMap=null,this.loaded=new n.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new d,this.bpmnJS.on("import.done",(function(n){n.error||e.bpmnJS.get("canvas").zoom("fit-viewport","auto")}))},e.prototype.ngOnDestroy=function(){this.bpmnJS&&this.bpmnJS.destroy()},e.prototype.clear=function(){this.bpmnJS.clear()},e.prototype.loadXml=function(e){var n=this;this.bpmnJS.attachTo(this.el.nativeElement),this.bpmnJS.importXML(e,(function(e){n.logger.debug(e);var t=n.bpmnJS.getDefinitions().rootElements.filter((function(e){return e.isExecutable}));n.flowNodeMap=t[0].flowElements.filter((function(e){return null!==e.name&&""!==e.name||(e.name=e.id),"bpmn:SequenceFlow"!==e.$type})),n.loaded.emit(n.name)}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-migration-process-diagram",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 #ref class="diagram-container"></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 */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}']}]}],v.ctorParameters=function(){return[{type:o.NGXLogger}]},v.propDecorators={el:[{type:n.ViewChild,args:["ref"]}],name:[{type:n.Input}],loaded:[{type:n.Output}]};var b=function(){};b.decorators=[{type:n.NgModule,args:[{declarations:[g,v],imports:[s.CommonModule,h,c.ReactiveFormsModule,i.WidgetModule,c.FormsModule,u.TranslateModule],exports:[g]}]}],e.MigrationComponent=g,e.MigrationModule=b,e.MigrationService=p,e.ɵa=v,e.ɵb=h,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(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")):"function"==typeof define&&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"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo.migration={}),e.ng.core,e.process,e.ngxLogger,e.components,e.ng.router,e.ng.common,e.security,e.config,e.ng.forms,e.BpmnJS,e.core)}(this,(function(e,n,t,o,i,r,s,a,l,c,d,u){"use strict";var p=function(){};p.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[]};var g=function(){function e(e,n,t){this.processService=e,this.logger=n,this.alertService=t,this.processDefinitions=[],this.selectedVersions={source:[],target:[]},this.selectedId={source:null,target:null},this.loaded={source:!1,target:!1},this.fields={source:{definition:null,version:null},target:{definition:null,version:null}},this.processCount=null,this.uniqueFlowNodeMap=[],this.taskMapping={},this.diagram=null}return e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.ngAfterViewInit=function(){this.diagram={source:this.sourceDiagram,target:this.targetDiagram}},Object.defineProperty(e.prototype,"taskMappingLength",{get:function(){return Object.keys(this.taskMapping).length},enumerable:!1,configurable:!0}),e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.loadProcessDefinitionVersions=function(e,n){var t=this;this.fields[n].definition=e,this.selectedVersions[n]=[],this.clearProcess(n),e&&this.processService.getProcessDefinitionVersions(e).subscribe((function(e){t.selectedVersions[n]=e}))},e.prototype.loadProcess=function(e,n){this.fields[n].version=e,this.clearProcess(n),e&&(this.loadProcessDefinitionXML(e,n),"source"===n&&this.loadProcessCount(e))},e.prototype.clearProcess=function(e){this.loaded[e]=!1,this.selectedId[e]=null,this.diagram[e].clear(),"source"===e&&(this.processCount=null)},e.prototype.loadProcessDefinitionXML=function(e,n){var t=this;this.processService.getProcessDefinitionXml(e).subscribe((function(o){t.diagram[n].loadXml(o.bpmn20Xml),t.selectedId[n]=e}))},e.prototype.loadProcessCount=function(e){var n=this;this.processService.getProcessCount(e).subscribe((function(e){n.processCount=e.count}))},e.prototype.setUniqueFlowNodeMap=function(){this.uniqueFlowNodeMap=[];var e=this.sourceDiagram.flowNodeMap,n=this.targetDiagram.flowNodeMap;null!=e&&null!=n&&(this.uniqueFlowNodeMap=e.filter((function(e){return!n.some((function(n){return e.id===n.id&&e.$type===n.$type}))})))},e.prototype.getFilteredTargetFlowNodeMap=function(e){return this.targetDiagram.flowNodeMap.filter((function(n){return n.$type===e}))},e.prototype.diagramLoaded=function(e){this.loaded[e]=!0,this.loaded.source&&this.loaded.target&&(this.taskMapping={},this.setUniqueFlowNodeMap())},e.prototype.migrateProcess=function(){var e=this;this.processService.migrateProcess(this.selectedId.source,this.selectedId.target,this.taskMapping).subscribe((function(n){e.alertService.success("Process successfully migrated!"),e.clearProcess("source"),e.clearProcess("target"),e.fields={source:{definition:null,version:null},target:{definition:null,version:null}}}),(function(n){e.alertService.error("Process migration failed!"),e.logger.debug(n)}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-migration",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">\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',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 */']}]}],g.ctorParameters=function(){return[{type:t.ProcessService},{type:o.NGXLogger},{type:i.AlertService}]},g.propDecorators={sourceDiagram:[{type:n.ViewChild,args:["sourceDiagram"]}],targetDiagram:[{type:n.ViewChild,args:["targetDiagram"]}]};var m={title:"Process migration",roles:[l.ROLE_ADMIN]},f=[{path:"process-migration",component:g,canActivate:[a.AuthGuardService],data:m}],h=function(){};h.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,r.RouterModule.forChild(f)],exports:[r.RouterModule]}]}];var v=function(){function e(e){this.logger=e,this.flowNodeMap=null,this.loaded=new n.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new d,this.bpmnJS.on("import.done",(function(n){n.error||e.bpmnJS.get("canvas").zoom("fit-viewport","auto")}))},e.prototype.ngOnDestroy=function(){this.bpmnJS&&this.bpmnJS.destroy()},e.prototype.clear=function(){this.bpmnJS.clear()},e.prototype.loadXml=function(e){var n=this;this.bpmnJS.attachTo(this.el.nativeElement),this.bpmnJS.importXML(e,(function(e){n.logger.debug(e);var t=n.bpmnJS.getDefinitions().rootElements.filter((function(e){return e.isExecutable}));n.flowNodeMap=t[0].flowElements.filter((function(e){return null!==e.name&&""!==e.name||(e.name=e.id),"bpmn:SequenceFlow"!==e.$type})),n.loaded.emit(n.name)}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-migration-process-diagram",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 #ref class="diagram-container"></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 */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}']}]}],v.ctorParameters=function(){return[{type:o.NGXLogger}]},v.propDecorators={el:[{type:n.ViewChild,args:["ref"]}],name:[{type:n.Input}],loaded:[{type:n.Output}]};var b=function(){};b.decorators=[{type:n.NgModule,args:[{declarations:[g,v],imports:[s.CommonModule,h,c.ReactiveFormsModule,i.WidgetModule,c.FormsModule,u.TranslateModule],exports:[g]}]}],e.MigrationComponent=g,e.MigrationModule=b,e.MigrationService=p,e.ɵa=v,e.ɵb=h,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=valtimo-migration.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts"],"names":["Injectable","args","providedIn","MigrationComponent","processService","logger","alertService","this","processDefinitions","selectedVersions","source","target","selectedId","loaded","fields","definition","version","processCount","uniqueFlowNodeMap","taskMapping","diagram","prototype","ngOnInit","loadProcessDefinitions","ngAfterViewInit","sourceDiagram","targetDiagram","Object","defineProperty","keys","length","_this","getProcessDefinitions","subscribe","loadProcessDefinitionVersions","key","type","clearProcess","getProcessDefinitionVersions","processDefinitionVersions","loadProcess","id","loadProcessDefinitionXML","loadProcessCount","clear","getProcessDefinitionXml","xml","loadXml","getProcessCount","response","count","setUniqueFlowNodeMap","sourceFlowNodeMap","flowNodeMap","targetFlowNodeMap","filter","sourceFlowNode","some","targetFlowNode","$type","getFilteredTargetFlowNodeMap","flowNodeType","flowNode","diagramLoaded","diagramName","migrateProcess","res","success","err","error","debug","Component","selector","template","ProcessService","NGXLogger","AlertService","ViewChild","title","roles","ROLE_ADMIN","routes","path","component","canActivate","AuthGuardService","data","ɵ0","NgModule","imports","CommonModule","RouterModule","forChild","exports","MigrationProcessDiagramComponent","EventEmitter","bpmnJS","BpmnJS","on","_a","get","zoom","ngOnDestroy","destroy","attachTo","el","nativeElement","importXML","processElements","getDefinitions","rootElements","element","isExecutable","flowElements","name","emit","Input","Output","declarations","MigrationRoutingModule","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":"m9BAuBE,4HALDA,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kEC4CZ,SAAAC,EAAoBC,EAAwCC,EAA2BC,GAAnEC,KAAAH,eAAAA,EAAwCG,KAAAF,OAAAA,EAA2BE,KAAAD,aAAAA,EAjChFC,KAAAC,mBAA0C,GAC1CD,KAAAE,iBAAmB,CACxBC,OAAQ,GACRC,OAAQ,IAEHJ,KAAAK,WAAa,CAClBF,OAAQ,KACRC,OAAQ,MAEHJ,KAAAM,OAAS,CACdH,QAAQ,EACRC,QAAQ,GAEHJ,KAAAO,OAAS,CACdJ,OAAQ,CACNK,WAAY,KACZC,QAAS,MAEXL,OAAQ,CACNI,WAAY,KACZC,QAAS,OAINT,KAAAU,aAA8B,KAC9BV,KAAAW,kBAA2B,GAC3BX,KAAAY,YAAmB,GAKnBZ,KAAAa,QAAe,YAKtBjB,EAAAkB,UAAAC,SAAA,WACEf,KAAKgB,0BAGPpB,EAAAkB,UAAAG,gBAAA,WACEjB,KAAKa,QAAU,CACbV,OAAQH,KAAK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A,sBACAC,EAAAA,gBCKH,iCAZC7B,EAAAA,SAAQvF,KAAA,CAAC,CACRqH,aAAc,CAACnH,EAAoB2F,GACnCL,QAAS,CACPC,EAAAA,aACA6B,EACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,iBAEF9B,QAAS,CAAC1F","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MigrationService {\n\n constructor() {\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 {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss']\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: []\n };\n public selectedId = {\n source: null,\n target: null\n };\n public loaded = {\n source: false,\n target: false\n };\n public fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(private processService: ProcessService, private logger: NGXLogger, private alertService: AlertService) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService.getProcessDefinitionVersions(key).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode =>\n !targetFlowNodeMap.some(targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type));\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe((res) => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n }, err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class MigrationRoutingModule {\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, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss']\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {\n }\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, (err) => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\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 {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule\n ],\n exports: [MigrationComponent]\n})\nexport class MigrationModule {\n}\n"]}
1
+ {"version":3,"sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts"],"names":["Injectable","args","providedIn","MigrationComponent","processService","logger","alertService","this","processDefinitions","selectedVersions","source","target","selectedId","loaded","fields","definition","version","processCount","uniqueFlowNodeMap","taskMapping","diagram","prototype","ngOnInit","loadProcessDefinitions","ngAfterViewInit","sourceDiagram","targetDiagram","Object","defineProperty","keys","length","_this","getProcessDefinitions","subscribe","loadProcessDefinitionVersions","key","type","clearProcess","getProcessDefinitionVersions","processDefinitionVersions","loadProcess","id","loadProcessDefinitionXML","loadProcessCount","clear","getProcessDefinitionXml","xml","loadXml","getProcessCount","response","count","setUniqueFlowNodeMap","sourceFlowNodeMap","flowNodeMap","targetFlowNodeMap","filter","sourceFlowNode","some","targetFlowNode","$type","getFilteredTargetFlowNodeMap","flowNodeType","flowNode","diagramLoaded","diagramName","migrateProcess","res","success","err","error","debug","Component","selector","template","ProcessService","NGXLogger","AlertService","ViewChild","title","roles","ROLE_ADMIN","routes","path","component","canActivate","AuthGuardService","data","NgModule","imports","CommonModule","RouterModule","forChild","exports","MigrationProcessDiagramComponent","EventEmitter","bpmnJS","BpmnJS","on","_a","get","zoom","ngOnDestroy","destroy","attachTo","el","nativeElement","importXML","processElements","getDefinitions","rootElements","element","isExecutable","flowElements","name","emit","Input","Output","declarations","MigrationRoutingModule","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":"68BAsBE,4HAJDA,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kEC0CZ,SAAAC,EACUC,EACAC,EACAC,GAFAC,KAAAH,eAAAA,EACAG,KAAAF,OAAAA,EACAE,KAAAD,aAAAA,EApCHC,KAAAC,mBAA0C,GAC1CD,KAAAE,iBAAmB,CACxBC,OAAQ,GACRC,OAAQ,IAEHJ,KAAAK,WAAa,CAClBF,OAAQ,KACRC,OAAQ,MAEHJ,KAAAM,OAAS,CACdH,QAAQ,EACRC,QAAQ,GAEHJ,KAAAO,OAAS,CACdJ,OAAQ,CACNK,WAAY,KACZC,QAAS,MAEXL,OAAQ,CACNI,WAAY,KACZC,QAAS,OAINT,KAAAU,a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AAQnD,SAEjB5B,EAAKlB,OAAOqG,KAAKnF,EAAKkF,mCAhD3B1C,EAAAA,UAAStE,KAAA,CAAC,CACTuE,SAAU,oCACVC,SAAA,08CAJME,EAAAA,yCAWLE,EAAAA,UAAS5E,KAAA,CAAC,qBACVkH,EAAAA,sBACAC,EAAAA,gBCJH,iCAZC7B,EAAAA,SAAQtF,KAAA,CAAC,CACRoH,aAAc,CAAClH,EAAoB0F,GACnCL,QAAS,CACPC,EAAAA,aACA6B,EACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,iBAEF9B,QAAS,CAACzF","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MigrationService {\n constructor() {}\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 {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: [],\n };\n public selectedId = {\n source: null,\n target: null,\n };\n public loaded = {\n source: false,\n target: false,\n };\n public fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(\n private processService: ProcessService,\n private logger: NGXLogger,\n private alertService: AlertService\n ) {}\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService\n .getProcessDefinitionVersions(key)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(\n sourceFlowNode =>\n !targetFlowNodeMap.some(\n targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id &&\n sourceFlowNode.$type === targetFlowNode.$type\n )\n );\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService\n .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)\n .subscribe(\n res => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n },\n err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MigrationRoutingModule {}\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 {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss'],\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {}\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, err => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\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 {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n ],\n exports: [MigrationComponent],\n})\nexport class MigrationModule {}\n"]}
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
16
+ import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
17
17
  import * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
18
18
  import { NGXLogger } from 'ngx-logger';
19
19
  export class MigrationProcessDiagramComponent {
@@ -41,7 +41,7 @@ export class MigrationProcessDiagramComponent {
41
41
  }
42
42
  loadXml(xml) {
43
43
  this.bpmnJS.attachTo(this.el.nativeElement);
44
- this.bpmnJS.importXML(xml, (err) => {
44
+ this.bpmnJS.importXML(xml, err => {
45
45
  this.logger.debug(err);
46
46
  const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
47
47
  return element.isExecutable;
@@ -71,4 +71,4 @@ MigrationProcessDiagramComponent.propDecorators = {
71
71
  name: [{ type: Input }],
72
72
  loaded: [{ type: Output }]
73
73
  };
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLXByb2Nlc3MtZGlhZ3JhbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL21pZ3JhdGlvbi9zcmMvbGliL21pZ3JhdGlvbi1wcm9jZXNzLWRpYWdyYW0vbWlncmF0aW9uLXByb2Nlc3MtZGlhZ3JhbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFxQixNQUFNLEVBQUUsU0FBUyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRS9HLE9BQU8sS0FBSyxNQUFNLE1BQU0sc0RBQXNELENBQUM7QUF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GVtZW50cy5maWx0ZXIoZnVuY3Rpb24gKGVsZW1lbnQpIHtcbiAgICAgICAgaWYgKGVsZW1lbnQubmFtZSA9PT0gbnVsbCB8fCBlbGVtZW50Lm5hbWUgPT09ICcnKSB7XG4gICAgICAgICAgZWxlbWVudC5uYW1lID0gZWxlbWVudC5pZDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZWxlbWVudC4kdHlwZSAhPT0gJ2JwbW46U2VxdWVuY2VGbG93JztcbiAgICAgIH0pO1xuICAgICAgdGhpcy5sb2FkZWQuZW1pdCh0aGlzLm5hbWUpO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
@@ -18,7 +18,7 @@ import { RouterModule } from '@angular/router';
18
18
  import { CommonModule } from '@angular/common';
19
19
  import { AuthGuardService } from '@valtimo/security';
20
20
  import { MigrationComponent } from './migration.component';
21
- import { ROLE_ADMIN } from '@valtimo/contract';
21
+ import { ROLE_ADMIN } from '@valtimo/config';
22
22
  const ɵ0 = { title: 'Process migration', roles: [ROLE_ADMIN] };
23
23
  const routes = [
24
24
  {
@@ -32,12 +32,9 @@ export class MigrationRoutingModule {
32
32
  }
33
33
  MigrationRoutingModule.decorators = [
34
34
  { type: NgModule, args: [{
35
- imports: [
36
- CommonModule,
37
- RouterModule.forChild(routes),
38
- ],
39
- exports: [RouterModule]
35
+ imports: [CommonModule, RouterModule.forChild(routes)],
36
+ exports: [RouterModule],
40
37
  },] }
41
38
  ];
42
39
  export { ɵ0 };
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLXJvdXRpbmcubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9taWdyYXRpb24vc3JjL2xpYi9taWdyYXRpb24tcm91dGluZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7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