@processmaker/modeler 1.32.0 → 1.34.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.
- package/README.md +7 -0
- package/babel.config.js +1 -2
- package/cypress.json +1 -1
- package/dist/img/inclusive-gateway.0f0afffd.svg +4 -0
- package/dist/img/inspector.42e5d40d.svg +5 -0
- package/dist/modeler.common.js +3220 -4350
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +3220 -4350
- 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/.DS_Store +0 -0
- package/src/ModelerApp.vue +0 -13
- package/src/NodeIdGenerator.js +16 -1
- package/src/assets/inspector.svg +5 -0
- package/src/assets/toolpanel/inclusive-gateway.svg +2 -2
- package/src/components/controls/controls.vue +2 -11
- package/src/components/crown/crownButtons/addLaneAboveButton.vue +3 -1
- package/src/components/crown/crownButtons/addLaneBelowButton.vue +3 -1
- package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +2 -1
- package/src/components/crown/crownButtons/genericFlowButton.vue +2 -1
- package/src/components/crown/crownButtons/icons/faAlignBottom.js +3 -3
- package/src/components/crown/crownButtons/icons/faAlignLeft.js +3 -3
- package/src/components/crown/crownButtons/icons/faAlignRight.js +3 -3
- package/src/components/crown/crownButtons/icons/faAlignTop.js +3 -3
- package/src/components/crown/crownButtons/icons/faCenterHorizontally.js +3 -3
- package/src/components/crown/crownButtons/icons/faCenterVertically.js +3 -3
- package/src/components/crown/crownButtons/icons/faDistributeHorizontally.js +3 -3
- package/src/components/crown/crownButtons/icons/faDistributeVertically.js +3 -3
- package/src/components/crown/crownMultiselect/crownAlign.vue +3 -0
- package/src/components/crown/crownMultiselect/crownMultiselect.vue +7 -5
- package/src/components/highlightColors.js +8 -0
- package/src/components/inspectors/InspectorPanel.vue +26 -3
- package/src/components/inspectors/inspector.scss +11 -0
- package/src/components/inspectors/inspectorButton/InspectorButton.vue +38 -0
- package/src/components/inspectors/inspectorButton/inspectorButton.scss +20 -0
- package/src/components/inspectors/process.js +1 -1
- package/src/components/modeler/Modeler.vue +102 -5
- package/src/components/modeler/Selection.vue +9 -1
- package/src/components/nodes/association/index.js +1 -1
- package/src/components/nodes/baseStartEvent/index.js +1 -1
- package/src/components/nodes/boundaryEvent/index.js +1 -1
- package/src/components/nodes/dataInputAssociation/index.js +1 -1
- package/src/components/nodes/dataObject/index.js +1 -1
- package/src/components/nodes/dataOutputAssociation/index.js +1 -1
- package/src/components/nodes/dataStore/index.js +1 -1
- package/src/components/nodes/endEvent/index.js +1 -1
- package/src/components/nodes/eventBasedGateway/index.js +1 -1
- package/src/components/nodes/exclusiveGateway/index.js +1 -1
- package/src/components/nodes/gateway/index.js +1 -1
- package/src/components/nodes/inclusiveGateway/index.js +1 -1
- package/src/components/nodes/index.js +0 -1
- package/src/components/nodes/intermediateEvent/index.js +1 -1
- package/src/components/nodes/intermediateMessageEvent/index.js +1 -1
- package/src/components/nodes/intermediateTimerEvent/index.js +1 -1
- package/src/components/nodes/manualTask/index.js +1 -1
- package/src/components/nodes/messageFlow/index.js +1 -1
- package/src/components/nodes/parallelGateway/index.js +1 -1
- package/src/components/nodes/pool/index.js +1 -1
- package/src/components/nodes/pool/pool.vue +10 -4
- package/src/components/nodes/poolLane/index.js +1 -1
- package/src/components/nodes/scriptTask/index.js +1 -1
- package/src/components/nodes/sequenceFlow/index.js +1 -1
- package/src/components/nodes/serviceTask/index.js +1 -1
- package/src/components/nodes/subProcess/index.js +1 -1
- package/src/components/nodes/task/index.js +1 -1
- package/src/components/nodes/textAnnotation/index.js +1 -1
- package/src/components/railBottom/RailBottom.vue +9 -0
- package/src/components/railBottom/controls/Controls.vue +22 -2
- package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +9 -7
- package/src/components/railBottom/controls/controls.scss +2 -0
- package/src/components/railBottom/miniPaperControl/miniPaperControl.scss +1 -0
- package/src/components/railBottom/railBottom.scss +2 -0
- package/src/components/railBottom/zoomControl/ZoomControl.vue +1 -3
- package/src/components/rails/explorer-rail/explorer-rail.scss +11 -0
- package/src/components/rails/explorer-rail/explorer.vue +14 -5
- package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +18 -3
- package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +6 -1
- package/src/components/rails/explorer-rail/pmBlocksLoop/pmBlocksLoop.vue +86 -0
- package/src/components/shapeStackUtils.js +1 -1
- package/src/components/toolbar/ToolBar.vue +49 -39
- package/src/components/toolbar/toolbar.scss +78 -15
- package/src/components/topRail/TopRail.vue +1 -0
- package/src/components/topRail/validateControl/validateButton/ValidateButton.vue +3 -0
- package/src/components/topRail/validateControl/validateIssue/ValidateIssue.vue +1 -0
- package/src/components/topRail/validateControl/validatePanel/ValidatePanel.vue +4 -1
- package/src/components/topRail/validateControl/validatePanel/validatePanel.scss +1 -1
- package/src/mixins/clickAndDrop.js +17 -10
- package/src/mixins/highlightConfig.js +35 -8
- package/src/mixins/linkConfig.js +33 -6
- package/src/nodeTypesStore.js +36 -1
- package/src/setup/registerPmBlock.js +0 -0
- package/src/store.js +1 -0
- package/vue.config.js +1 -0
- package/dist/.DS_Store +0 -0
- package/dist/img/distribute-horizontally-icon.5c513cf4.svg +0 -3
- package/dist/img/distribute-vertically-icon.a35fb699.svg +0 -3
- package/dist/img/inclusive-gateway.754cb36f.svg +0 -4
- package/src/components/controls/rankConstants.js +0 -1
- package/src/components/modeler/ModelerReadonly.vue +0 -1011
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$toolbar-background-color: #fff;
|
|
2
2
|
|
|
3
3
|
.toolbar {
|
|
4
|
-
z-index:
|
|
4
|
+
z-index: 3;
|
|
5
5
|
height: $toolbar-height;
|
|
6
6
|
cursor: auto;
|
|
7
7
|
width: 100%;
|
|
@@ -10,14 +10,61 @@ $toolbar-background-color: #fff;
|
|
|
10
10
|
> button {
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
}
|
|
13
|
-
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
&-item {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
font-family: "Open Sans";
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
color: #000000;
|
|
23
|
+
text-transform: capitalize;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-version-status {
|
|
27
|
+
margin: 0 12px;
|
|
28
|
+
padding-left: 12px;
|
|
29
|
+
border-left: 1px solid #ADB3B8;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
color: #6C757D;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-loading-status {
|
|
35
|
+
margin-right: 21px;
|
|
36
|
+
|
|
37
|
+
> svg {
|
|
38
|
+
margin-left: 5px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-publish {
|
|
43
|
+
width: 72px;
|
|
44
|
+
height: 30px;
|
|
45
|
+
margin-right: 21px;
|
|
46
|
+
background-color: #1572C2;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
color: #FFFFFF !important;
|
|
49
|
+
text-transform: uppercase;
|
|
50
|
+
text-decoration: none !important;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
outline: none;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: #065c9d;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&-close {
|
|
60
|
+
width: 42px;
|
|
61
|
+
height: 22px;
|
|
62
|
+
margin-right: 21px;
|
|
63
|
+
color: #000000 !important;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
text-decoration: none !important;
|
|
67
|
+
}
|
|
21
68
|
}
|
|
22
69
|
|
|
23
70
|
.text-black {
|
|
@@ -28,14 +75,30 @@ $toolbar-background-color: #fff;
|
|
|
28
75
|
cursor: default !important;
|
|
29
76
|
}
|
|
30
77
|
|
|
31
|
-
.btn-autosave {
|
|
32
|
-
display: flex;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
align-items: center;
|
|
35
|
-
border-radius: 4px !important;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
78
|
.btn-ellipsis {
|
|
39
79
|
border-top-left-radius: 4px !important;
|
|
40
80
|
border-bottom-left-radius: 4px !important;
|
|
41
81
|
}
|
|
82
|
+
|
|
83
|
+
.save-button {
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
align-items: center;
|
|
87
|
+
height: 32px;
|
|
88
|
+
background-color: #6C757D;
|
|
89
|
+
border: 0 none;
|
|
90
|
+
border-radius: 4px;
|
|
91
|
+
transition: background-color 0.3s ease;
|
|
92
|
+
color: #ffffff;
|
|
93
|
+
&:active {
|
|
94
|
+
background-color: #5A6268;
|
|
95
|
+
}
|
|
96
|
+
&-label {
|
|
97
|
+
padding-left: 0.4em;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.divider {
|
|
101
|
+
border-left: 1px solid #6C757D;
|
|
102
|
+
height: 80%;
|
|
103
|
+
padding-left: 11px;
|
|
104
|
+
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
type="button"
|
|
4
4
|
@click.prevent="handleOpen"
|
|
5
5
|
:class="['validate-button', { 'validate-button-active': isOpen }]"
|
|
6
|
+
:title="$t('Auto validate')"
|
|
7
|
+
v-b-tooltip.hover.viewport.d50="{ customClass: 'no-pointer-events' }"
|
|
8
|
+
data-cy="validate-button"
|
|
6
9
|
>
|
|
7
10
|
<inline-svg :src="isOpen ? validateOpenIcon : validateCloseIcon" />
|
|
8
11
|
</button>
|
|
@@ -26,12 +26,7 @@ export default {
|
|
|
26
26
|
this.setDraggingPosition(event);
|
|
27
27
|
// Deselect control on click if same control is already selected
|
|
28
28
|
if (this.selectedItem && (this.selectedItem.type === control.type)) {
|
|
29
|
-
|
|
30
|
-
document.body.removeChild(this.movedElement);
|
|
31
|
-
this.$emit('onSetCursor', 'none');
|
|
32
|
-
nodeTypesStore.commit('clearSelectedNode');
|
|
33
|
-
nodeTypesStore.commit('setGhostNode', null);
|
|
34
|
-
this.wasClicked = false;
|
|
29
|
+
this.deselect();
|
|
35
30
|
return;
|
|
36
31
|
}
|
|
37
32
|
this.wasClicked = true;
|
|
@@ -51,6 +46,7 @@ export default {
|
|
|
51
46
|
this.onCreateElement(message);
|
|
52
47
|
nodeTypesStore.commit('clearSelectedNode');
|
|
53
48
|
nodeTypesStore.commit('setGhostNode', null);
|
|
49
|
+
this.$emit('onSetCursor', 'none');
|
|
54
50
|
});
|
|
55
51
|
},
|
|
56
52
|
onCreateElement(event){
|
|
@@ -59,15 +55,16 @@ export default {
|
|
|
59
55
|
this.parent = null;
|
|
60
56
|
}
|
|
61
57
|
this.$emit('onCreateElement', { event, control: this.selectedItem });
|
|
62
|
-
this.$emit('onSetCursor', 'none');
|
|
63
|
-
event.preventDefault();
|
|
64
58
|
this.wasClicked = false;
|
|
59
|
+
event.preventDefault();
|
|
65
60
|
}
|
|
66
61
|
},
|
|
67
62
|
setDraggingPosition({ pageX, pageY }) {
|
|
68
63
|
let tempGhost = this.movedElement;
|
|
69
|
-
tempGhost
|
|
70
|
-
|
|
64
|
+
if (tempGhost) {
|
|
65
|
+
tempGhost.style.left = `${pageX}px`;
|
|
66
|
+
tempGhost.style.top = `${pageY}px`;
|
|
67
|
+
}
|
|
71
68
|
nodeTypesStore.commit('setGhostNode', tempGhost);
|
|
72
69
|
},
|
|
73
70
|
createDraggingHelper(event, control) {
|
|
@@ -88,6 +85,16 @@ export default {
|
|
|
88
85
|
this.xOffset = event.clientX - sourceElement.getBoundingClientRect().left;
|
|
89
86
|
this.yOffset = event.clientY - sourceElement.getBoundingClientRect().top;
|
|
90
87
|
},
|
|
88
|
+
deselect() {
|
|
89
|
+
document.removeEventListener('mousemove', this.setDraggingPosition);
|
|
90
|
+
if (this.movedElement) {
|
|
91
|
+
document.body.removeChild(this.movedElement);
|
|
92
|
+
}
|
|
93
|
+
this.$emit('onSetCursor', 'none');
|
|
94
|
+
this.wasClicked = false;
|
|
95
|
+
nodeTypesStore.commit('clearSelectedNode');
|
|
96
|
+
nodeTypesStore.commit('setGhostNode', null);
|
|
97
|
+
},
|
|
91
98
|
},
|
|
92
99
|
computed: {
|
|
93
100
|
selectedItem() {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
1
|
import cloneDeep from 'lodash/cloneDeep';
|
|
3
2
|
import store from '@/store';
|
|
3
|
+
import {
|
|
4
|
+
COLOR_DEFAULT,
|
|
5
|
+
COLOR_ERROR,
|
|
6
|
+
COLOR_IN_PROGRESS,
|
|
7
|
+
COLOR_IN_PROGRESS_FILL,
|
|
8
|
+
COLOR_IDLE,
|
|
9
|
+
COLOR_IDLE_FILL,
|
|
10
|
+
COLOR_COMPLETED,
|
|
11
|
+
COLOR_COMPLETED_FILL,
|
|
12
|
+
} from '@/components/highlightColors.js';
|
|
4
13
|
|
|
5
14
|
const errorHighlighter = {
|
|
6
15
|
highlighter: {
|
|
@@ -8,7 +17,7 @@ const errorHighlighter = {
|
|
|
8
17
|
options: {
|
|
9
18
|
padding: 10,
|
|
10
19
|
attrs: {
|
|
11
|
-
stroke:
|
|
20
|
+
stroke: COLOR_ERROR,
|
|
12
21
|
'stroke-width': 10,
|
|
13
22
|
opacity: 0.3,
|
|
14
23
|
},
|
|
@@ -21,7 +30,7 @@ const defaultHighlighter = {
|
|
|
21
30
|
name: 'stroke',
|
|
22
31
|
options: {
|
|
23
32
|
attrs: {
|
|
24
|
-
stroke:
|
|
33
|
+
stroke: COLOR_DEFAULT,
|
|
25
34
|
'stroke-width': 3,
|
|
26
35
|
'data-cy': 'selected',
|
|
27
36
|
},
|
|
@@ -34,8 +43,8 @@ const completedHighlighter = {
|
|
|
34
43
|
name: 'stroke',
|
|
35
44
|
options: {
|
|
36
45
|
attrs: {
|
|
37
|
-
stroke:
|
|
38
|
-
'stroke-width':
|
|
46
|
+
stroke: COLOR_COMPLETED,
|
|
47
|
+
'stroke-width': 5,
|
|
39
48
|
},
|
|
40
49
|
},
|
|
41
50
|
},
|
|
@@ -46,9 +55,20 @@ const inProgressHighlighter = {
|
|
|
46
55
|
name: 'stroke',
|
|
47
56
|
options: {
|
|
48
57
|
attrs: {
|
|
49
|
-
stroke:
|
|
50
|
-
'stroke-width':
|
|
51
|
-
|
|
58
|
+
stroke: COLOR_IN_PROGRESS,
|
|
59
|
+
'stroke-width': 5,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const idleHighlighter = {
|
|
66
|
+
highlighter: {
|
|
67
|
+
name: 'stroke',
|
|
68
|
+
options: {
|
|
69
|
+
attrs: {
|
|
70
|
+
stroke: COLOR_IDLE,
|
|
71
|
+
'stroke-width': 5,
|
|
52
72
|
},
|
|
53
73
|
},
|
|
54
74
|
},
|
|
@@ -63,6 +83,7 @@ export default {
|
|
|
63
83
|
'borderOutline',
|
|
64
84
|
'isCompleted',
|
|
65
85
|
'isInProgress',
|
|
86
|
+
'isIdle',
|
|
66
87
|
],
|
|
67
88
|
data() {
|
|
68
89
|
return {
|
|
@@ -100,12 +121,18 @@ export default {
|
|
|
100
121
|
if (store.getters.isReadOnly) {
|
|
101
122
|
this.shapeView.unhighlight(this.shapeBody, completedHighlighter);
|
|
102
123
|
if (this.isCompleted) {
|
|
124
|
+
this.shape.attr('body/fill', COLOR_COMPLETED_FILL);
|
|
103
125
|
this.shapeView.highlight(this.shapeBody, completedHighlighter);
|
|
104
126
|
}
|
|
105
127
|
this.shapeView.unhighlight(this.shapeBody, inProgressHighlighter);
|
|
106
128
|
if (this.isInProgress) {
|
|
129
|
+
this.shape.attr('body/fill', COLOR_IN_PROGRESS_FILL);
|
|
107
130
|
this.shapeView.highlight(this.shapeBody, inProgressHighlighter);
|
|
108
131
|
}
|
|
132
|
+
if (this.isIdle) {
|
|
133
|
+
this.shape.attr('body/fill', COLOR_IDLE_FILL);
|
|
134
|
+
this.shapeView.highlight(this.shapeBody, idleHighlighter);
|
|
135
|
+
}
|
|
109
136
|
return;
|
|
110
137
|
}
|
|
111
138
|
|
package/src/mixins/linkConfig.js
CHANGED
|
@@ -5,6 +5,10 @@ import { invalidNodeColor, setShapeColor, validNodeColor } from '@/components/no
|
|
|
5
5
|
import { getDefaultAnchorPoint } from '@/portsUtils';
|
|
6
6
|
import resetShapeColor from '@/components/resetShapeColor';
|
|
7
7
|
import store from '@/store';
|
|
8
|
+
import {
|
|
9
|
+
COLOR_IDLE,
|
|
10
|
+
COLOR_COMPLETED,
|
|
11
|
+
} from '@/components/highlightColors.js';
|
|
8
12
|
|
|
9
13
|
const endpoints = {
|
|
10
14
|
source: 'source',
|
|
@@ -16,7 +20,7 @@ function isPoint(item) {
|
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
export default {
|
|
19
|
-
props: ['highlighted', 'paper'],
|
|
23
|
+
props: ['highlighted', 'paper', 'paperManager', 'isCompleted', 'isIdle'],
|
|
20
24
|
data() {
|
|
21
25
|
return {
|
|
22
26
|
sourceShape: null,
|
|
@@ -76,6 +80,18 @@ export default {
|
|
|
76
80
|
},
|
|
77
81
|
},
|
|
78
82
|
methods: {
|
|
83
|
+
setShapeHighlight() {
|
|
84
|
+
if (this.isCompleted) {
|
|
85
|
+
this.shape.attr({
|
|
86
|
+
line: { stroke: COLOR_COMPLETED },
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if (this.isIdle) {
|
|
90
|
+
this.shape.attr({
|
|
91
|
+
line: { stroke: COLOR_IDLE },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
},
|
|
79
95
|
findSourceShape() {
|
|
80
96
|
return this.graph.getElements().find(element => {
|
|
81
97
|
return element.component && element.component.node.definition === this.node.definition.get('sourceRef');
|
|
@@ -123,6 +139,8 @@ export default {
|
|
|
123
139
|
resetShapeColor(targetShape);
|
|
124
140
|
|
|
125
141
|
this.shape.on('change:vertices', this.onChangeVertices);
|
|
142
|
+
this.shape.listenTo(this.sourceShape, 'change:position', this.updateWaypoints);
|
|
143
|
+
this.shape.listenTo(targetShape, 'change:position', this.updateWaypoints);
|
|
126
144
|
|
|
127
145
|
const sourceShape = this.shape.getSourceElement();
|
|
128
146
|
sourceShape.embed(this.shape);
|
|
@@ -130,13 +148,15 @@ export default {
|
|
|
130
148
|
},
|
|
131
149
|
/**
|
|
132
150
|
* On Change vertices handler
|
|
133
|
-
* @param {Object} link
|
|
134
|
-
* @param {Array} vertices
|
|
135
|
-
* @param {Object} options
|
|
151
|
+
* @param {Object} link
|
|
152
|
+
* @param {Array} vertices
|
|
153
|
+
* @param {Object} options
|
|
136
154
|
*/
|
|
137
|
-
onChangeVertices(link, vertices, options){
|
|
155
|
+
async onChangeVertices(link, vertices, options){
|
|
138
156
|
if (options && options.ui) {
|
|
139
157
|
this.updateWaypoints();
|
|
158
|
+
await this.$nextTick();
|
|
159
|
+
this.$emit('save-state');
|
|
140
160
|
}
|
|
141
161
|
},
|
|
142
162
|
updateWaypoints() {
|
|
@@ -237,7 +257,6 @@ export default {
|
|
|
237
257
|
emitSave() {
|
|
238
258
|
if (this.highlighted) {
|
|
239
259
|
this.updateWaypoints.flush();
|
|
240
|
-
this.$emit('save-state');
|
|
241
260
|
document.removeEventListener('mouseup', this.emitSave);
|
|
242
261
|
this.listeningToMouseup = false;
|
|
243
262
|
}
|
|
@@ -323,6 +342,14 @@ export default {
|
|
|
323
342
|
this.shape.on('change:vertices', function() {
|
|
324
343
|
this.component.$emit('shape-resize');
|
|
325
344
|
});
|
|
345
|
+
|
|
346
|
+
if (store.getters.isReadOnly) {
|
|
347
|
+
this.$nextTick(() => {
|
|
348
|
+
this.paperManager.awaitScheduledUpdates().then(() => {
|
|
349
|
+
this.setShapeHighlight();
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
}
|
|
326
353
|
},
|
|
327
354
|
beforeDestroy() {
|
|
328
355
|
document.removeEventListener('mouseup', this.emitSave);
|
package/src/nodeTypesStore.js
CHANGED
|
@@ -10,6 +10,8 @@ export default new Vuex.Store({
|
|
|
10
10
|
nodeTypes: [],
|
|
11
11
|
pinnedNodeTypes: [],
|
|
12
12
|
filteredNodeTypes: [],
|
|
13
|
+
pmBlockNodeTypes: [],
|
|
14
|
+
filteredPmBlockNodeTypes: [],
|
|
13
15
|
explorerOpen: false,
|
|
14
16
|
searchTerm: '',
|
|
15
17
|
selectedNode: null,
|
|
@@ -21,6 +23,8 @@ export default new Vuex.Store({
|
|
|
21
23
|
getFilteredNodeTypes: state => state.filteredNodeTypes,
|
|
22
24
|
getExplorerOpen: state => state.explorerOpen,
|
|
23
25
|
getSearchTerm: state => state.searchTerm,
|
|
26
|
+
getPmBlockNodeTypes: state => state.pmBlockNodeTypes,
|
|
27
|
+
getFilteredPmBlockNodeTypes: state => state.filteredPmBlockNodeTypes,
|
|
24
28
|
getSelectedNode: state => state.selectedNode,
|
|
25
29
|
getGhostNode: state => state.ghostNode,
|
|
26
30
|
},
|
|
@@ -42,7 +46,7 @@ export default new Vuex.Store({
|
|
|
42
46
|
setPinnedNodes(state, payload) {
|
|
43
47
|
state.pinnedNodeTypes.push(payload);
|
|
44
48
|
// Remove duplicates
|
|
45
|
-
state.pinnedNodeTypes =
|
|
49
|
+
state.pinnedNodeTypes = uniqBy(state.pinnedNodeTypes, 'type');
|
|
46
50
|
state.pinnedNodeTypes.sort((node1, node2) => node1.rank - node2.rank);
|
|
47
51
|
},
|
|
48
52
|
setUnpinNode(state, payload) {
|
|
@@ -57,10 +61,41 @@ export default new Vuex.Store({
|
|
|
57
61
|
return node.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
58
62
|
});
|
|
59
63
|
},
|
|
64
|
+
setPmBlockNodeTypes(state, pmBlockNodeTypes) {
|
|
65
|
+
state.pmBlockNodeTypes = pmBlockNodeTypes
|
|
66
|
+
.filter(pmBlockNode => pmBlockNode.control)
|
|
67
|
+
.map(pmBlockNode => ({
|
|
68
|
+
id: uniqueId('pmBlockNode_'),
|
|
69
|
+
type: pmBlockNode.id,
|
|
70
|
+
icon: pmBlockNode.icon,
|
|
71
|
+
customIcon: pmBlockNode.customIcon,
|
|
72
|
+
svgIcon: pmBlockNode.svgIcon,
|
|
73
|
+
label: pmBlockNode.label,
|
|
74
|
+
description: pmBlockNode.description,
|
|
75
|
+
bpmnType: pmBlockNode.bpmnType,
|
|
76
|
+
rank: pmBlockNode.rank || BOTTOM,
|
|
77
|
+
items: pmBlockNode.items?.map(item => ({ ...item, type: item.id })),
|
|
78
|
+
}))
|
|
79
|
+
.sort((node1, node2) => node1.rank - node2.rank);
|
|
80
|
+
},
|
|
81
|
+
setFilteredPmBlockNodeTypes(state, searchTerm) {
|
|
82
|
+
// TODO: Configure Pm Block search bar
|
|
83
|
+
const pmBlockNodeTypes = state.pmBlockNodeTypes;
|
|
84
|
+
state.searchTerm = searchTerm;
|
|
85
|
+
const allNodes = uniqBy([...pmBlockNodeTypes], 'id');
|
|
86
|
+
state.filteredPmBlockNodeTypes = allNodes.filter(node => {
|
|
87
|
+
return node.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
88
|
+
});
|
|
89
|
+
},
|
|
60
90
|
clearFilteredNodes(state) {
|
|
61
91
|
state.filteredNodeTypes = [];
|
|
62
92
|
state.searchTerm = '';
|
|
63
93
|
},
|
|
94
|
+
clearFilteredPmBlockNodes(state) {
|
|
95
|
+
state.filteredNodeTypes = [];
|
|
96
|
+
state.filteredPmBlockNodeTypes = [];
|
|
97
|
+
state.searchTerm = '';
|
|
98
|
+
},
|
|
64
99
|
closeExplorer(state) {
|
|
65
100
|
state.explorerOpen = false;
|
|
66
101
|
},
|
|
File without changes
|
package/src/store.js
CHANGED
|
@@ -59,6 +59,7 @@ export default new Vuex.Store({
|
|
|
59
59
|
copiedElements: state => state.copiedElements,
|
|
60
60
|
clientLeftPaper: state => state.clientLeftPaper,
|
|
61
61
|
isReadOnly: state => state.readOnly,
|
|
62
|
+
showComponent: state => !state.readOnly,
|
|
62
63
|
},
|
|
63
64
|
mutations: {
|
|
64
65
|
setReadOnly(state, value) {
|
package/vue.config.js
CHANGED
package/dist/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="29" height="30" viewBox="0 0 29 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 3.5H6V4V10H4V26H9V10H7V4.5H14.25V10H12.25V21H17.25V10H15.25V4.5H22V10H20V26H25V10H23V4V3.5H22.5H14.75H6.5Z" fill="white"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="29" height="30" viewBox="0 0 29 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 7.49997V9.49997H25.5V4.49997H9.5V6.49997H3.5H3V6.99997V14.75V23V23.5H3.5H9.5V25.5H25.5V20.5H9.5V22.5H4V15.25H9.5V17.25H20.5V12.25H9.5V14.25H4V7.49997H9.5Z" fill="white"/>
|
|
3
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="29" height="29" viewBox="0 0 29 29" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M13.5841 1.9168C14.121 1.37983 14.9916 1.37983 15.5286 1.9168L27.1959 13.5841C27.7329 14.121 27.7329 14.9916 27.1959 15.5286L15.5286 27.1959C14.9916 27.7328 14.121 27.7328 13.5841 27.1959L1.91682 15.5286C1.37984 14.9916 1.37984 14.121 1.91682 13.5841L13.5841 1.9168ZM0.944544 12.6118C-0.129398 13.6857 -0.129398 15.4269 0.944544 16.5009L12.6118 28.1681C13.6857 29.2421 15.427 29.2421 16.5009 28.1681L28.1682 16.5009C29.2421 15.4269 29.2421 13.6857 28.1682 12.6118L16.5009 0.94453C15.427 -0.129412 13.6857 -0.129412 12.6118 0.94453L0.944544 12.6118Z" />
|
|
3
|
-
<circle cx="14.5" cy="14.5" r="8" stroke="black"/>
|
|
4
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const BOTTOM = 5000;
|