@processmaker/modeler 1.39.29 → 1.39.31
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.
- package/dist/img/{spinner.020b98db.svg → spinner.1e5b7f57.svg} +1 -1
- package/dist/modeler.common.js +271 -107
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +271 -107
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +4 -4
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/spinner.svg +1 -1
- package/src/components/inspectors/LoadingPreview.vue +9 -26
- package/src/components/inspectors/MessageSelect.vue +1 -1
- package/src/components/inspectors/NoPreviewAvailable.vue +10 -28
- package/src/components/inspectors/preview_panel.scss +29 -1
- package/src/components/modeler/Modeler.vue +4 -0
- package/src/components/nodes/errorEndEvent/index.js +3 -1
- package/src/components/nodes/messageEventDefinition/index.js +13 -1
- package/src/components/nodes/sequenceFlow/index.js +15 -0
- package/src/components/railBottom/RailBottom.vue +2 -0
- package/src/components/topRail/multiplayerViewUsers/MultiplayerViewUsers.vue +4 -1
- package/src/multiplayer/multiplayer.js +46 -14
package/package.json
CHANGED
package/src/assets/spinner.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
3
|
<circle cx="50" cy="50" fill="none" stroke="#1572c2" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">
|
|
4
4
|
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"/>
|
|
5
5
|
</circle>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<img id="preview-
|
|
2
|
+
<div class="preview-placeholder">
|
|
3
|
+
<img id="preview-image" :src="previewAsset" alt="Preview Asset">
|
|
4
4
|
<h1>The preview is loading</h1>
|
|
5
5
|
<h2>Some assets can take some time to load</h2>
|
|
6
6
|
|
|
@@ -20,29 +20,12 @@ export default {
|
|
|
20
20
|
};
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
<style scoped
|
|
24
|
-
.no-preview {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
padding: 5px;
|
|
30
|
-
}
|
|
31
|
-
#preview-asset {
|
|
32
|
-
width: 200px;
|
|
33
|
-
padding-bottom: 150px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.no-preview h1 {
|
|
37
|
-
text-align: center;
|
|
38
|
-
font-weight: bold;
|
|
39
|
-
font-size: xx-large;
|
|
40
|
-
margin-bottom: 50px;
|
|
41
|
-
}
|
|
23
|
+
<style lang="scss" src="./preview_panel.scss" scoped />
|
|
42
24
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
<style scoped>
|
|
26
|
+
#preview-image {
|
|
27
|
+
width: 130px;
|
|
28
|
+
margin-top: 50px;
|
|
29
|
+
margin-bottom: 50px;
|
|
30
|
+
}
|
|
48
31
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<img :src="noPreviewImg" alt="no preview">
|
|
2
|
+
<div class="preview-placeholder">
|
|
3
|
+
<img id="preview-image" :src="noPreviewImg" alt="no preview">
|
|
4
4
|
<h1>No Resource Assigned</h1>
|
|
5
|
-
<h2>This is a placeholder. Please, assign a resource to this task.</h2>
|
|
5
|
+
<h2>This is a placeholder screen. Please, assign a resource to this task.</h2>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
@@ -17,31 +17,13 @@ export default {
|
|
|
17
17
|
};
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<style scoped>
|
|
21
|
-
.no-preview {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
align-items: center;
|
|
26
|
-
color: #44494E;
|
|
27
|
-
padding: 5px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.no-preview img {
|
|
31
|
-
max-width: 50%;
|
|
32
|
-
width: auto;
|
|
33
|
-
padding-bottom: 150px;
|
|
34
|
-
}
|
|
35
20
|
|
|
36
|
-
.
|
|
37
|
-
text-align: center;
|
|
38
|
-
font-weight: bold;
|
|
39
|
-
font-size: xx-large;
|
|
40
|
-
margin-bottom: 50px;
|
|
41
|
-
}
|
|
21
|
+
<style lang="scss" src="./preview_panel.scss" scoped />
|
|
42
22
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
23
|
+
<style scoped>
|
|
24
|
+
#preview-image {
|
|
25
|
+
width: 200px;
|
|
26
|
+
margin-top:50px;
|
|
27
|
+
margin-bottom: 50px;
|
|
28
|
+
}
|
|
47
29
|
</style>
|
|
@@ -15,7 +15,7 @@ $inspector-column-min-width: 200px;
|
|
|
15
15
|
min-width: $inspector-column-min-width;
|
|
16
16
|
resize: both;
|
|
17
17
|
overflow:auto;
|
|
18
|
-
background-color: #
|
|
18
|
+
background-color: #fff;
|
|
19
19
|
border-left: 8px solid #EBEEF2;
|
|
20
20
|
z-index: 2;
|
|
21
21
|
}
|
|
@@ -63,3 +63,31 @@ $inspector-column-min-width: 200px;
|
|
|
63
63
|
text-align: center;
|
|
64
64
|
color: #6c757d;
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
.preview-placeholder {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 5px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.preview-placeholder h1 {
|
|
76
|
+
text-align: center;
|
|
77
|
+
margin-bottom: 30px;
|
|
78
|
+
font-family: "Open Sans", sans-serif;
|
|
79
|
+
font-size: 32px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
line-height: 38px;
|
|
82
|
+
letter-spacing: -0.04em;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.preview-placeholder h2 {
|
|
86
|
+
text-align: center;
|
|
87
|
+
margin-bottom: 50px;
|
|
88
|
+
font-family: "Open Sans", sans-serif;
|
|
89
|
+
font-size: 18px;
|
|
90
|
+
font-weight: 400;
|
|
91
|
+
line-height: 27px;
|
|
92
|
+
letter-spacing: -0.02em;
|
|
93
|
+
}
|
|
@@ -1172,6 +1172,8 @@ export default {
|
|
|
1172
1172
|
config: node.definition.config,
|
|
1173
1173
|
loopCharacteristics: null,
|
|
1174
1174
|
gatewayDirection: null,
|
|
1175
|
+
messageRef: null,
|
|
1176
|
+
extras: {},
|
|
1175
1177
|
};
|
|
1176
1178
|
if (node?.pool?.component) {
|
|
1177
1179
|
defaultData['poolId'] = node.pool.component.id;
|
|
@@ -1199,6 +1201,8 @@ export default {
|
|
|
1199
1201
|
sourceRefId,
|
|
1200
1202
|
targetRefId,
|
|
1201
1203
|
waypoint: node.diagram.waypoint,
|
|
1204
|
+
name: node.definition.name,
|
|
1205
|
+
conditionExpression: null,
|
|
1202
1206
|
};
|
|
1203
1207
|
|
|
1204
1208
|
if (isProcessRequested) {
|
|
@@ -52,7 +52,7 @@ export default merge(cloneDeep(endEventConfig), {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
multiplayerInspectorHandler(node, data){
|
|
55
|
+
multiplayerInspectorHandler(node, data, setNodeProp) {
|
|
56
56
|
const keys = Object.keys(data).filter((key) => key !== 'id');
|
|
57
57
|
if (keys[0] === 'eventDefinitions') {
|
|
58
58
|
const error = data[keys[0]][0].errorRef;
|
|
@@ -62,7 +62,9 @@ export default merge(cloneDeep(endEventConfig), {
|
|
|
62
62
|
errorRef.name = error.name;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
return;
|
|
65
66
|
}
|
|
67
|
+
setNodeProp(node, keys[0], data[keys[0]]);
|
|
66
68
|
},
|
|
67
69
|
inspectorConfig: [
|
|
68
70
|
{
|
|
@@ -34,8 +34,9 @@ export default {
|
|
|
34
34
|
});
|
|
35
35
|
setNodeProp(node, key, value[key]);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
let message = definitions.rootElements.find(element => element.id === value.messageRef);
|
|
39
|
+
|
|
39
40
|
if (!message && value.messageRef) {
|
|
40
41
|
message = moddle.create('bpmn:Message', {
|
|
41
42
|
id: value.messageRef,
|
|
@@ -44,5 +45,16 @@ export default {
|
|
|
44
45
|
definitions.rootElements.push(message);
|
|
45
46
|
}
|
|
46
47
|
node.definition.get('eventDefinitions')[0].messageRef = message;
|
|
48
|
+
|
|
49
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-updateInspectorProperty', {
|
|
50
|
+
id: node.definition.id,
|
|
51
|
+
key: 'messageRef',
|
|
52
|
+
value: value.messageRef,
|
|
53
|
+
extras: {
|
|
54
|
+
messageName: message?.name,
|
|
55
|
+
allowedUsers: node.definition.get('allowedUsers'),
|
|
56
|
+
allowedGroups: node.definition.get('allowedGroups'),
|
|
57
|
+
},
|
|
58
|
+
});
|
|
47
59
|
},
|
|
48
60
|
};
|
|
@@ -52,6 +52,9 @@ export default {
|
|
|
52
52
|
// Set the condition expression IFF the expresion body changed
|
|
53
53
|
if (definition[key].body !== value[key]) {
|
|
54
54
|
const conditionExpression = moddle.create('bpmn:FormalExpression', { body: value[key] });
|
|
55
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-updateInspectorProperty', {
|
|
56
|
+
id: node.definition.id , key, value: [conditionExpression],
|
|
57
|
+
});
|
|
55
58
|
setNodeProp(node, key, conditionExpression);
|
|
56
59
|
}
|
|
57
60
|
} else {
|
|
@@ -62,6 +65,18 @@ export default {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
},
|
|
68
|
+
multiplayerInspectorHandler(node, data, setNodeProp, moddle) {
|
|
69
|
+
const keys = Object.keys(data).filter((key) => key !== 'id');
|
|
70
|
+
if (keys.length === 0) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (keys[0] === 'conditionExpression') {
|
|
74
|
+
const conditionExpression = moddle.create('bpmn:FormalExpression', { body: data[keys[0]][0].body });
|
|
75
|
+
setNodeProp(node, keys[0], conditionExpression);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setNodeProp(node, keys[0], data[keys[0]]);
|
|
79
|
+
},
|
|
65
80
|
inspectorConfig: [
|
|
66
81
|
{
|
|
67
82
|
name: 'Sequence Flow',
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
:style="[overlap ? { width: 'auto'} : { width: '100%'}]"
|
|
23
23
|
>
|
|
24
24
|
<UndoRedoControl
|
|
25
|
+
v-if="!isMultiplayer"
|
|
25
26
|
v-show="showComponent"
|
|
26
27
|
:is-rendering="isRendering"
|
|
27
28
|
@load-xml="$emit('load-xml')"
|
|
@@ -117,6 +118,7 @@ export default {
|
|
|
117
118
|
showComponent() {
|
|
118
119
|
return store.getters.showComponent;
|
|
119
120
|
},
|
|
121
|
+
isMultiplayer: () => store.getters.isMultiplayer,
|
|
120
122
|
},
|
|
121
123
|
async mounted() {
|
|
122
124
|
await nextTick();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<b-avatar-group class="container">
|
|
2
|
+
<b-avatar-group class="container" v-if="!isMultiplayer">
|
|
3
3
|
<template v-for="item in filteredPlayers" >
|
|
4
4
|
<Avatar :badgeBackgroundColor="item.color" :imgSrc="item.avatar" :userName="item.name" :key="item.key"/>
|
|
5
5
|
</template>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
<script>
|
|
10
10
|
import { uniqBy } from 'lodash';
|
|
11
11
|
import Avatar from '@/components/topRail/multiplayerViewUsers/avatar/Avatar';
|
|
12
|
+
import store from '@/store';
|
|
13
|
+
|
|
12
14
|
export default {
|
|
13
15
|
components:{
|
|
14
16
|
Avatar,
|
|
@@ -26,6 +28,7 @@ export default {
|
|
|
26
28
|
return player.name.toLowerCase() !== window.ProcessMaker.user?.fullName.toLowerCase();
|
|
27
29
|
});
|
|
28
30
|
},
|
|
31
|
+
isMultiplayer: () => store.getters.isMultiplayer,
|
|
29
32
|
},
|
|
30
33
|
};
|
|
31
34
|
</script>
|
|
@@ -56,7 +56,6 @@ export default class Multiplayer {
|
|
|
56
56
|
};
|
|
57
57
|
this.modeler.addPlayer(newPlayer);
|
|
58
58
|
});
|
|
59
|
-
this.syncLocalNodes(this.clientIO.id);
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
61
|
|
|
@@ -68,10 +67,9 @@ export default class Multiplayer {
|
|
|
68
67
|
});
|
|
69
68
|
|
|
70
69
|
this.clientIO.on('requestProcess', (payload) => {
|
|
71
|
-
const {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (firstClient.id === this.clientIO.id) {
|
|
70
|
+
const { clientId } = payload;
|
|
71
|
+
// Sync the local Nodes
|
|
72
|
+
if (clientId) {
|
|
75
73
|
this.syncLocalNodes(clientId);
|
|
76
74
|
}
|
|
77
75
|
});
|
|
@@ -171,7 +169,7 @@ export default class Multiplayer {
|
|
|
171
169
|
}
|
|
172
170
|
/**
|
|
173
171
|
* Sync the modeler nodes with the microservice
|
|
174
|
-
* @param {String} clientId
|
|
172
|
+
* @param {String} clientId
|
|
175
173
|
*/
|
|
176
174
|
syncLocalNodes(clientId){
|
|
177
175
|
// Get the process definition
|
|
@@ -481,6 +479,10 @@ export default class Multiplayer {
|
|
|
481
479
|
}
|
|
482
480
|
nodeToUpdate.set(data.key, newValue);
|
|
483
481
|
|
|
482
|
+
if (data.extras && Object.keys(data.extras).length > 0) {
|
|
483
|
+
nodeToUpdate.set('extras', data.extras);
|
|
484
|
+
}
|
|
485
|
+
|
|
484
486
|
const stateUpdate = Y.encodeStateAsUpdate(this.yDoc);
|
|
485
487
|
// Send the update to the web socket server
|
|
486
488
|
this.clientIO.emit('updateFromInspector', { updateDoc: stateUpdate, isReplaced: false });
|
|
@@ -503,6 +505,11 @@ export default class Multiplayer {
|
|
|
503
505
|
node = this.getNodeById(data.id);
|
|
504
506
|
|
|
505
507
|
if (node) {
|
|
508
|
+
let extras = {};
|
|
509
|
+
// extras property section
|
|
510
|
+
if (data.extras && Object.keys(data.extras).length > 0) {
|
|
511
|
+
extras = data.extras;
|
|
512
|
+
}
|
|
506
513
|
// loopCharacteristics property section
|
|
507
514
|
if (data.loopCharacteristics) {
|
|
508
515
|
const loopCharacteristics = JSON.parse(data.loopCharacteristics);
|
|
@@ -515,22 +522,47 @@ export default class Multiplayer {
|
|
|
515
522
|
}, node, this.setNodeProp, this.modeler.moddle, this.modeler.definitions, false);
|
|
516
523
|
return;
|
|
517
524
|
}
|
|
518
|
-
if (this.modeler.nodeRegistry[node.type]
|
|
519
|
-
this.modeler.nodeRegistry[node.type].multiplayerInspectorHandler(node, data);
|
|
525
|
+
if (this.modeler.nodeRegistry[node.type]?.multiplayerInspectorHandler) {
|
|
526
|
+
this.modeler.nodeRegistry[node.type].multiplayerInspectorHandler(node, data,this.setNodeProp, this.modeler.moddle);
|
|
520
527
|
return;
|
|
521
528
|
}
|
|
522
529
|
const keys = Object.keys(data).filter((key) => key !== 'id');
|
|
530
|
+
const key = keys[0];
|
|
531
|
+
const value = data[key];
|
|
523
532
|
|
|
524
|
-
if (
|
|
525
|
-
node.definition.get('eventDefinitions')[0].get('condition').body =
|
|
533
|
+
if (key === 'condition') {
|
|
534
|
+
node.definition.get('eventDefinitions')[0].get('condition').body = value;
|
|
526
535
|
}
|
|
527
536
|
|
|
528
|
-
if (
|
|
529
|
-
node.definition.set('gatewayDirection',
|
|
537
|
+
if (key === 'gatewayDirection') {
|
|
538
|
+
node.definition.set('gatewayDirection', value);
|
|
530
539
|
}
|
|
531
540
|
|
|
532
|
-
|
|
533
|
-
|
|
541
|
+
if (key === 'messageRef') {
|
|
542
|
+
let message = this.modeler.definitions.rootElements.find(element => element.id === value);
|
|
543
|
+
|
|
544
|
+
if (!message) {
|
|
545
|
+
message = this.modeler.moddle.create('bpmn:Message', {
|
|
546
|
+
id: value,
|
|
547
|
+
name: extras?.messageName || value,
|
|
548
|
+
});
|
|
549
|
+
this.modeler.definitions.rootElements.push(message);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
node.definition.get('eventDefinitions')[0].messageRef = message;
|
|
534
553
|
|
|
554
|
+
if (extras?.allowedUsers) {
|
|
555
|
+
node.definition.set('allowedUsers', extras.allowedUsers);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if (extras?.allowedGroups) {
|
|
559
|
+
node.definition.set('allowedGroups', extras.allowedGroups);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (!['messageRef', 'gatewayDirection', 'condition', 'allowedUsers', 'allowedGroups'].includes(key)) {
|
|
564
|
+
store.commit('updateNodeProp', { node, key, value });
|
|
565
|
+
}
|
|
566
|
+
}
|
|
535
567
|
}
|
|
536
568
|
}
|