@valtimo/analyse 4.23.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/esm2020/lib/analyse-process-diagram/analyse-process-diagram.component.mjs +257 -0
  2. package/esm2020/lib/analyse-routing.module.mjs +45 -0
  3. package/esm2020/lib/analyse.component.mjs +29 -0
  4. package/esm2020/lib/analyse.module.mjs +37 -0
  5. package/esm2020/lib/models/heatpoint.model.mjs +17 -0
  6. package/esm2020/lib/models/index.mjs +19 -0
  7. package/esm2020/public_api.mjs +22 -0
  8. package/esm2020/valtimo-analyse.mjs +5 -0
  9. package/fesm2015/valtimo-analyse.mjs +397 -0
  10. package/fesm2015/valtimo-analyse.mjs.map +1 -0
  11. package/fesm2020/valtimo-analyse.mjs +413 -0
  12. package/fesm2020/valtimo-analyse.mjs.map +1 -0
  13. package/lib/analyse-process-diagram/analyse-process-diagram.component.d.ts +4 -0
  14. package/lib/analyse-process-diagram/analyse-process-diagram.component.d.ts.map +1 -0
  15. package/lib/analyse-routing.module.d.ts +7 -0
  16. package/lib/analyse-routing.module.d.ts.map +1 -0
  17. package/lib/analyse.component.d.ts +4 -0
  18. package/lib/analyse.component.d.ts.map +1 -0
  19. package/lib/analyse.module.d.ts +11 -0
  20. package/lib/analyse.module.d.ts.map +1 -0
  21. package/lib/models/heatpoint.model.d.ts +1 -0
  22. package/lib/models/heatpoint.model.d.ts.map +1 -0
  23. package/lib/models/index.d.ts +1 -0
  24. package/lib/models/index.d.ts.map +1 -0
  25. package/package.json +22 -10
  26. package/public_api.d.ts +1 -0
  27. package/public_api.d.ts.map +1 -0
  28. package/valtimo-analyse.d.ts +2 -2
  29. package/valtimo-analyse.d.ts.map +1 -0
  30. package/bundles/valtimo-analyse.umd.js +0 -425
  31. package/bundles/valtimo-analyse.umd.js.map +0 -1
  32. package/bundles/valtimo-analyse.umd.min.js +0 -2
  33. package/bundles/valtimo-analyse.umd.min.js.map +0 -1
  34. package/esm2015/lib/analyse-process-diagram/analyse-process-diagram.component.js +0 -255
  35. package/esm2015/lib/analyse-routing.module.js +0 -41
  36. package/esm2015/lib/analyse.component.js +0 -29
  37. package/esm2015/lib/analyse.module.js +0 -32
  38. package/esm2015/lib/models/heatpoint.model.js +0 -16
  39. package/esm2015/lib/models/index.js +0 -19
  40. package/esm2015/public_api.js +0 -22
  41. package/esm2015/valtimo-analyse.js +0 -7
  42. package/fesm2015/valtimo-analyse.js +0 -404
  43. package/fesm2015/valtimo-analyse.js.map +0 -1
  44. package/valtimo-analyse.metadata.json +0 -1
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@valtimo/analyse",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.23.0",
4
+ "version": "5.2.0",
5
5
  "peerDependencies": {
6
- "@angular/common": "^10.0.11",
7
- "@angular/core": "^10.0.11"
6
+ "@angular/common": "^13.2.3",
7
+ "@angular/core": "^13.2.3"
8
8
  },
9
9
  "dependencies": {
10
10
  "tslib": "^2.0.0"
11
11
  },
12
- "main": "bundles/valtimo-analyse.umd.js",
13
- "module": "fesm2015/valtimo-analyse.js",
14
- "es2015": "fesm2015/valtimo-analyse.js",
15
- "esm2015": "esm2015/valtimo-analyse.js",
16
- "fesm2015": "fesm2015/valtimo-analyse.js",
12
+ "module": "fesm2015/valtimo-analyse.mjs",
13
+ "es2020": "fesm2020/valtimo-analyse.mjs",
14
+ "esm2020": "esm2020/valtimo-analyse.mjs",
15
+ "fesm2020": "fesm2020/valtimo-analyse.mjs",
16
+ "fesm2015": "fesm2015/valtimo-analyse.mjs",
17
17
  "typings": "valtimo-analyse.d.ts",
18
- "metadata": "valtimo-analyse.metadata.json",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./valtimo-analyse.d.ts",
24
+ "esm2020": "./esm2020/valtimo-analyse.mjs",
25
+ "es2020": "./fesm2020/valtimo-analyse.mjs",
26
+ "es2015": "./fesm2015/valtimo-analyse.mjs",
27
+ "node": "./fesm2015/valtimo-analyse.mjs",
28
+ "default": "./fesm2020/valtimo-analyse.mjs"
29
+ }
30
+ },
19
31
  "sideEffects": false
20
- }
32
+ }
package/public_api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './lib/analyse.module';
2
2
  export * from './lib/analyse.component';
3
3
  export * from './lib/models';
4
+ //# sourceMappingURL=public_api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/analyse/src/public_api.ts"],"names":[],"mappings":"AAoBA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@valtimo/analyse" />
4
5
  export * from './public_api';
