@valtimo/migration 4.23.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/esm2020/lib/migration-process-diagram/migration-process-diagram.component.mjs +73 -0
  2. package/esm2020/lib/migration-routing.module.mjs +44 -0
  3. package/esm2020/lib/migration.component.mjs +175 -0
  4. package/esm2020/lib/migration.module.mjs +57 -0
  5. package/esm2020/lib/migration.service.mjs +29 -0
  6. package/esm2020/public-api.mjs +22 -0
  7. package/esm2020/valtimo-migration.mjs +5 -0
  8. package/fesm2015/valtimo-migration.mjs +386 -0
  9. package/fesm2015/valtimo-migration.mjs.map +1 -0
  10. package/fesm2020/valtimo-migration.mjs +386 -0
  11. package/fesm2020/valtimo-migration.mjs.map +1 -0
  12. package/lib/migration-process-diagram/migration-process-diagram.component.d.ts +4 -0
  13. package/lib/migration-process-diagram/migration-process-diagram.component.d.ts.map +1 -0
  14. package/lib/migration-routing.module.d.ts +7 -0
  15. package/lib/migration-routing.module.d.ts.map +1 -0
  16. package/lib/migration.component.d.ts +4 -0
  17. package/lib/migration.component.d.ts.map +1 -0
  18. package/lib/migration.module.d.ts +12 -0
  19. package/lib/migration.module.d.ts.map +1 -0
  20. package/lib/migration.service.d.ts +4 -0
  21. package/lib/migration.service.d.ts.map +1 -0
  22. package/package.json +22 -10
  23. package/public-api.d.ts +1 -0
  24. package/public-api.d.ts.map +1 -0
  25. package/valtimo-migration.d.ts +2 -2
  26. package/valtimo-migration.d.ts.map +1 -0
  27. package/bundles/valtimo-migration.umd.js +0 -390
  28. package/bundles/valtimo-migration.umd.js.map +0 -1
  29. package/bundles/valtimo-migration.umd.min.js +0 -2
  30. package/bundles/valtimo-migration.umd.min.js.map +0 -1
  31. package/esm2015/lib/migration-process-diagram/migration-process-diagram.component.js +0 -74
  32. package/esm2015/lib/migration-routing.module.js +0 -40
  33. package/esm2015/lib/migration.component.js +0 -175
  34. package/esm2015/lib/migration.module.js +0 -40
  35. package/esm2015/lib/migration.service.js +0 -28
  36. package/esm2015/public-api.js +0 -22
  37. package/esm2015/valtimo-migration.js +0 -7
  38. package/fesm2015/valtimo-migration.js +0 -366
  39. package/fesm2015/valtimo-migration.js.map +0 -1
  40. package/valtimo-migration.metadata.json +0 -1
