@valtimo/process 4.21.0 → 5.0.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 (39) hide show
  1. package/esm2020/lib/models/index.mjs +19 -0
  2. package/esm2020/lib/models/process.model.mjs +17 -0
  3. package/esm2020/lib/process-diagram/process-diagram.component.mjs +259 -0
  4. package/esm2020/lib/process.module.mjs +67 -0
  5. package/esm2020/lib/process.service.mjs +122 -0
  6. package/esm2020/public_api.mjs +23 -0
  7. package/esm2020/valtimo-process.mjs +5 -0
  8. package/fesm2015/valtimo-process.mjs +483 -0
  9. package/fesm2015/valtimo-process.mjs.map +1 -0
  10. package/{fesm2015/valtimo-process.js → fesm2020/valtimo-process.mjs} +83 -58
  11. package/fesm2020/valtimo-process.mjs.map +1 -0
  12. package/lib/models/index.d.ts +1 -0
  13. package/lib/models/index.d.ts.map +1 -0
  14. package/lib/models/process.model.d.ts +1 -0
  15. package/lib/models/process.model.d.ts.map +1 -0
  16. package/lib/process-diagram/process-diagram.component.d.ts +4 -0
  17. package/lib/process-diagram/process-diagram.component.d.ts.map +1 -0
  18. package/lib/process.module.d.ts +10 -0
  19. package/lib/process.module.d.ts.map +1 -0
  20. package/lib/process.service.d.ts +4 -0
  21. package/lib/process.service.d.ts.map +1 -0
  22. package/package.json +23 -11
  23. package/public_api.d.ts +1 -0
  24. package/public_api.d.ts.map +1 -0
  25. package/valtimo-process.d.ts +2 -0
  26. package/valtimo-process.d.ts.map +1 -0
  27. package/bundles/valtimo-process.umd.js +0 -491
  28. package/bundles/valtimo-process.umd.js.map +0 -1
  29. package/bundles/valtimo-process.umd.min.js +0 -2
  30. package/bundles/valtimo-process.umd.min.js.map +0 -1
  31. package/esm2015/lib/models/index.js +0 -19
  32. package/esm2015/lib/models/process.model.js +0 -16
  33. package/esm2015/lib/process-diagram/process-diagram.component.js +0 -256
  34. package/esm2015/lib/process.module.js +0 -43
  35. package/esm2015/lib/process.service.js +0 -125
  36. package/esm2015/public_api.js +0 -23
  37. package/esm2015/valtimo-process.js +0 -5
  38. package/fesm2015/valtimo-process.js.map +0 -1
  39. package/valtimo-process.metadata.json +0 -1
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public_api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1wcm9jZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9wcm9jZXNzL3NyYy92YWx0aW1vLXByb2Nlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
@@ -0,0 +1,483 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, ViewEncapsulation, ViewChild, Output, Input, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpParams } from '@angular/common/http';
5
+ import * as i2 from '@valtimo/config';
6
+ import * as i2$1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import { ListModule, WidgetModule, TimelineModule, BpmnJsDiagramModule, CamundaFormModule } from '@valtimo/components';
9
+ import * as i1$1 from 'ngx-toastr';
10
+ import { ToastrModule } from 'ngx-toastr';
11
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
12
+ import BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
13
+ import heatmap from 'heatmap.js-fixed/build/heatmap.js';
14
+
15
+ /*
16
+ *
17
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
18
+ * *
19
+ * * Licensed under EUPL, Version 1.2 (the "License");
20
+ * * you may not use this file except in compliance with the License.
21
+ * * You may obtain a copy of the License at
22
+ * *
23
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
24
+ * *
25
+ * * Unless required by applicable law or agreed to in writing, software
26
+ * * distributed under the License is distributed on an "AS IS" basis,
27
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
+ * * See the License for the specific language governing permissions and
29
+ * * limitations under the License.
30
+ *
31
+ */
32
+
33
+ /*
34
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
35
+ *
36
+ * Licensed under EUPL, Version 1.2 (the "License");
37
+ * you may not use this file except in compliance with the License.
38
+ * You may obtain a copy of the License at
39
+ *
40
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
41
+ *
42
+ * Unless required by applicable law or agreed to in writing, software
43
+ * distributed under the License is distributed on an "AS IS" basis,
44
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
+ * See the License for the specific language governing permissions and
46
+ * limitations under the License.
47
+ */
48
+ class ProcessService {
49
+ constructor(http, configService) {
50
+ this.http = http;
51
+ this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
52
+ }
53
+ getProcessDefinitions() {
54
+ return this.http.get(`${this.valtimoEndpointUri}process/definition`);
55
+ }
56
+ getProcessDefinitionVersions(key) {
57
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${key}/versions`);
58
+ }
59
+ getProcessDefinition(key) {
60
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${key}`);
61
+ }
62
+ getProcessDefinitionStartFormData(processDefinitionKey) {
63
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${processDefinitionKey}/start-form`);
64
+ }
65
+ startProcesInstance(key, businessKey, variables) {
66
+ return this.http.post(`${this.valtimoEndpointUri}process/definition/${key}/${businessKey}/start`, variables);
67
+ }
68
+ getProcessDefinitionXml(processDefinitionId) {
69
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${processDefinitionId}/xml`);
70
+ }
71
+ getProcessXml(id) {
72
+ return this.http.get(`${this.valtimoEndpointUri}process/${id}/xml`);
73
+ }
74
+ getProcessCount(id) {
75
+ return this.http.post(`${this.valtimoEndpointUri}v2/process/definition/${id}/count`, {
76
+ key: id,
77
+ processVariables: [{ '@type': 'boolean', name: 'active', value: true }],
78
+ });
79
+ }
80
+ getProcessHeatmapCount(processDefinition) {
81
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${processDefinition.key}/heatmap/count?version=${processDefinition.version}`);
82
+ }
83
+ getProcessHeatmapDuration(processDefinition) {
84
+ return this.http.get(`${this.valtimoEndpointUri}process/definition/${processDefinition.key}/heatmap/duration?version=${processDefinition.version}`);
85
+ }
86
+ getProcessInstances(key, page, size, sort) {
87
+ const params = new HttpParams()
88
+ .set('page', page.toString())
89
+ .set('size', size.toString())
90
+ .set('sort', sort);
91
+ return this.http.post(`${this.valtimoEndpointUri}v2/process/${key}/search`, {}, { params });
92
+ }
93
+ getProcessInstance(processInstanceId) {
94
+ return this.http.get(`${this.valtimoEndpointUri}process/${processInstanceId}`, {});
95
+ }
96
+ getProcessInstanceTasks(id) {
97
+ return this.http.get(`${this.valtimoEndpointUri}process/${id}/tasks`, {});
98
+ }
99
+ getProcessInstanceVariables(id, variableNames) {
100
+ return this.http.post(`${this.valtimoEndpointUri}process-instance/${id}/variables`, variableNames);
101
+ }
102
+ addProcessInstancesDefaultVariablesValues(processInstances) {
103
+ processInstances.forEach(processInstance => this.addDefaultVariablesValues(processInstance));
104
+ return processInstances;
105
+ }
106
+ addDefaultVariablesValues(processInstance) {
107
+ if (!processInstance['startUser']) {
108
+ processInstance.startUser = processInstance.startUserId;
109
+ }
110
+ if (!processInstance['processStarted']) {
111
+ processInstance.processStarted = processInstance.startTime;
112
+ }
113
+ if (!processInstance['processEnded']) {
114
+ processInstance.processEnded = processInstance.endTime;
115
+ }
116
+ if (!processInstance['active']) {
117
+ processInstance.active = processInstance.endTime == null;
118
+ }
119
+ return processInstance;
120
+ }
121
+ getInstancesStatistics(fromDate, toDate, processFilter) {
122
+ const params = new HttpParams();
123
+ params.set('fromDate', fromDate);
124
+ params.set('toDate', toDate);
125
+ params.set('processFilter', processFilter);
126
+ return this.http.get(`${this.valtimoEndpointUri}reporting/instancesstatistics`, {
127
+ params,
128
+ });
129
+ }
130
+ deployProcess(processXml) {
131
+ const formData = new FormData();
132
+ formData.append('file', new File([processXml], 'process.bpmn'));
133
+ formData.append('deployment-name', 'valtimoConsoleApp');
134
+ formData.append('deployment-source', 'process application');
135
+ return this.http.post(`${this.valtimoEndpointUri}camunda-rest/engine/default/deployment/create`, formData);
136
+ }
137
+ migrateProcess(processDefinition1Id, processDefinition2Id, params) {
138
+ return this.http.post(`${this.valtimoEndpointUri}process/definition/${processDefinition1Id}/${processDefinition2Id}/migrate`, params);
139
+ }
140
+ }
141
+ ProcessService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
142
+ ProcessService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessService, providedIn: 'root' });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessService, decorators: [{
144
+ type: Injectable,
145
+ args: [{
146
+ providedIn: 'root',
147
+ }]
148
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
149
+
150
+ /*
151
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
152
+ *
153
+ * Licensed under EUPL, Version 1.2 (the "License");
154
+ * you may not use this file except in compliance with the License.
155
+ * You may obtain a copy of the License at
156
+ *
157
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
158
+ *
159
+ * Unless required by applicable law or agreed to in writing, software
160
+ * distributed under the License is distributed on an "AS IS" basis,
161
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
162
+ * See the License for the specific language governing permissions and
163
+ * limitations under the License.
164
+ */
165
+ class ProcessDiagramComponent {
166
+ constructor(processService) {
167
+ this.processService = processService;
168
+ this.importDone = new EventEmitter();
169
+ this.enumHeatmapOptions = ['count', 'duration'];
170
+ }
171
+ ngOnInit() {
172
+ if (this.processDefinitionKey) {
173
+ this.loadProcessDefinitionFromKey(this.processDefinitionKey);
174
+ }
175
+ if (this.processInstanceId) {
176
+ this.loadProcessInstanceXml(this.processInstanceId);
177
+ }
178
+ this.bpmnJS = new BpmnJS();
179
+ this.bpmnJS.on('import.done', ({ error }) => {
180
+ if (!error) {
181
+ const canvas = this.bpmnJS.get('canvas');
182
+ const eventBus = this.bpmnJS.get('eventBus');
183
+ if (this.processDiagram.historicActivityInstances) {
184
+ this.processDiagram.historicActivityInstances.forEach(instance => {
185
+ // exclude multiInstanceBody
186
+ if (instance.activityType !== 'multiInstanceBody') {
187
+ canvas.addMarker(instance.activityId, instance.endTime ? 'highlight-overlay-past' : 'highlight-overlay-current');
188
+ }
189
+ });
190
+ }
191
+ canvas.zoom('fit-viewport', 'auto');
192
+ if (this.processDefinitionVersions) {
193
+ eventBus.on('canvas.init', () => {
194
+ if (this.showHeatmap) {
195
+ this.clearHeatmap();
196
+ }
197
+ this.loadHeatmapData();
198
+ });
199
+ eventBus.on('canvas.viewbox.changing', () => {
200
+ if (this.showHeatmap) {
201
+ this.clearHeatmap();
202
+ }
203
+ });
204
+ eventBus.on('canvas.viewbox.changed', () => {
205
+ this.loadHeatmapData();
206
+ });
207
+ }
208
+ }
209
+ });
210
+ }
211
+ ngOnChanges() {
212
+ if (this.processDefinitionKey) {
213
+ this.loadProcessDefinitionFromKey(this.processDefinitionKey);
214
+ }
215
+ else if (this.processInstanceId) {
216
+ this.loadProcessInstanceXml(this.processInstanceId);
217
+ }
218
+ }
219
+ ngOnDestroy() {
220
+ if (this.bpmnJS) {
221
+ this.bpmnJS.destroy();
222
+ }
223
+ }
224
+ loadProcessDefinition(processDefinitionKey) {
225
+ this.processService.getProcessDefinition(processDefinitionKey).subscribe(response => {
226
+ this.heatmapOption = this.enumHeatmapOptions[0];
227
+ this.version = response.version;
228
+ this.loadProcessDefinitionXml(response.id);
229
+ });
230
+ }
231
+ loadProcessDefinitionVersions(processDefinitionKey) {
232
+ this.processService.getProcessDefinitionVersions(processDefinitionKey).subscribe(response => {
233
+ this.processDefinitionVersions = response;
234
+ });
235
+ }
236
+ loadProcessDefinitionFromKey(processDefinitionKey) {
237
+ this.loadProcessDefinitionVersions(processDefinitionKey);
238
+ this.loadProcessDefinition(processDefinitionKey);
239
+ }
240
+ loadProcessDefinitionXml(processDefinitionId) {
241
+ this.processService.getProcessDefinitionXml(processDefinitionId).subscribe(response => {
242
+ this.processDiagram = response;
243
+ this.bpmnJS.importXML(this.processDiagram.bpmn20Xml);
244
+ this.bpmnJS.attachTo(this.el.nativeElement);
245
+ });
246
+ }
247
+ loadProcessInstanceXml(processInstanceId) {
248
+ this.processService.getProcessXml(processInstanceId).subscribe(response => {
249
+ this.processDiagram = response;
250
+ this.bpmnJS.importXML(this.processDiagram.bpmn20Xml);
251
+ this.bpmnJS.attachTo(this.el.nativeElement);
252
+ });
253
+ }
254
+ loadProcessDefinitionHeatmapCount(processDefinition) {
255
+ this.processService.getProcessHeatmapCount(processDefinition).subscribe(response => {
256
+ this.inputData = response;
257
+ this.valueKey = 'totalCount';
258
+ this.heatPoints = { data: [] };
259
+ this.min = 0;
260
+ this.max = 0;
261
+ Object.keys(this.inputData).forEach(key => {
262
+ const diagramContainer = this.el.nativeElement.querySelector('svg').getBoundingClientRect();
263
+ const diagramElm = this.el.nativeElement
264
+ .querySelector(`g[data-element-id=${key}]`)
265
+ .getBoundingClientRect();
266
+ this.setMax(key);
267
+ this.heatPoints.data.push({
268
+ x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),
269
+ y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),
270
+ value: this.inputData[key][this.valueKey],
271
+ radius: diagramElm.width / 2,
272
+ });
273
+ this.addCounterActiveOverlays(key, this.inputData);
274
+ });
275
+ this.clearHeatmap();
276
+ if (this.showHeatmap) {
277
+ this.loadHeatmap();
278
+ }
279
+ });
280
+ }
281
+ onWindowResize() {
282
+ const oldCanvas = this.el.nativeElement.querySelector('canvas[class=heatmap-canvas]');
283
+ if (oldCanvas) {
284
+ oldCanvas.remove();
285
+ this.heatMapInstance = null;
286
+ }
287
+ if (this.showHeatmap) {
288
+ this.loadHeatmap();
289
+ }
290
+ }
291
+ loadProcessDefinitionHeatmapDuration(processDefinition) {
292
+ this.processService.getProcessHeatmapDuration(processDefinition).subscribe(response => {
293
+ this.inputData = response;
294
+ this.valueKey = 'averageDurationInMilliseconds';
295
+ this.heatPoints = { data: [] };
296
+ this.min = 0;
297
+ this.max = 0;
298
+ Object.keys(this.inputData).forEach(key => {
299
+ const diagramContainer = this.el.nativeElement.querySelector('svg').getBoundingClientRect();
300
+ const diagramElm = this.el.nativeElement
301
+ .querySelector(`g[data-element-id=${key}]`)
302
+ .getBoundingClientRect();
303
+ this.setMax(key);
304
+ this.heatPoints.data.push({
305
+ x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),
306
+ y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),
307
+ value: this.inputData[key][this.valueKey],
308
+ radius: diagramElm.width / 2,
309
+ });
310
+ this.addCounterActiveOverlays(key, this.inputData);
311
+ });
312
+ this.clearHeatmap();
313
+ if (this.showHeatmap) {
314
+ this.loadHeatmap();
315
+ }
316
+ });
317
+ }
318
+ setProcessDefinitionKey(processDefinitionKey) {
319
+ this.processDefinitionKey = processDefinitionKey;
320
+ this.loadProcessDefinitionFromKey(this.processDefinitionKey);
321
+ }
322
+ setProcessDefinitionVersion(version) {
323
+ this.version = +version;
324
+ this.loadHeatmapData();
325
+ }
326
+ setHeatmapOption(heatmapOption) {
327
+ this.heatmapOption = heatmapOption;
328
+ this.loadHeatmapData();
329
+ }
330
+ toggleShowHeatmap() {
331
+ this.showHeatmap = !this.showHeatmap;
332
+ this.loadHeatmapData();
333
+ }
334
+ loadHeatmap() {
335
+ if (!this.heatMapInstance) {
336
+ this.heatMapInstance = heatmap.create({
337
+ radius: 54,
338
+ blur: 0.7,
339
+ maxOpacity: 0.4,
340
+ minOpacity: 0,
341
+ container: this.el.nativeElement,
342
+ });
343
+ }
344
+ this.heatMapInstance.setData({
345
+ min: this.min,
346
+ max: this.max,
347
+ data: this.heatPoints.data,
348
+ });
349
+ }
350
+ clearHeatmap() {
351
+ if (this.heatMapInstance) {
352
+ this.heatMapInstance.setData({ data: [] });
353
+ }
354
+ }
355
+ loadHeatmapData() {
356
+ this.processDefinition = this.processDefinitionVersions.find(definition => definition.version === this.version);
357
+ if (this.heatmapOption === 'count') {
358
+ this.loadProcessDefinitionHeatmapCount(this.processDefinition);
359
+ }
360
+ if (this.heatmapOption === 'duration') {
361
+ this.loadProcessDefinitionHeatmapDuration(this.processDefinition);
362
+ }
363
+ }
364
+ setMax(key) {
365
+ if (this.heatmapDuration) {
366
+ this.max = Math.max(this.heatmapDuration[key].averageDurationInMilliseconds, this.max);
367
+ }
368
+ else if (this.heatmapCount) {
369
+ this.max = Math.max(this.heatmapCount[key].totalCount + this.heatmapCount[key].count, this.max);
370
+ }
371
+ }
372
+ addCounterActiveOverlays(key, inputData) {
373
+ const overlays = this.bpmnJS.get('overlays');
374
+ overlays.add(key, {
375
+ position: {
376
+ bottom: 13,
377
+ left: -12,
378
+ },
379
+ show: {
380
+ minZoom: 0,
381
+ maxZoom: 5.0,
382
+ },
383
+ html: `<span class="badge badge-pill badge-primary">${inputData[key].count}</span>`,
384
+ });
385
+ }
386
+ }
387
+ ProcessDiagramComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessDiagramComponent, deps: [{ token: ProcessService }], target: i0.ɵɵFactoryTarget.Component });
388
+ ProcessDiagramComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ProcessDiagramComponent, selector: "valtimo-process-diagram", inputs: { processDefinitionKey: "processDefinitionKey", processInstanceId: "processInstanceId" }, outputs: { importDone: "importDone" }, viewQueries: [{ propertyName: "el", first: true, predicate: ["ref"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, 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<div class=\"process-diagram-container\">\n <div *ngIf=\"processDefinitionKey\" class=\"diagram-container-switch-holder\">\n <div class=\"container-fluid\">\n <div class=\"row p-4 bg-light\">\n <div class=\"col-4\">\n <label><strong>Version</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setProcessDefinitionVersion($event.target.value)\">\n <option\n *ngFor=\"let processDefinitionVersion of processDefinitionVersions\"\n [value]=\"processDefinitionVersion.version\"\n [selected]=\"processDefinitionVersion.version === version\"\n >\n {{ processDefinitionVersion.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label><strong>Heatmap type</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setHeatmapOption($event.target.value)\">\n <option\n *ngFor=\"let option of enumHeatmapOptions\"\n [value]=\"option\"\n [selected]=\"option === heatmapOption\"\n >\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-4 text-right\">\n <label><strong>Show heatmap</strong></label\n ><br />\n <div class=\"text-left switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n id=\"toggleHeatmap\"\n [checked]=\"showHeatmap\"\n (click)=\"toggleShowHeatmap()\"\n /><span> <label for=\"toggleHeatmap\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div #ref (window:resize)=\"onWindowResize()\" class=\"diagram-container\"></div>\n\n <div *ngIf=\"processInstanceId\" class=\"p-4 text-center legenda-holder\">\n <span\n ><div class=\"legenda highlight-overlay-past\"></div>\n Executed tasks</span\n >\n <span class=\"ml-3\"\n ><div class=\"legenda highlight-overlay-current\"></div>\n Current tasks</span\n >\n </div>\n\n <div *ngIf=\"processDefinitionKey\" class=\"p-4 text-center legenda-holder\">\n <span\n ><span class=\"badge badge-pill badge-primary\">N</span>&nbsp;&nbsp;Amount of currently active\n instances of this task.</span\n >\n <span\n >&nbsp;&nbsp;|&nbsp;&nbsp;Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n </div>\n</div>\n", styles: [".process-diagram-container .diagram-container{height:50vh;width:100%}.process-diagram-container .diagram-container-switch-holder{position:absolute;width:100%;z-index:1000}.process-diagram-container .highlight-overlay-past:not(.djs-connection) .djs-visual>:nth-child(1){fill:#d8d8d8!important}.process-diagram-container .highlight-overlay-current:not(.djs-connection) .djs-visual>:nth-child(1){fill:#b2e0ff!important}.process-diagram-container .legenda-holder{font-size:1em}.process-diagram-container .legenda{border:2px solid black;border-radius:3px;padding:7px;display:inline-block;margin-bottom:-4px;margin-right:5px}.process-diagram-container .legenda.highlight-overlay-past{background-color:#d8d8d8}.process-diagram-container .legenda.highlight-overlay-current{background-color:#b2e0ff}\n"], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None });
389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessDiagramComponent, decorators: [{
390
+ type: Component,
391
+ args: [{ selector: 'valtimo-process-diagram', encapsulation: ViewEncapsulation.None, 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<div class=\"process-diagram-container\">\n <div *ngIf=\"processDefinitionKey\" class=\"diagram-container-switch-holder\">\n <div class=\"container-fluid\">\n <div class=\"row p-4 bg-light\">\n <div class=\"col-4\">\n <label><strong>Version</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setProcessDefinitionVersion($event.target.value)\">\n <option\n *ngFor=\"let processDefinitionVersion of processDefinitionVersions\"\n [value]=\"processDefinitionVersion.version\"\n [selected]=\"processDefinitionVersion.version === version\"\n >\n {{ processDefinitionVersion.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label><strong>Heatmap type</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setHeatmapOption($event.target.value)\">\n <option\n *ngFor=\"let option of enumHeatmapOptions\"\n [value]=\"option\"\n [selected]=\"option === heatmapOption\"\n >\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-4 text-right\">\n <label><strong>Show heatmap</strong></label\n ><br />\n <div class=\"text-left switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n id=\"toggleHeatmap\"\n [checked]=\"showHeatmap\"\n (click)=\"toggleShowHeatmap()\"\n /><span> <label for=\"toggleHeatmap\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div #ref (window:resize)=\"onWindowResize()\" class=\"diagram-container\"></div>\n\n <div *ngIf=\"processInstanceId\" class=\"p-4 text-center legenda-holder\">\n <span\n ><div class=\"legenda highlight-overlay-past\"></div>\n Executed tasks</span\n >\n <span class=\"ml-3\"\n ><div class=\"legenda highlight-overlay-current\"></div>\n Current tasks</span\n >\n </div>\n\n <div *ngIf=\"processDefinitionKey\" class=\"p-4 text-center legenda-holder\">\n <span\n ><span class=\"badge badge-pill badge-primary\">N</span>&nbsp;&nbsp;Amount of currently active\n instances of this task.</span\n >\n <span\n >&nbsp;&nbsp;|&nbsp;&nbsp;Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n </div>\n</div>\n", styles: [".process-diagram-container .diagram-container{height:50vh;width:100%}.process-diagram-container .diagram-container-switch-holder{position:absolute;width:100%;z-index:1000}.process-diagram-container .highlight-overlay-past:not(.djs-connection) .djs-visual>:nth-child(1){fill:#d8d8d8!important}.process-diagram-container .highlight-overlay-current:not(.djs-connection) .djs-visual>:nth-child(1){fill:#b2e0ff!important}.process-diagram-container .legenda-holder{font-size:1em}.process-diagram-container .legenda{border:2px solid black;border-radius:3px;padding:7px;display:inline-block;margin-bottom:-4px;margin-right:5px}.process-diagram-container .legenda.highlight-overlay-past{background-color:#d8d8d8}.process-diagram-container .legenda.highlight-overlay-current{background-color:#b2e0ff}\n"] }]
392
+ }], ctorParameters: function () { return [{ type: ProcessService }]; }, propDecorators: { el: [{
393
+ type: ViewChild,
394
+ args: ['ref', { static: true }]
395
+ }], importDone: [{
396
+ type: Output
397
+ }], processDefinitionKey: [{
398
+ type: Input
399
+ }], processInstanceId: [{
400
+ type: Input
401
+ }] } });
402
+
403
+ /*
404
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
405
+ *
406
+ * Licensed under EUPL, Version 1.2 (the "License");
407
+ * you may not use this file except in compliance with the License.
408
+ * You may obtain a copy of the License at
409
+ *
410
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
411
+ *
412
+ * Unless required by applicable law or agreed to in writing, software
413
+ * distributed under the License is distributed on an "AS IS" basis,
414
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
415
+ * See the License for the specific language governing permissions and
416
+ * limitations under the License.
417
+ */
418
+ class ProcessModule {
419
+ }
420
+ ProcessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
421
+ ProcessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessModule, declarations: [ProcessDiagramComponent], imports: [CommonModule,
422
+ ListModule,
423
+ WidgetModule,
424
+ TimelineModule,
425
+ BpmnJsDiagramModule,
426
+ CamundaFormModule,
427
+ BrowserAnimationsModule, i1$1.ToastrModule], exports: [ProcessDiagramComponent] });
428
+ ProcessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessModule, imports: [[
429
+ CommonModule,
430
+ ListModule,
431
+ WidgetModule,
432
+ TimelineModule,
433
+ BpmnJsDiagramModule,
434
+ CamundaFormModule,
435
+ BrowserAnimationsModule,
436
+ ToastrModule.forRoot({
437
+ positionClass: 'toast-bottom-full-width',
438
+ preventDuplicates: true,
439
+ }),
440
+ ]] });
441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ProcessModule, decorators: [{
442
+ type: NgModule,
443
+ args: [{
444
+ declarations: [ProcessDiagramComponent],
445
+ imports: [
446
+ CommonModule,
447
+ ListModule,
448
+ WidgetModule,
449
+ TimelineModule,
450
+ BpmnJsDiagramModule,
451
+ CamundaFormModule,
452
+ BrowserAnimationsModule,
453
+ ToastrModule.forRoot({
454
+ positionClass: 'toast-bottom-full-width',
455
+ preventDuplicates: true,
456
+ }),
457
+ ],
458
+ exports: [ProcessDiagramComponent],
459
+ }]
460
+ }] });
461
+
462
+ /*
463
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
464
+ *
465
+ * Licensed under EUPL, Version 1.2 (the "License");
466
+ * you may not use this file except in compliance with the License.
467
+ * You may obtain a copy of the License at
468
+ *
469
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
470
+ *
471
+ * Unless required by applicable law or agreed to in writing, software
472
+ * distributed under the License is distributed on an "AS IS" basis,
473
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
474
+ * See the License for the specific language governing permissions and
475
+ * limitations under the License.
476
+ */
477
+
478
+ /**
479
+ * Generated bundle index. Do not edit.
480
+ */
481
+
482
+ export { ProcessDiagramComponent, ProcessModule, ProcessService };
483
+ //# sourceMappingURL=valtimo-process.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-process.mjs","sources":["../../../../projects/valtimo/process/src/lib/models/index.ts","../../../../projects/valtimo/process/src/lib/process.service.ts","../../../../projects/valtimo/process/src/lib/process-diagram/process-diagram.component.ts","../../../../projects/valtimo/process/src/lib/process-diagram/process-diagram.component.html","../../../../projects/valtimo/process/src/lib/process.module.ts","../../../../projects/valtimo/process/src/public_api.ts","../../../../projects/valtimo/process/src/valtimo-process.ts"],"sourcesContent":["/*\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\nexport * from './process.model';\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n ProcessDefinition,\n ProcessDefinitionStartForm,\n ProcessInstance,\n ProcessInstanceTask,\n ProcessStart,\n} from './models';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProcessService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n getProcessDefinitions(): Observable<ProcessDefinition[]> {\n return this.http.get<ProcessDefinition[]>(`${this.valtimoEndpointUri}process/definition`);\n }\n\n getProcessDefinitionVersions(key: string): Observable<ProcessDefinition[]> {\n return this.http.get<ProcessDefinition[]>(\n `${this.valtimoEndpointUri}process/definition/${key}/versions`\n );\n }\n\n getProcessDefinition(key: string): Observable<ProcessDefinition> {\n return this.http.get<ProcessDefinition>(`${this.valtimoEndpointUri}process/definition/${key}`);\n }\n\n getProcessDefinitionStartFormData(\n processDefinitionKey: string\n ): Observable<ProcessDefinitionStartForm> {\n return this.http.get<ProcessDefinitionStartForm>(\n `${this.valtimoEndpointUri}process/definition/${processDefinitionKey}/start-form`\n );\n }\n\n startProcesInstance(\n key: string,\n businessKey: string,\n variables: Map<string, any>\n ): Observable<any> {\n return this.http.post<ProcessStart>(\n `${this.valtimoEndpointUri}process/definition/${key}/${businessKey}/start`,\n variables\n );\n }\n\n getProcessDefinitionXml(processDefinitionId: string): Observable<any> {\n return this.http.get(`${this.valtimoEndpointUri}process/definition/${processDefinitionId}/xml`);\n }\n\n getProcessXml(id: string): Observable<any> {\n return this.http.get(`${this.valtimoEndpointUri}process/${id}/xml`);\n }\n\n getProcessCount(id: string): Observable<any> {\n return this.http.post(`${this.valtimoEndpointUri}v2/process/definition/${id}/count`, {\n key: id,\n processVariables: [{'@type': 'boolean', name: 'active', value: true}],\n });\n }\n\n getProcessHeatmapCount(processDefinition: ProcessDefinition): Observable<any[]> {\n return this.http.get<any[]>(\n `${this.valtimoEndpointUri}process/definition/${processDefinition.key}/heatmap/count?version=${processDefinition.version}`\n );\n }\n\n getProcessHeatmapDuration(processDefinition: ProcessDefinition): Observable<any[]> {\n return this.http.get<any[]>(\n `${this.valtimoEndpointUri}process/definition/${processDefinition.key}/heatmap/duration?version=${processDefinition.version}`\n );\n }\n\n getProcessInstances(key: string, page: number, size: number, sort: string): Observable<any> {\n const params = new HttpParams()\n .set('page', page.toString())\n .set('size', size.toString())\n .set('sort', sort);\n\n return this.http.post<ProcessInstance>(\n `${this.valtimoEndpointUri}v2/process/${key}/search`,\n {},\n {params}\n );\n }\n\n getProcessInstance(processInstanceId: string): Observable<ProcessInstance> {\n return this.http.get<ProcessInstance>(\n `${this.valtimoEndpointUri}process/${processInstanceId}`,\n {}\n );\n }\n\n getProcessInstanceTasks(id: string): Observable<ProcessInstanceTask[]> {\n return this.http.get<ProcessInstanceTask[]>(\n `${this.valtimoEndpointUri}process/${id}/tasks`,\n {}\n );\n }\n\n getProcessInstanceVariables(id: string, variableNames: Array<any>): Observable<any> {\n return this.http.post(\n `${this.valtimoEndpointUri}process-instance/${id}/variables`,\n variableNames\n );\n }\n\n addProcessInstancesDefaultVariablesValues(processInstances: Array<any>) {\n processInstances.forEach(processInstance => this.addDefaultVariablesValues(processInstance));\n return processInstances;\n }\n\n addDefaultVariablesValues(processInstance: any) {\n if (!processInstance['startUser']) {\n processInstance.startUser = processInstance.startUserId;\n }\n if (!processInstance['processStarted']) {\n processInstance.processStarted = processInstance.startTime;\n }\n if (!processInstance['processEnded']) {\n processInstance.processEnded = processInstance.endTime;\n }\n if (!processInstance['active']) {\n processInstance.active = processInstance.endTime == null;\n }\n return processInstance;\n }\n\n getInstancesStatistics(fromDate?: string, toDate?: string, processFilter?: string) {\n const params = new HttpParams();\n params.set('fromDate', fromDate);\n params.set('toDate', toDate);\n params.set('processFilter', processFilter);\n return this.http.get<any[]>(`${this.valtimoEndpointUri}reporting/instancesstatistics`, {\n params,\n });\n }\n\n deployProcess(processXml: string) {\n const formData = new FormData();\n formData.append('file', new File([processXml], 'process.bpmn'));\n formData.append('deployment-name', 'valtimoConsoleApp');\n formData.append('deployment-source', 'process application');\n return this.http.post(\n `${this.valtimoEndpointUri}camunda-rest/engine/default/deployment/create`,\n formData\n );\n }\n\n migrateProcess(\n processDefinition1Id: string,\n processDefinition2Id: string,\n params: any\n ): Observable<any> {\n return this.http.post(\n `${this.valtimoEndpointUri}process/definition/${processDefinition1Id}/${processDefinition2Id}/migrate`,\n params\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 {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ProcessService} from '../process.service';\n\nimport BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport heatmap from 'heatmap.js-fixed/build/heatmap.js';\n\n@Component({\n selector: 'valtimo-process-diagram',\n templateUrl: './process-diagram.component.html',\n styleUrls: ['./process-diagram.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ProcessDiagramComponent implements OnInit, OnDestroy, OnChanges {\n private bpmnJS: BpmnJS;\n private heatMapInstance: any;\n\n @ViewChild('ref', {static: true}) public el: ElementRef;\n @Output() public importDone: EventEmitter<any> = new EventEmitter();\n @Input() public processDefinitionKey?: string;\n @Input() public processInstanceId?: string;\n\n public processDiagram: any;\n public processDefinition: any;\n public processDefinitionVersions: any;\n public heatmapCount: any;\n public heatmapDuration: any;\n public tasksCount: any;\n public showHeatmap: boolean;\n public enumHeatmapOptions = ['count', 'duration'];\n public heatmapOption: string;\n public version: any;\n public heatPoints: any;\n public min: number;\n public max: number;\n public inputData: any;\n public valueKey: any;\n\n constructor(private processService: ProcessService) {}\n\n ngOnInit() {\n if (this.processDefinitionKey) {\n this.loadProcessDefinitionFromKey(this.processDefinitionKey);\n }\n if (this.processInstanceId) {\n this.loadProcessInstanceXml(this.processInstanceId);\n }\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n const eventBus = this.bpmnJS.get('eventBus');\n if (this.processDiagram.historicActivityInstances) {\n this.processDiagram.historicActivityInstances.forEach(instance => {\n // exclude multiInstanceBody\n if (instance.activityType !== 'multiInstanceBody') {\n canvas.addMarker(\n instance.activityId,\n instance.endTime ? 'highlight-overlay-past' : 'highlight-overlay-current'\n );\n }\n });\n }\n\n canvas.zoom('fit-viewport', 'auto');\n if (this.processDefinitionVersions) {\n eventBus.on('canvas.init', () => {\n if (this.showHeatmap) {\n this.clearHeatmap();\n }\n this.loadHeatmapData();\n });\n eventBus.on('canvas.viewbox.changing', () => {\n if (this.showHeatmap) {\n this.clearHeatmap();\n }\n });\n eventBus.on('canvas.viewbox.changed', () => {\n this.loadHeatmapData();\n });\n }\n }\n });\n }\n\n ngOnChanges(): void {\n if (this.processDefinitionKey) {\n this.loadProcessDefinitionFromKey(this.processDefinitionKey);\n } else if (this.processInstanceId) {\n this.loadProcessInstanceXml(this.processInstanceId);\n }\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n public loadProcessDefinition(processDefinitionKey) {\n this.processService.getProcessDefinition(processDefinitionKey).subscribe(response => {\n this.heatmapOption = this.enumHeatmapOptions[0];\n this.version = response.version;\n this.loadProcessDefinitionXml(response.id);\n });\n }\n\n public loadProcessDefinitionVersions(processDefinitionKey) {\n this.processService.getProcessDefinitionVersions(processDefinitionKey).subscribe(response => {\n this.processDefinitionVersions = response;\n });\n }\n\n public loadProcessDefinitionFromKey(processDefinitionKey) {\n this.loadProcessDefinitionVersions(processDefinitionKey);\n this.loadProcessDefinition(processDefinitionKey);\n }\n\n public loadProcessDefinitionXml(processDefinitionId) {\n this.processService.getProcessDefinitionXml(processDefinitionId).subscribe(response => {\n this.processDiagram = response;\n this.bpmnJS.importXML(this.processDiagram.bpmn20Xml);\n this.bpmnJS.attachTo(this.el.nativeElement);\n });\n }\n\n private loadProcessInstanceXml(processInstanceId) {\n this.processService.getProcessXml(processInstanceId).subscribe(response => {\n this.processDiagram = response;\n this.bpmnJS.importXML(this.processDiagram.bpmn20Xml);\n this.bpmnJS.attachTo(this.el.nativeElement);\n });\n }\n\n public loadProcessDefinitionHeatmapCount(processDefinition) {\n this.processService.getProcessHeatmapCount(processDefinition).subscribe(response => {\n this.inputData = response;\n this.valueKey = 'totalCount';\n this.heatPoints = {data: []};\n this.min = 0;\n this.max = 0;\n\n Object.keys(this.inputData).forEach(key => {\n const diagramContainer = this.el.nativeElement.querySelector('svg').getBoundingClientRect();\n const diagramElm = this.el.nativeElement\n .querySelector(`g[data-element-id=${key}]`)\n .getBoundingClientRect();\n this.setMax(key);\n this.heatPoints.data.push({\n x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),\n y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),\n value: this.inputData[key][this.valueKey],\n radius: diagramElm.width / 2,\n });\n this.addCounterActiveOverlays(key, this.inputData);\n });\n this.clearHeatmap();\n if (this.showHeatmap) {\n this.loadHeatmap();\n }\n });\n }\n\n public onWindowResize() {\n const oldCanvas = this.el.nativeElement.querySelector('canvas[class=heatmap-canvas]');\n if (oldCanvas) {\n oldCanvas.remove();\n this.heatMapInstance = null;\n }\n if (this.showHeatmap) {\n this.loadHeatmap();\n }\n }\n\n public loadProcessDefinitionHeatmapDuration(processDefinition) {\n this.processService.getProcessHeatmapDuration(processDefinition).subscribe(response => {\n this.inputData = response;\n this.valueKey = 'averageDurationInMilliseconds';\n this.heatPoints = {data: []};\n this.min = 0;\n this.max = 0;\n\n Object.keys(this.inputData).forEach(key => {\n const diagramContainer = this.el.nativeElement.querySelector('svg').getBoundingClientRect();\n const diagramElm = this.el.nativeElement\n .querySelector(`g[data-element-id=${key}]`)\n .getBoundingClientRect();\n this.setMax(key);\n this.heatPoints.data.push({\n x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),\n y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),\n value: this.inputData[key][this.valueKey],\n radius: diagramElm.width / 2,\n });\n this.addCounterActiveOverlays(key, this.inputData);\n });\n this.clearHeatmap();\n if (this.showHeatmap) {\n this.loadHeatmap();\n }\n });\n }\n\n public setProcessDefinitionKey(processDefinitionKey) {\n this.processDefinitionKey = processDefinitionKey;\n this.loadProcessDefinitionFromKey(this.processDefinitionKey);\n }\n\n public setProcessDefinitionVersion(version) {\n this.version = +version;\n this.loadHeatmapData();\n }\n\n public setHeatmapOption(heatmapOption) {\n this.heatmapOption = heatmapOption;\n this.loadHeatmapData();\n }\n\n public toggleShowHeatmap() {\n this.showHeatmap = !this.showHeatmap;\n this.loadHeatmapData();\n }\n\n public loadHeatmap() {\n if (!this.heatMapInstance) {\n this.heatMapInstance = heatmap.create({\n radius: 54,\n blur: 0.7,\n maxOpacity: 0.4,\n minOpacity: 0,\n container: this.el.nativeElement,\n });\n }\n this.heatMapInstance.setData({\n min: this.min,\n max: this.max,\n data: this.heatPoints.data,\n });\n }\n\n public clearHeatmap() {\n if (this.heatMapInstance) {\n this.heatMapInstance.setData({data: []});\n }\n }\n\n public loadHeatmapData() {\n this.processDefinition = this.processDefinitionVersions.find(\n definition => definition.version === this.version\n );\n\n if (this.heatmapOption === 'count') {\n this.loadProcessDefinitionHeatmapCount(this.processDefinition);\n }\n if (this.heatmapOption === 'duration') {\n this.loadProcessDefinitionHeatmapDuration(this.processDefinition);\n }\n }\n\n public setMax(key: any) {\n if (this.heatmapDuration) {\n this.max = Math.max(this.heatmapDuration[key].averageDurationInMilliseconds, this.max);\n } else if (this.heatmapCount) {\n this.max = Math.max(\n this.heatmapCount[key].totalCount + this.heatmapCount[key].count,\n this.max\n );\n }\n }\n\n public addCounterActiveOverlays(key: any, inputData: any) {\n const overlays = this.bpmnJS.get('overlays');\n overlays.add(key, {\n position: {\n bottom: 13,\n left: -12,\n },\n show: {\n minZoom: 0,\n maxZoom: 5.0,\n },\n html: `<span class=\"badge badge-pill badge-primary\">${inputData[key].count}</span>`,\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<div class=\"process-diagram-container\">\n <div *ngIf=\"processDefinitionKey\" class=\"diagram-container-switch-holder\">\n <div class=\"container-fluid\">\n <div class=\"row p-4 bg-light\">\n <div class=\"col-4\">\n <label><strong>Version</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setProcessDefinitionVersion($event.target.value)\">\n <option\n *ngFor=\"let processDefinitionVersion of processDefinitionVersions\"\n [value]=\"processDefinitionVersion.version\"\n [selected]=\"processDefinitionVersion.version === version\"\n >\n {{ processDefinitionVersion.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label><strong>Heatmap type</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setHeatmapOption($event.target.value)\">\n <option\n *ngFor=\"let option of enumHeatmapOptions\"\n [value]=\"option\"\n [selected]=\"option === heatmapOption\"\n >\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-4 text-right\">\n <label><strong>Show heatmap</strong></label\n ><br />\n <div class=\"text-left switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n id=\"toggleHeatmap\"\n [checked]=\"showHeatmap\"\n (click)=\"toggleShowHeatmap()\"\n /><span> <label for=\"toggleHeatmap\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div #ref (window:resize)=\"onWindowResize()\" class=\"diagram-container\"></div>\n\n <div *ngIf=\"processInstanceId\" class=\"p-4 text-center legenda-holder\">\n <span\n ><div class=\"legenda highlight-overlay-past\"></div>\n Executed tasks</span\n >\n <span class=\"ml-3\"\n ><div class=\"legenda highlight-overlay-current\"></div>\n Current tasks</span\n >\n </div>\n\n <div *ngIf=\"processDefinitionKey\" class=\"p-4 text-center legenda-holder\">\n <span\n ><span class=\"badge badge-pill badge-primary\">N</span>&nbsp;&nbsp;Amount of currently active\n instances of this task.</span\n >\n <span\n >&nbsp;&nbsp;|&nbsp;&nbsp;Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n </div>\n</div>\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 {CommonModule} from '@angular/common';\nimport {\n BpmnJsDiagramModule,\n CamundaFormModule,\n ListModule,\n TimelineModule,\n WidgetModule,\n} from '@valtimo/components';\nimport {ToastrModule} from 'ngx-toastr';\nimport {BrowserAnimationsModule} from '@angular/platform-browser/animations';\nimport {ProcessDiagramComponent} from './process-diagram/process-diagram.component';\n\n@NgModule({\n declarations: [ProcessDiagramComponent],\n imports: [\n CommonModule,\n ListModule,\n WidgetModule,\n TimelineModule,\n BpmnJsDiagramModule,\n CamundaFormModule,\n BrowserAnimationsModule,\n ToastrModule.forRoot({\n positionClass: 'toast-bottom-full-width',\n preventDuplicates: true,\n }),\n ],\n exports: [ProcessDiagramComponent],\n})\nexport class ProcessModule {}\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 process\n */\n\nexport * from './lib/models';\nexport * from './lib/process.service';\nexport * from './lib/process.module';\nexport * from './lib/process-diagram/process-diagram.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ProcessService","i2"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;;AChBH;;;;;;;;;;;;;;AAcG;MAiBU,cAAc,CAAA;IAGzB,WAAoB,CAAA,IAAgB,EAAE,aAA4B,EAAA;AAA9C,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WA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