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