@@ -1,366 +0,0 @@
1
- import { ɵɵdefineInjectable, Injectable, EventEmitter, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
2
- import { ProcessService } from '@valtimo/process';
3
- import * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
4
- import { NGXLogger } from 'ngx-logger';
5
- import { AlertService, WidgetModule } from '@valtimo/components';
6
- import { RouterModule } from '@angular/router';
7
- import { CommonModule } from '@angular/common';
8
- import { AuthGuardService } from '@valtimo/security';
9
- import { ROLE_ADMIN } from '@valtimo/config';
10
- import { ReactiveFormsModule, FormsModule } from '@angular/forms';
11
- import { TranslateModule } from '@ngx-translate/core';
12
-
13
- /*
14
- * Copyright 2015-2020 Ritense BV, the Netherlands.
15
- *
16
- * Licensed under EUPL, Version 1.2 (the "License");
17
- * you may not use this file except in compliance with the License.
18
- * You may obtain a copy of the License at
19
- *
20
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
21
- *
22
- * Unless required by applicable law or agreed to in writing, software
23
- * distributed under the License is distributed on an "AS IS" basis,
24
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
- * See the License for the specific language governing permissions and
26
- * limitations under the License.
27
- */
28
- class MigrationService {
29
- constructor() { }
30
- }
31
- MigrationService.ɵprov = ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
32
- MigrationService.decorators = [
33
- { type: Injectable, args: [{
34
- providedIn: 'root',
35
- },] }
36
- ];
37
- MigrationService.ctorParameters = () => [];
38
-
39
- /*
40
- * Copyright 2015-2020 Ritense BV, the Netherlands.
41
- *
42
- * Licensed under EUPL, Version 1.2 (the "License");
43
- * you may not use this file except in compliance with the License.
44
- * You may obtain a copy of the License at
45
- *
46
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
47
- *
48
- * Unless required by applicable law or agreed to in writing, software
49
- * distributed under the License is distributed on an "AS IS" basis,
50
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
- * See the License for the specific language governing permissions and
52
- * limitations under the License.
53
- */
54
- class MigrationProcessDiagramComponent {
55
- constructor(logger) {
56
- this.logger = logger;
57
- this.flowNodeMap = null;
58
- this.loaded = new EventEmitter();
59
- }
60
- ngOnInit() {
61
- this.bpmnJS = new BpmnJS();
62
- this.bpmnJS.on('import.done', ({ error }) => {
63
- if (!error) {
64
- const canvas = this.bpmnJS.get('canvas');
65
- canvas.zoom('fit-viewport', 'auto');
66
- }
67
- });
68
- }
69
- ngOnDestroy() {
70
- if (this.bpmnJS) {
71
- this.bpmnJS.destroy();
72
- }
73
- }
74
- clear() {
75
- this.bpmnJS.clear();
76
- }
77
- loadXml(xml) {
78
- this.bpmnJS.attachTo(this.el.nativeElement);
79
- this.bpmnJS.importXML(xml, err => {
80
- this.logger.debug(err);
81
- const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
82
- return element.isExecutable;
83
- });
84
- this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
85
- if (element.name === null || element.name === '') {
86
- element.name = element.id;
87
- }
88
- return element.$type !== 'bpmn:SequenceFlow';
89
- });
90
- this.loaded.emit(this.name);
91
- });
92
- }
93
- }
94
- MigrationProcessDiagramComponent.decorators = [
95
- { type: Component, args: [{
96
- selector: 'valtimo-migration-process-diagram',
97
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #ref class=\"diagram-container\"></div>\n",
98
- 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}"]
99
- },] }
100
- ];
101
- MigrationProcessDiagramComponent.ctorParameters = () => [
102
- { type: NGXLogger }
103
- ];
104
- MigrationProcessDiagramComponent.propDecorators = {
105
- el: [{ type: ViewChild, args: ['ref',] }],
106
- name: [{ type: Input }],
107
- loaded: [{ type: Output }]
108
- };
109
-
110
- /*
111
- * Copyright 2015-2020 Ritense BV, the Netherlands.
112
- *
113
- * Licensed under EUPL, Version 1.2 (the "License");
114
- * you may not use this file except in compliance with the License.
115
- * You may obtain a copy of the License at
116
- *
117
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
118
- *
119
- * Unless required by applicable law or agreed to in writing, software
120
- * distributed under the License is distributed on an "AS IS" basis,
121
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
- * See the License for the specific language governing permissions and
123
- * limitations under the License.
124
- */
125
- class MigrationComponent {
126
- constructor(processService, logger, alertService) {
127
- this.processService = processService;
128
- this.logger = logger;
129
- this.alertService = alertService;
130
- this.processDefinitions = [];
131
- this.selectedVersions = {
132
- source: [],
133
- target: [],
134
- };
135
- this.selectedId = {
136
- source: null,
137
- target: null,
138
- };
139
- this.loaded = {
140
- source: false,
141
- target: false,
142
- };
143
- this.fields = {
144
- source: {
145
- definition: null,
146
- version: null,
147
- },
148
- target: {
149
- definition: null,
150
- version: null,
151
- },
152
- };
153
- this.processCount = null;
154
- this.uniqueFlowNodeMap = [];
155
- this.taskMapping = {};
156
- this.diagram = null;
157
- }
158
- ngOnInit() {
159
- this.loadProcessDefinitions();
160
- }
161
- ngAfterViewInit() {
162
- this.diagram = {
163
- source: this.sourceDiagram,
164
- target: this.targetDiagram,
165
- };
166
- }
167
- get taskMappingLength() {
168
- return Object.keys(this.taskMapping).length;
169
- }
170
- loadProcessDefinitions() {
171
- this.processService
172
- .getProcessDefinitions()
173
- .subscribe((processDefinitions) => {
174
- this.processDefinitions = processDefinitions;
175
- });
176
- }
177
- loadProcessDefinitionVersions(key, type) {
178
- this.fields[type].definition = key;
179
- this.selectedVersions[type] = [];
180
- this.clearProcess(type);
181
- if (key) {
182
- this.processService
183
- .getProcessDefinitionVersions(key)
184
- .subscribe((processDefinitionVersions) => {
185
- this.selectedVersions[type] = processDefinitionVersions;
186
- });
187
- }
188
- }
189
- loadProcess(id, type) {
190
- this.fields[type].version = id;
191
- this.clearProcess(type);
192
- if (id) {
193
- this.loadProcessDefinitionXML(id, type);
194
- if (type === 'source') {
195
- this.loadProcessCount(id);
196
- }
197
- }
198
- }
199
- clearProcess(type) {
200
- this.loaded[type] = false;
201
- this.selectedId[type] = null;
202
- this.diagram[type].clear();
203
- if (type === 'source') {
204
- this.processCount = null;
205
- }
206
- }
207
- loadProcessDefinitionXML(id, type) {
208
- this.processService.getProcessDefinitionXml(id).subscribe(xml => {
209
- this.diagram[type].loadXml(xml['bpmn20Xml']);
210
- this.selectedId[type] = id;
211
- });
212
- }
213
- loadProcessCount(id) {
214
- this.processService.getProcessCount(id).subscribe(response => {
215
- this.processCount = response.count;
216
- });
217
- }
218
- setUniqueFlowNodeMap() {
219
- this.uniqueFlowNodeMap = [];
220
- const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
221
- const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
222
- if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
223
- this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
224
- sourceFlowNode.$type === targetFlowNode.$type));
225
- }
226
- }
227
- getFilteredTargetFlowNodeMap(flowNodeType) {
228
- const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
229
- return targetFlowNodeMap.filter(function (flowNode) {
230
- return flowNode.$type === flowNodeType;
231
- });
232
- }
233
- diagramLoaded(diagramName) {
234
- this.loaded[diagramName] = true;
235
- if (this.loaded.source && this.loaded.target) {
236
- this.taskMapping = {};
237
- this.setUniqueFlowNodeMap();
238
- }
239
- }
240
- migrateProcess() {
241
- this.processService
242
- .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
243
- .subscribe(res => {
244
- this.alertService.success('Process successfully migrated!');
245
- this.clearProcess('source');
246
- this.clearProcess('target');
247
- this.fields = {
248
- source: {
249
- definition: null,
250
- version: null,
251
- },
252
- target: {
253
- definition: null,
254
- version: null,
255
- },
256
- };
257
- }, err => {
258
- this.alertService.error('Process migration failed!');
259
- this.logger.debug(err);
260
- });
261
- }
262
- }
263
- MigrationComponent.decorators = [
264
- { type: Component, args: [{
265
- selector: 'valtimo-migration',
266
- 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",
267
- 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 */"]
268
- },] }
269
- ];
270
- MigrationComponent.ctorParameters = () => [
271
- { type: ProcessService },
272
- { type: NGXLogger },
273
- { type: AlertService }
274
- ];
275
- MigrationComponent.propDecorators = {
276
- sourceDiagram: [{ type: ViewChild, args: ['sourceDiagram',] }],
277
- targetDiagram: [{ type: ViewChild, args: ['targetDiagram',] }]
278
- };
279
-
280
- /*
281
- * Copyright 2015-2020 Ritense BV, the Netherlands.
282
- *
283
- * Licensed under EUPL, Version 1.2 (the "License");
284
- * you may not use this file except in compliance with the License.
285
- * You may obtain a copy of the License at
286
- *
287
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
288
- *
289
- * Unless required by applicable law or agreed to in writing, software
290
- * distributed under the License is distributed on an "AS IS" basis,
291
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
292
- * See the License for the specific language governing permissions and
293
- * limitations under the License.
294
- */
295
- const ɵ0 = { title: 'Process migration', roles: [ROLE_ADMIN] };
296
- const routes = [
297
- {
298
- path: 'process-migration',
299
- component: MigrationComponent,
300
- canActivate: [AuthGuardService],
301
- data: ɵ0,
302
- },
303
- ];
304
- class MigrationRoutingModule {
305
- }
306
- MigrationRoutingModule.decorators = [
307
- { type: NgModule, args: [{
308
- imports: [CommonModule, RouterModule.forChild(routes)],
309
- exports: [RouterModule],
310
- },] }
311
- ];
312
-
313
- /*
314
- * Copyright 2015-2020 Ritense BV, the Netherlands.
315
- *
316
- * Licensed under EUPL, Version 1.2 (the "License");
317
- * you may not use this file except in compliance with the License.
318
- * You may obtain a copy of the License at
319
- *
320
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
321
- *
322
- * Unless required by applicable law or agreed to in writing, software
323
- * distributed under the License is distributed on an "AS IS" basis,
324
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
325
- * See the License for the specific language governing permissions and
326
- * limitations under the License.
327
- */
328
- class MigrationModule {
329
- }
330
- MigrationModule.decorators = [
331
- { type: NgModule, args: [{
332
- declarations: [MigrationComponent, MigrationProcessDiagramComponent],
333
- imports: [
334
- CommonModule,
335
- MigrationRoutingModule,
336
- ReactiveFormsModule,
337
- WidgetModule,
338
- FormsModule,
339
- TranslateModule,
340
- ],
341
- exports: [MigrationComponent],
342
- },] }
343
- ];
344
-
345
- /*
346
- * Copyright 2015-2020 Ritense BV, the Netherlands.
347
- *
348
- * Licensed under EUPL, Version 1.2 (the "License");
349
- * you may not use this file except in compliance with the License.
350
- * You may obtain a copy of the License at
351
- *
352
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
353
- *
354
- * Unless required by applicable law or agreed to in writing, software
355
- * distributed under the License is distributed on an "AS IS" basis,
356
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
357
- * See the License for the specific language governing permissions and
358
- * limitations under the License.
359
- */
360
-
361
- /**
362
- * Generated bundle index. Do not edit.
363
- */
364
-
365
- export { MigrationComponent, MigrationModule, MigrationService, MigrationProcessDiagramComponent as ɵa, MigrationRoutingModule as ɵb };
366
- //# sourceMappingURL=valtimo-migration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"valtimo-migration.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.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 {\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 {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 {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":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAqBa,gBAAgB;IAC3B,iBAAgB;;;;YAJjB,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;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;YAEd,SAAS;YACT,YAAY;;;4BAoCjB,SAAS,SAAC,eAAe;4BACzB,SAAS,SAAC,eAAe;;;ACzD5B;;;;;;;;;;;;;;;WA4BU,EAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,EAAC;AAL3D,MAAM,MAAM,GAAW;IACrB;QACE,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,kBAAkB;QAC7B,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,IAAI,IAAmD;KACxD;CACF,CAAC;MAMW,sBAAsB;;;YAJlC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;ACnCD;;;;;;;;;;;;;;;MAqCa,eAAe;;;YAZ3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;gBACpE,OAAO,EAAE;oBACP,YAAY;oBACZ,sBAAsB;oBACtB,mBAAmB;oBACnB,YAAY;oBACZ,WAAW;oBACX,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;ACpCD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MigrationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ɵprov":{}}},"MigrationComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"valtimo-migration","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","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]}]}],"members":{"sourceDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":56,"character":3},"arguments":["sourceDiagram"]}]}],"targetDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":57,"character":3},"arguments":["targetDiagram"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/process","name":"ProcessService","line":62,"character":28},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":63,"character":20},{"__symbolic":"reference","module":"@valtimo/components","name":"AlertService","line":64,"character":26}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"loadProcessDefinitions":[{"__symbolic":"method"}],"loadProcessDefinitionVersions":[{"__symbolic":"method"}],"loadProcess":[{"__symbolic":"method"}],"clearProcess":[{"__symbolic":"method"}],"loadProcessDefinitionXML":[{"__symbolic":"method"}],"loadProcessCount":[{"__symbolic":"method"}],"setUniqueFlowNodeMap":[{"__symbolic":"method"}],"getFilteredTargetFlowNodeMap":[{"__symbolic":"method"}],"diagramLoaded":[{"__symbolic":"method"}],"migrateProcess":[{"__symbolic":"method"}]}},"MigrationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":25,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MigrationComponent"},{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":28,"character":4},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":30,"character":4},{"__symbolic":"reference","module":"@valtimo/components","name":"WidgetModule","line":31,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":32,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":33,"character":4}],"exports":[{"__symbolic":"reference","name":"MigrationComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":30,"character":1},"arguments":[{"selector":"valtimo-migration-process-diagram","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #ref class=\"diagram-container\"></div>\n","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}"]}]}],"members":{"el":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":39,"character":3},"arguments":["ref"]}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":43,"character":30}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"loadXml":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":33,"character":12},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":33,"character":26},"member":"forChild"},"arguments":[[{"path":"process-migration","component":{"__symbolic":"reference","name":"MigrationComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":27,"character":18}],"data":{"title":"Process migration","roles":[{"__symbolic":"reference","module":"@valtimo/config","name":"ROLE_ADMIN","line":28,"character":47}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":34,"character":12}]}]}],"members":{}}},"origins":{"MigrationService":"./lib/migration.service","MigrationComponent":"./lib/migration.component","MigrationModule":"./lib/migration.module","ɵa":"./lib/migration-process-diagram/migration-process-diagram.component","ɵb":"./lib/migration-routing.module"},"importAs":"@valtimo/migration"}