5
- export { AnalyseProcessDiagramComponent as ɵa } from './lib/analyse-process-diagram/analyse-process-diagram.component';
6
- export { AnalyseRoutingModule as ɵb } from './lib/analyse-routing.module';
6
+ //# sourceMappingURL=valtimo-analyse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-analyse.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/analyse/src/valtimo-analyse.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -1,425 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@valtimo/security'), require('@valtimo/config'), require('@valtimo/process'), require('@valtimo/components'), require('bpmn-js/dist/bpmn-navigated-viewer.production.min.js'), require('heatmap.js-fixed/build/heatmap.js')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/analyse', ['exports', '@angular/core', '@angular/common', '@angular/router', '@valtimo/security', '@valtimo/config', '@valtimo/process', '@valtimo/components', 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js', 'heatmap.js-fixed/build/heatmap.js'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.analyse = {}), global.ng.core, global.ng.common, global.ng.router, global.security, global.config, global.process, global.components, global.BpmnJS, global.heatmap));
5
- }(this, (function (exports, core, common, router, security, config, process, components, BpmnJS, heatmap) { 'use strict';
6
-
7
- /*
8
- * Copyright 2015-2020 Ritense BV, the Netherlands.
9
- *
10
- * Licensed under EUPL, Version 1.2 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" basis,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- var AnalyseComponent = /** @class */ (function () {
23
- function AnalyseComponent() {
24
- }
25
- AnalyseComponent.prototype.ngOnInit = function () { };
26
- return AnalyseComponent;
27
- }());
28
- AnalyseComponent.decorators = [
29
- { type: core.Component, args: [{
30
- selector: 'valtimo-analyse',
31
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <valtimo-analyse-process-diagram></valtimo-analyse-process-diagram>\n </div>\n</div>\n",
32
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
33
- },] }
34
- ];
35
- AnalyseComponent.ctorParameters = function () { return []; };
36
-
37
- /*
38
- * Copyright 2015-2020 Ritense BV, the Netherlands.
39
- *
40
- * Licensed under EUPL, Version 1.2 (the "License");
41
- * you may not use this file except in compliance with the License.
42
- * You may obtain a copy of the License at
43
- *
44
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
45
- *
46
- * Unless required by applicable law or agreed to in writing, software
47
- * distributed under the License is distributed on an "AS IS" basis,
48
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
- * See the License for the specific language governing permissions and
50
- * limitations under the License.
51
- */
52
- var ɵ0 = { title: 'Analysis', roles: [config.ROLE_USER] };
53
- var routes = [
54
- {
55
- path: 'analysis',
56
- component: AnalyseComponent,
57
- canActivate: [security.AuthGuardService],
58
- data: ɵ0,
59
- },
60
- ];
61
- var AnalyseRoutingModule = /** @class */ (function () {
62
- function AnalyseRoutingModule() {
63
- }
64
- return AnalyseRoutingModule;
65
- }());
66
- AnalyseRoutingModule.decorators = [
67
- { type: core.NgModule, args: [{
68
- declarations: [],
69
- imports: [common.CommonModule, router.RouterModule.forChild(routes)],
70
- exports: [router.RouterModule],
71
- },] }
72
- ];
73
-
74
- /*
75
- * Copyright 2015-2020 Ritense BV, the Netherlands.
76
- *
77
- * Licensed under EUPL, Version 1.2 (the "License");
78
- * you may not use this file except in compliance with the License.
79
- * You may obtain a copy of the License at
80
- *
81
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
82
- *
83
- * Unless required by applicable law or agreed to in writing, software
84
- * distributed under the License is distributed on an "AS IS" basis,
85
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
86
- * See the License for the specific language governing permissions and
87
- * limitations under the License.
88
- */
89
- var AnalyseProcessDiagramComponent = /** @class */ (function () {
90
- function AnalyseProcessDiagramComponent(processService) {
91
- this.processService = processService;
92
- this.importDone = new core.EventEmitter();
93
- this.enumHeatmapOptions = ['count', 'duration'];
94
- this.initialized = false;
95
- }
96
- AnalyseProcessDiagramComponent.prototype.ngOnInit = function () {
97
- var _this = this;
98
- this.processService
99
- .getProcessDefinitions()
100
- .subscribe(function (processDefinitions) {
101
- _this.processDefinitions = processDefinitions;
102
- if (!_this.processDefinitionKey && processDefinitions.length !== 0) {
103
- _this.processDefinitionKey = processDefinitions[0].key;
104
- _this.loadProcessDefinitionFromKey(_this.processDefinitionKey);
105
- }
106
- });
107
- this.createBpmnViewerInstance();
108
- };
109
- AnalyseProcessDiagramComponent.prototype.createBpmnViewerInstance = function () {
110
- var _this = this;
111
- this.bpmnJS = new BpmnJS();
112
- this.bpmnJS.on('import.done', function (_a) {
113
- var error = _a.error;
114
- if (!error && !_this.initialized) {
115
- var canvas_1 = _this.bpmnJS.get('canvas'), eventBus = _this.bpmnJS.get('eventBus');
116
- if (_this.processDiagram.historicActivityInstances) {
117
- _this.processDiagram.historicActivityInstances.forEach(function (instance) {
118
- if (instance.activityType !== 'multiInstanceBody') {
119
- canvas_1.addMarker(instance.activityId, instance.endTime ? 'highlight-overlay-past' : 'highlight-overlay-current');
120
- }
121
- });
122
- }
123
- canvas_1.zoom('fit-viewport', 'auto');
124
- if (_this.processDefinitionVersions) {
125
- eventBus.on('canvas.init', function () {
126
- if (_this.showHeatmap) {
127
- _this.clearHeatmap();
128
- }
129
- _this.loadHeatmapData();
130
- });
131
- eventBus.on('canvas.viewbox.changing', function () {
132
- if (_this.showHeatmap) {
133
- _this.clearHeatmap();
134
- }
135
- });
136
- eventBus.on('canvas.viewbox.changed', function () {
137
- _this.loadHeatmapData();
138
- });
139
- }
140
- _this.initialized = true;
141
- }
142
- _this.clearHeatmap();
143
- if (_this.showHeatmap) {
144
- _this.loadHeatmapData();
145
- }
146
- });
147
- };
148
- AnalyseProcessDiagramComponent.prototype.ngOnDestroy = function () {
149
- if (this.bpmnJS) {
150
- this.bpmnJS.destroy();
151
- }
152
- };
153
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinition = function (processDefinitionKey) {
154
- var _this = this;
155
- this.processService
156
- .getProcessDefinition(processDefinitionKey)
157
- .subscribe(function (processDefinition) {
158
- _this.heatmapOption = _this.enumHeatmapOptions[0];
159
- _this.version = processDefinition.version;
160
- _this.loadProcessDefinitionXml(processDefinition.id);
161
- });
162
- };
163
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinitionVersions = function (processDefinitionKey) {
164
- var _this = this;
165
- this.processService
166
- .getProcessDefinitionVersions(processDefinitionKey)
167
- .subscribe(function (processDefinitionVersions) {
168
- _this.processDefinitionVersions = processDefinitionVersions;
169
- });
170
- };
171
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinitionFromKey = function (processDefinitionKey) {
172
- this.loadProcessDefinitionVersions(processDefinitionKey);
173
- this.loadProcessDefinition(processDefinitionKey);
174
- };
175
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinitionXml = function (processDefinitionId) {
176
- var _this = this;
177
- this.processService.getProcessDefinitionXml(processDefinitionId).subscribe(function (response) {
178
- _this.processDiagram = response;
179
- _this.bpmnJS.importXML(_this.processDiagram.bpmn20Xml);
180
- _this.bpmnJS.attachTo(_this.el.nativeElement);
181
- });
182
- };
183
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinitionHeatmapCount = function (processDefinition) {
184
- var _this = this;
185
- this.processService.getProcessHeatmapCount(processDefinition).subscribe(function (response) {
186
- _this.inputData = response;
187
- _this.valueKey = 'totalCount';
188
- _this.heatPoints = { data: [] };
189
- _this.min = 0;
190
- _this.max = 0;
191
- Object.keys(_this.inputData).forEach(function (key) {
192
- var diagramContainer = _this.el.nativeElement.querySelector('svg').getBoundingClientRect(), diagramElm = _this.el.nativeElement
193
- .querySelector("g[data-element-id=" + key + "]")
194
- .getBoundingClientRect();
195
- _this.setMax(key);
196
- _this.heatPoints.data.push({
197
- x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),
198
- y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),
199
- value: _this.inputData[key][_this.valueKey],
200
- radius: diagramElm.width / 2,
201
- });
202
- _this.addCounterActiveOverlays(key, _this.inputData);
203
- });
204
- _this.clearHeatmap();
205
- if (_this.showHeatmap) {
206
- _this.loadHeatmap();
207
- }
208
- });
209
- };
210
- AnalyseProcessDiagramComponent.prototype.onWindowResize = function () {
211
- var oldCanvas = this.el.nativeElement.querySelector('canvas[class=heatmap-canvas]');
212
- if (oldCanvas) {
213
- oldCanvas.remove();
214
- this.heatMapInstance = null;
215
- }
216
- if (this.showHeatmap) {
217
- this.loadHeatmap();
218
- }
219
- };
220
- AnalyseProcessDiagramComponent.prototype.loadProcessDefinitionHeatmapDuration = function (processDefinition) {
221
- var _this = this;
222
- this.processService.getProcessHeatmapDuration(processDefinition).subscribe(function (response) {
223
- _this.inputData = response;
224
- _this.valueKey = 'averageDurationInMilliseconds';
225
- _this.heatPoints = { data: [] };
226
- _this.min = 0;
227
- _this.max = 0;
228
- Object.keys(_this.inputData).forEach(function (key) {
229
- var diagramContainer = _this.el.nativeElement.querySelector('svg').getBoundingClientRect(), diagramElm = _this.el.nativeElement
230
- .querySelector("g[data-element-id=" + key + "]")
231
- .getBoundingClientRect();
232
- _this.setMax(key);
233
- _this.heatPoints.data.push({
234
- x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),
235
- y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),
236
- value: _this.inputData[key][_this.valueKey],
237
- radius: diagramElm.width / 2,
238
- });
239
- _this.addCounterActiveOverlays(key, _this.inputData);
240
- });
241
- _this.clearHeatmap();
242
- if (_this.showHeatmap) {
243
- _this.loadHeatmap();
244
- }
245
- });
246
- };
247
- AnalyseProcessDiagramComponent.prototype.setProcessDefinitionKey = function (processDefinitionKey) {
248
- this.processDefinitionKey = processDefinitionKey;
249
- this.loadProcessDefinitionFromKey(this.processDefinitionKey);
250
- };
251
- AnalyseProcessDiagramComponent.prototype.setProcessDefinitionVersion = function (version) {
252
- this.version = +version;
253
- this.loadHeatmapData();
254
- };
255
- AnalyseProcessDiagramComponent.prototype.setHeatmapOption = function (heatmapOption) {
256
- this.heatmapOption = heatmapOption;
257
- this.loadHeatmapData();
258
- };
259
- AnalyseProcessDiagramComponent.prototype.toggleShowHeatmap = function () {
260
- this.showHeatmap = !this.showHeatmap;
261
- this.loadHeatmapData();
262
- };
263
- AnalyseProcessDiagramComponent.prototype.loadHeatmap = function () {
264
- if (!this.heatMapInstance) {
265
- this.heatMapInstance = heatmap.create({
266
- radius: 54,
267
- blur: 0.7,
268
- maxOpacity: 0.4,
269
- minOpacity: 0,
270
- container: this.el.nativeElement,
271
- });
272
- var heatmapCanvas = this.el.nativeElement.querySelector('canvas[class=heatmap-canvas]');
273
- heatmapCanvas.style.zIndex = 1;
274
- }
275
- this.heatMapInstance.setData({
276
- min: this.min,
277
- max: this.max,
278
- data: this.heatPoints.data,
279
- });
280
- };
281
- AnalyseProcessDiagramComponent.prototype.clearHeatmap = function () {
282
- if (this.heatMapInstance) {
283
- this.heatMapInstance.setData({ data: [] });
284
- }
285
- };
286
- AnalyseProcessDiagramComponent.prototype.loadHeatmapData = function () {
287
- var _this = this;
288
- this.processDefinition = this.processDefinitionVersions.find(function (definition) { return definition.version === _this.version; });
289
- if (this.heatmapOption === 'count') {
290
- this.loadProcessDefinitionHeatmapCount(this.processDefinition);
291
- }
292
- if (this.heatmapOption === 'duration') {
293
- this.loadProcessDefinitionHeatmapDuration(this.processDefinition);
294
- }
295
- };
296
- AnalyseProcessDiagramComponent.prototype.setMax = function (key) {
297
- if (this.valueKey === 'averageDurationInMilliseconds') {
298
- this.max = Math.max(this.inputData[key].averageDurationInMilliseconds, this.max);
299
- }
300
- else if (this.valueKey === 'totalCount') {
301
- this.max = Math.max(this.inputData[key].totalCount + this.inputData[key].count, this.max);
302
- }
303
- };
304
- AnalyseProcessDiagramComponent.prototype.addCounterActiveOverlays = function (key, inputData) {
305
- var overlays = this.bpmnJS.get('overlays');
306
- overlays.add(key, {
307
- position: {
308
- bottom: 13,
309
- left: -12,
310
- },
311
- show: {
312
- minZoom: 0,
313
- maxZoom: 5.0,
314
- },
315
- html: "<span class=\"badge badge-pill badge-primary\">" + inputData[key].count + "</span>",
316
- });
317
- };
318
- return AnalyseProcessDiagramComponent;
319
- }());
320
- AnalyseProcessDiagramComponent.decorators = [
321
- { type: core.Component, args: [{
322
- selector: 'valtimo-analyse-process-diagram',
323
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"container-fluid\">\n <div class=\"row p-4 bg-light options\">\n <div class=\"col-sm-3\">\n <label><strong>Process</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"setProcessDefinitionKey($event.target.value)\">\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [value]=\"processDefinition.key\"\n [selected]=\"processDefinitionKey === processDefinition.key\"\n >\n {{ processDefinition.name }}\n </option>\n </select>\n </div>\n <div class=\"col-sm-1\">\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-sm-3\" *ngIf=\"showHeatmap\">\n <label><strong>Heatmap type</strong></label\n ><br />\n <select class=\"form-control w-sm-50\" (change)=\"setHeatmapOption($event.target.value)\">\n <option\n *ngFor=\"let option of enumHeatmapOptions\"\n [value]=\"option\"\n [selected]=\"option === heatmapOption\"\n >\n {{ option | titlecase }}\n </option>\n </select>\n </div>\n <div\n class=\"text-sm-right col-sm-3\"\n [ngClass]=\"{'offset-sm-2': showHeatmap, 'offset-sm-5': !showHeatmap}\"\n >\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 class=\"row p-4 bg-white\">\n <div class=\"col\">\n <div #ref (window:resize)=\"onWindowResize()\" class=\"diagram-container\"></div>\n </div>\n </div>\n</div>\n\n<div 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",
324
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:58vh}.container-fluid{border:1px solid #dee2e6}.options{border-bottom:1px solid #dee2e6}"]
325
- },] }
326
- ];
327
- AnalyseProcessDiagramComponent.ctorParameters = function () { return [
328
- { type: process.ProcessService }
329
- ]; };
330
- AnalyseProcessDiagramComponent.propDecorators = {
331
- el: [{ type: core.ViewChild, args: ['ref',] }],
332
- importDone: [{ type: core.Output }]
333
- };
334
-
335
- /*
336
- * Copyright 2015-2020 Ritense BV, the Netherlands.
337
- *
338
- * Licensed under EUPL, Version 1.2 (the "License");
339
- * you may not use this file except in compliance with the License.
340
- * You may obtain a copy of the License at
341
- *
342
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
343
- *
344
- * Unless required by applicable law or agreed to in writing, software
345
- * distributed under the License is distributed on an "AS IS" basis,
346
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
347
- * See the License for the specific language governing permissions and
348
- * limitations under the License.
349
- */
350
- var AnalyseModule = /** @class */ (function () {
351
- function AnalyseModule() {
352
- }
353
- return AnalyseModule;
354
- }());
355
- AnalyseModule.decorators = [
356
- { type: core.NgModule, args: [{
357
- declarations: [AnalyseComponent, AnalyseProcessDiagramComponent],
358
- imports: [common.CommonModule, AnalyseRoutingModule, process.ProcessModule, components.WidgetModule],
359
- exports: [AnalyseComponent],
360
- },] }
361
- ];
362
-
363
- /*
364
- * Copyright 2015-2020 Ritense BV, the Netherlands.
365
- *
366
- * Licensed under EUPL, Version 1.2 (the "License");
367
- * you may not use this file except in compliance with the License.
368
- * You may obtain a copy of the License at
369
- *
370
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
371
- *
372
- * Unless required by applicable law or agreed to in writing, software
373
- * distributed under the License is distributed on an "AS IS" basis,
374
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
375
- * See the License for the specific language governing permissions and
376
- * limitations under the License.
377
- */
378
-
379
- /*
380
- *
381
- * * Copyright 2015-2020 Ritense BV, the Netherlands.
382
- * *
383
- * * Licensed under EUPL, Version 1.2 (the "License");
384
- * * you may not use this file except in compliance with the License.
385
- * * You may obtain a copy of the License at
386
- * *
387
- * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
388
- * *
389
- * * Unless required by applicable law or agreed to in writing, software
390
- * * distributed under the License is distributed on an "AS IS" basis,
391
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
392
- * * See the License for the specific language governing permissions and
393
- * * limitations under the License.
394
- *
395
- */
396
-
397
- /*
398
- * Copyright 2015-2020 Ritense BV, the Netherlands.
399
- *
400
- * Licensed under EUPL, Version 1.2 (the "License");
401
- * you may not use this file except in compliance with the License.
402
- * You may obtain a copy of the License at
403
- *
404
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
405
- *
406
- * Unless required by applicable law or agreed to in writing, software
407
- * distributed under the License is distributed on an "AS IS" basis,
408
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
409
- * See the License for the specific language governing permissions and
410
- * limitations under the License.
411
- */
412
-
413
- /**
414
- * Generated bundle index. Do not edit.
415
- */
416
-
417
- exports.AnalyseComponent = AnalyseComponent;
418
- exports.AnalyseModule = AnalyseModule;
419
- exports.ɵa = AnalyseProcessDiagramComponent;
420
- exports.ɵb = AnalyseRoutingModule;
421
-
422
- Object.defineProperty(exports, '__esModule', { value: true });
423
-
424
- })));
425
- //# sourceMappingURL=valtimo-analyse.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"valtimo-analyse.umd.js","sources":["../../../../projects/valtimo/analyse/src/lib/analyse.component.ts","../../../../projects/valtimo/analyse/src/lib/analyse-routing.module.ts","../../../../projects/valtimo/analyse/src/lib/analyse-process-diagram/analyse-process-diagram.component.ts","../../../../projects/valtimo/analyse/src/lib/analyse.module.ts","../../../../projects/valtimo/analyse/src/lib/models/heatpoint.model.ts","../../../../projects/valtimo/analyse/src/lib/models/index.ts","../../../../projects/valtimo/analyse/src/public_api.ts","../../../../projects/valtimo/analyse/src/valtimo-analyse.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n selector: 'valtimo-analyse',\n templateUrl: './analyse.component.html',\n styleUrls: ['./analyse.component.scss'],\n})\nexport class AnalyseComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {AnalyseComponent} from './analyse.component';\nimport {ROLE_USER} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'analysis',\n component: AnalyseComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Analysis', roles: [ROLE_USER]},\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class AnalyseRoutingModule {}\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 OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {Heatpoint} from '../models';\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport * as heatmap from 'heatmap.js-fixed/build/heatmap.js';\n\n@Component({\n selector: 'valtimo-analyse-process-diagram',\n templateUrl: './analyse-process-diagram.component.html',\n styleUrls: ['./analyse-process-diagram.component.scss'],\n})\nexport class AnalyseProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n private heatMapInstance: any;\n\n @ViewChild('ref') public el: ElementRef;\n @Output() public importDone: EventEmitter<any> = new EventEmitter();\n\n public processDefinitionKey: string;\n public processDefinitions: ProcessDefinition[];\n public processDiagram: any;\n public processDefinition: ProcessDefinition;\n public processDefinitionVersions: ProcessDefinition[];\n public showHeatmap: boolean;\n public enumHeatmapOptions: string[] = ['count', 'duration'];\n public heatmapOption: string;\n public version: number;\n public heatPoints: {data: Heatpoint[]};\n public min: number;\n public max: number;\n public inputData: any[];\n public valueKey: string;\n private initialized = false;\n\n constructor(private processService: ProcessService) {}\n\n ngOnInit() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n if (!this.processDefinitionKey && processDefinitions.length !== 0) {\n this.processDefinitionKey = processDefinitions[0].key;\n this.loadProcessDefinitionFromKey(this.processDefinitionKey);\n }\n });\n this.createBpmnViewerInstance();\n }\n\n private createBpmnViewerInstance() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error && !this.initialized) {\n const canvas = this.bpmnJS.get('canvas'),\n eventBus = this.bpmnJS.get('eventBus');\n if (this.processDiagram.historicActivityInstances) {\n this.processDiagram.historicActivityInstances.forEach((instance: any) => {\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 this.initialized = true;\n }\n this.clearHeatmap();\n if (this.showHeatmap) {\n this.loadHeatmapData();\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n public loadProcessDefinition(processDefinitionKey: string): void {\n this.processService\n .getProcessDefinition(processDefinitionKey)\n .subscribe((processDefinition: ProcessDefinition) => {\n this.heatmapOption = this.enumHeatmapOptions[0];\n this.version = processDefinition.version;\n this.loadProcessDefinitionXml(processDefinition.id);\n });\n }\n\n public loadProcessDefinitionVersions(processDefinitionKey: string): void {\n this.processService\n .getProcessDefinitionVersions(processDefinitionKey)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.processDefinitionVersions = processDefinitionVersions;\n });\n }\n\n public loadProcessDefinitionFromKey(processDefinitionKey: string): void {\n this.loadProcessDefinitionVersions(processDefinitionKey);\n this.loadProcessDefinition(processDefinitionKey);\n }\n\n public loadProcessDefinitionXml(processDefinitionId: string): void {\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 public loadProcessDefinitionHeatmapCount(processDefinition: ProcessDefinition): void {\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 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(): void {\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: ProcessDefinition): void {\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 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: string): void {\n this.processDefinitionKey = processDefinitionKey;\n this.loadProcessDefinitionFromKey(this.processDefinitionKey);\n }\n\n public setProcessDefinitionVersion(version: string): void {\n this.version = +version;\n this.loadHeatmapData();\n }\n\n public setHeatmapOption(heatmapOption: string): void {\n this.heatmapOption = heatmapOption;\n this.loadHeatmapData();\n }\n\n public toggleShowHeatmap(): void {\n this.showHeatmap = !this.showHeatmap;\n this.loadHeatmapData();\n }\n\n public loadHeatmap(): void {\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 const heatmapCanvas = this.el.nativeElement.querySelector('canvas[class=heatmap-canvas]');\n heatmapCanvas.style.zIndex = 1;\n }\n this.heatMapInstance.setData({\n min: this.min,\n max: this.max,\n data: this.heatPoints.data,\n });\n }\n\n public clearHeatmap(): void {\n if (this.heatMapInstance) {\n this.heatMapInstance.setData({data: []});\n }\n }\n\n public loadHeatmapData(): void {\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.valueKey === 'averageDurationInMilliseconds') {\n this.max = Math.max(this.inputData[key].averageDurationInMilliseconds, this.max);\n } else if (this.valueKey === 'totalCount') {\n this.max = Math.max(this.inputData[key].totalCount + this.inputData[key].count, this.max);\n }\n }\n\n public addCounterActiveOverlays(key: string, inputData: any[]): void {\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\nimport {NgModule} from '@angular/core';\nimport {AnalyseComponent} from './analyse.component';\nimport {CommonModule} from '@angular/common';\nimport {AnalyseRoutingModule} from './analyse-routing.module';\nimport {ProcessModule} from '@valtimo/process';\nimport {WidgetModule} from '@valtimo/components';\nimport {AnalyseProcessDiagramComponent} from './analyse-process-diagram/analyse-process-diagram.component';\n\n@NgModule({\n declarations: [AnalyseComponent, AnalyseProcessDiagramComponent],\n imports: [CommonModule, AnalyseRoutingModule, ProcessModule, WidgetModule],\n exports: [AnalyseComponent],\n})\nexport class AnalyseModule {}\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\nexport interface Heatpoint {\n x: number;\n y: number;\n value: number;\n radius: number;\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 */\n\nexport * from './heatpoint.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\n/*\n * Public API Surface of analyse\n */\n\nexport * from './lib/analyse.module';\nexport * from './lib/analyse.component';\nexport * from './lib/models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {AnalyseProcessDiagramComponent as ɵa} from './lib/analyse-process-diagram/analyse-process-diagram.component';\nexport {AnalyseRoutingModule as ɵb} from './lib/analyse-routing.module';"],"names":["Component","ROLE_USER","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","heatmap.create","ProcessService","ViewChild","Output","ProcessModule","WidgetModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAwBE;SAAgB;QAEhB,mCAAQ,GAAR,eAAa;;;;gBARdA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,wzBAAuC;;iBAExC;;;;ICtBD;;;;;;;;;;;;;;;aA4BU,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAACC,gBAAS,CAAC,EAAC;IALjD,IAAM,MAAM,GAAW;QACrB;YACE,IAA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uBAAY,CAAC;oBAC1E,OAAO,EAAE,CAAC,gBAAgB,CAAC;iBAC5B;;;IC5BD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@valtimo/security"),require("@valtimo/config"),require("@valtimo/process"),require("@valtimo/components"),require("bpmn-js/dist/bpmn-navigated-viewer.production.min.js"),require("heatmap.js-fixed/build/heatmap.js")):"function"==typeof define&&define.amd?define("@valtimo/analyse",["exports","@angular/core","@angular/common","@angular/router","@valtimo/security","@valtimo/config","@valtimo/process","@valtimo/components","bpmn-js/dist/bpmn-navigated-viewer.production.min.js","heatmap.js-fixed/build/heatmap.js"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.analyse={}),e.ng.core,e.ng.common,e.ng.router,e.security,e.config,e.process,e.components,e.BpmnJS,e.heatmap)}(this,(function(e,t,n,i,o,s,a,r,c,p){"use strict";var l=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();l.decorators=[{type:t.Component,args:[{selector:"valtimo-analyse",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content">\n <div class="container-fluid">\n <valtimo-analyse-process-diagram></valtimo-analyse-process-diagram>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],l.ctorParameters=function(){return[]};var u={title:"Analysis",roles:[s.ROLE_USER]},d=[{path:"analysis",component:l,canActivate:[o.AuthGuardService],data:u}],m=function(){};m.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[n.CommonModule,i.RouterModule.forChild(d)],exports:[i.RouterModule]}]}];var h=function(){function e(e){this.processService=e,this.importDone=new t.EventEmitter,this.enumHeatmapOptions=["count","duration"],this.initialized=!1}return e.prototype.ngOnInit=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(t){e.processDefinitions=t,e.processDefinitionKey||0===t.length||(e.processDefinitionKey=t[0].key,e.loadProcessDefinitionFromKey(e.processDefinitionKey))})),this.createBpmnViewerInstance()},e.prototype.createBpmnViewerInstance=function(){var e=this;this.bpmnJS=new c,this.bpmnJS.on("import.done",(function(t){if(!t.error&&!e.initialized){var n=e.bpmnJS.get("canvas"),i=e.bpmnJS.get("eventBus");e.processDiagram.historicActivityInstances&&e.processDiagram.historicActivityInstances.forEach((function(e){"multiInstanceBody"!==e.activityType&&n.addMarker(e.activityId,e.endTime?"highlight-overlay-past":"highlight-overlay-current")})),n.zoom("fit-viewport","auto"),e.processDefinitionVersions&&(i.on("canvas.init",(function(){e.showHeatmap&&e.clearHeatmap(),e.loadHeatmapData()})),i.on("canvas.viewbox.changing",(function(){e.showHeatmap&&e.clearHeatmap()})),i.on("canvas.viewbox.changed",(function(){e.loadHeatmapData()}))),e.initialized=!0}e.clearHeatmap(),e.showHeatmap&&e.loadHeatmapData()}))},e.prototype.ngOnDestroy=function(){this.bpmnJS&&this.bpmnJS.destroy()},e.prototype.loadProcessDefinition=function(e){var t=this;this.processService.getProcessDefinition(e).subscribe((function(e){t.heatmapOption=t.enumHeatmapOptions[0],t.version=e.version,t.loadProcessDefinitionXml(e.id)}))},e.prototype.loadProcessDefinitionVersions=function(e){var t=this;this.processService.getProcessDefinitionVersions(e).subscribe((function(e){t.processDefinitionVersions=e}))},e.prototype.loadProcessDefinitionFromKey=function(e){this.loadProcessDefinitionVersions(e),this.loadProcessDefinition(e)},e.prototype.loadProcessDefinitionXml=function(e){var t=this;this.processService.getProcessDefinitionXml(e).subscribe((function(e){t.processDiagram=e,t.bpmnJS.importXML(t.processDiagram.bpmn20Xml),t.bpmnJS.attachTo(t.el.nativeElement)}))},e.prototype.loadProcessDefinitionHeatmapCount=function(e){var t=this;this.processService.getProcessHeatmapCount(e).subscribe((function(e){t.inputData=e,t.valueKey="totalCount",t.heatPoints={data:[]},t.min=0,t.max=0,Object.keys(t.inputData).forEach((function(e){var n=t.el.nativeElement.querySelector("svg").getBoundingClientRect(),i=t.el.nativeElement.querySelector("g[data-element-id="+e+"]").getBoundingClientRect();t.setMax(e),t.heatPoints.data.push({x:Math.round(i.x-n.x+i.width/2),y:Math.round(i.y-n.y+i.height/2),value:t.inputData[e][t.valueKey],radius:i.width/2}),t.addCounterActiveOverlays(e,t.inputData)})),t.clearHeatmap(),t.showHeatmap&&t.loadHeatmap()}))},e.prototype.onWindowResize=function(){var e=this.el.nativeElement.querySelector("canvas[class=heatmap-canvas]");e&&(e.remove(),this.heatMapInstance=null),this.showHeatmap&&this.loadHeatmap()},e.prototype.loadProcessDefinitionHeatmapDuration=function(e){var t=this;this.processService.getProcessHeatmapDuration(e).subscribe((function(e){t.inputData=e,t.valueKey="averageDurationInMilliseconds",t.heatPoints={data:[]},t.min=0,t.max=0,Object.keys(t.inputData).forEach((function(e){var n=t.el.nativeElement.querySelector("svg").getBoundingClientRect(),i=t.el.nativeElement.querySelector("g[data-element-id="+e+"]").getBoundingClientRect();t.setMax(e),t.heatPoints.data.push({x:Math.round(i.x-n.x+i.width/2),y:Math.round(i.y-n.y+i.height/2),value:t.inputData[e][t.valueKey],radius:i.width/2}),t.addCounterActiveOverlays(e,t.inputData)})),t.clearHeatmap(),t.showHeatmap&&t.loadHeatmap()}))},e.prototype.setProcessDefinitionKey=function(e){this.processDefinitionKey=e,this.loadProcessDefinitionFromKey(this.processDefinitionKey)},e.prototype.setProcessDefinitionVersion=function(e){this.version=+e,this.loadHeatmapData()},e.prototype.setHeatmapOption=function(e){this.heatmapOption=e,this.loadHeatmapData()},e.prototype.toggleShowHeatmap=function(){this.showHeatmap=!this.showHeatmap,this.loadHeatmapData()},e.prototype.loadHeatmap=function(){this.heatMapInstance||(this.heatMapInstance=p.create({radius:54,blur:.7,maxOpacity:.4,minOpacity:0,container:this.el.nativeElement}),this.el.nativeElement.querySelector("canvas[class=heatmap-canvas]").style.zIndex=1);this.heatMapInstance.setData({min:this.min,max:this.max,data:this.heatPoints.data})},e.prototype.clearHeatmap=function(){this.heatMapInstance&&this.heatMapInstance.setData({data:[]})},e.prototype.loadHeatmapData=function(){var e=this;this.processDefinition=this.processDefinitionVersions.find((function(t){return t.version===e.version})),"count"===this.heatmapOption&&this.loadProcessDefinitionHeatmapCount(this.processDefinition),"duration"===this.heatmapOption&&this.loadProcessDefinitionHeatmapDuration(this.processDefinition)},e.prototype.setMax=function(e){"averageDurationInMilliseconds"===this.valueKey?this.max=Math.max(this.inputData[e].averageDurationInMilliseconds,this.max):"totalCount"===this.valueKey&&(this.max=Math.max(this.inputData[e].totalCount+this.inputData[e].count,this.max))},e.prototype.addCounterActiveOverlays=function(e,t){this.bpmnJS.get("overlays").add(e,{position:{bottom:13,left:-12},show:{minZoom:0,maxZoom:5},html:'<span class="badge badge-pill badge-primary">'+t[e].count+"</span>"})},e}();h.decorators=[{type:t.Component,args:[{selector:"valtimo-analyse-process-diagram",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="container-fluid">\n <div class="row p-4 bg-light options">\n <div class="col-sm-3">\n <label><strong>Process</strong></label\n ><br />\n <select class="form-control" (change)="setProcessDefinitionKey($event.target.value)">\n <option\n *ngFor="let processDefinition of processDefinitions"\n [value]="processDefinition.key"\n [selected]="processDefinitionKey === processDefinition.key"\n >\n {{ processDefinition.name }}\n </option>\n </select>\n </div>\n <div class="col-sm-1">\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-sm-3" *ngIf="showHeatmap">\n <label><strong>Heatmap type</strong></label\n ><br />\n <select class="form-control w-sm-50" (change)="setHeatmapOption($event.target.value)">\n <option\n *ngFor="let option of enumHeatmapOptions"\n [value]="option"\n [selected]="option === heatmapOption"\n >\n {{ option | titlecase }}\n </option>\n </select>\n </div>\n <div\n class="text-sm-right col-sm-3"\n [ngClass]="{\'offset-sm-2\': showHeatmap, \'offset-sm-5\': !showHeatmap}"\n >\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 class="row p-4 bg-white">\n <div class="col">\n <div #ref (window:resize)="onWindowResize()" class="diagram-container"></div>\n </div>\n </div>\n</div>\n\n<div 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',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:58vh}.container-fluid{border:1px solid #dee2e6}.options{border-bottom:1px solid #dee2e6}']}]}],h.ctorParameters=function(){return[{type:a.ProcessService}]},h.propDecorators={el:[{type:t.ViewChild,args:["ref"]}],importDone:[{type:t.Output}]};var f=function(){};f.decorators=[{type:t.NgModule,args:[{declarations:[l,h],imports:[n.CommonModule,m,a.ProcessModule,r.WidgetModule],exports:[l]}]}],e.AnalyseComponent=l,e.AnalyseModule=f,e.ɵa=h,e.ɵb=m,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=valtimo-analyse.umd.min.js.map