@processmaker/modeler 1.32.0 → 1.33.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/dist/img/inclusive-gateway.0f0afffd.svg +4 -0
- package/dist/img/inspector.42e5d40d.svg +5 -0
- package/dist/modeler.common.js +2827 -2638
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +2827 -2638
- 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/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/faAlignLeft.js +1 -1
- package/src/components/crown/crownMultiselect/crownAlign.vue +3 -0
- package/src/components/crown/crownMultiselect/crownMultiselect.vue +4 -2
- 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 +19 -0
- package/src/components/inspectors/process.js +1 -1
- package/src/components/modeler/Modeler.vue +59 -5
- package/src/components/modeler/ModelerReadonly.vue +31 -0
- 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/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/controls/Controls.vue +8 -0
- package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +5 -5
- package/src/components/rails/explorer-rail/explorer-rail.scss +11 -0
- package/src/components/rails/explorer-rail/explorer.vue +12 -3
- package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +15 -3
- package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +6 -1
- package/src/components/rails/explorer-rail/pmBlocksLoop/pmBlocksLoop.vue +76 -0
- package/src/components/shapeStackUtils.js +1 -1
- package/src/components/toolbar/ToolBar.vue +42 -44
- package/src/components/toolbar/toolbar.scss +55 -15
- package/src/components/topRail/TopRail.vue +1 -0
- package/src/components/topRail/validateControl/validateButton/ValidateButton.vue +1 -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 +29 -5
- package/src/mixins/linkConfig.js +26 -6
- package/src/nodeTypesStore.js +34 -1
- package/src/setup/registerPmBlock.js +0 -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
|
@@ -8,49 +8,49 @@
|
|
|
8
8
|
<TopRail
|
|
9
9
|
:validation-errors="validationErrors"
|
|
10
10
|
:warnings="warnings"
|
|
11
|
-
|
|
11
|
+
>
|
|
12
|
+
<component
|
|
13
|
+
:is="component.button"
|
|
14
|
+
v-for="(component, index) in validationBar"
|
|
15
|
+
:key="`validation-status-${index}`"
|
|
16
|
+
/>
|
|
17
|
+
</TopRail>
|
|
12
18
|
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@click="$emit('toggle-panels-compressed')"
|
|
20
|
-
v-b-tooltip.hover
|
|
21
|
-
:title="panelsCompressed ? $t('Show Menus') : $t('Hide Menus')"
|
|
22
|
-
>
|
|
23
|
-
<font-awesome-icon :icon="panelsCompressed ? expandIcon : compressIcon" />
|
|
24
|
-
</b-button>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="btn-group btn-group-sm" role="group" aria-label="Publish controls">
|
|
19
|
+
<div
|
|
20
|
+
class="d-flex align-items-center btn-group btn-group-sm"
|
|
21
|
+
role="group"
|
|
22
|
+
aria-label="Publish controls"
|
|
23
|
+
data-cy="publish-control"
|
|
24
|
+
>
|
|
27
25
|
<template v-if="isVersionsInstalled">
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
<div
|
|
27
|
+
class="toolbar-item toolbar-version-status"
|
|
28
|
+
data-cy="publish-version-status"
|
|
29
|
+
>
|
|
30
|
+
{{ versionStatus }}
|
|
32
31
|
</div>
|
|
33
|
-
<div
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
<div
|
|
33
|
+
class="toolbar-item toolbar-loading-status"
|
|
34
|
+
data-cy="publish-loading-status"
|
|
35
|
+
>
|
|
37
36
|
<span>
|
|
38
|
-
|
|
37
|
+
{{ loadingStatus }}
|
|
39
38
|
</span>
|
|
39
|
+
<font-awesome-icon class="text-success" :icon="loadingIcon" :spin="isLoading" />
|
|
40
40
|
</div>
|
|
41
41
|
<a
|
|
42
|
-
class="btn btn-sm btn-primary btn-autosave text-uppercase mx-2"
|
|
43
|
-
data-test="publish-btn"
|
|
44
42
|
:title="$t('Publish')"
|
|
45
43
|
@click="$emit('saveBpmn')"
|
|
44
|
+
class="toolbar-item toolbar-publish"
|
|
45
|
+
data-cy="publish-btn"
|
|
46
46
|
>
|
|
47
47
|
{{ $t('Publish') }}
|
|
48
48
|
</a>
|
|
49
49
|
<a
|
|
50
|
-
class="btn btn-sm btn-link toolbar-item btn-autosave text-black text-uppercase"
|
|
51
|
-
data-test="close-btn"
|
|
52
50
|
:title="$t('Close')"
|
|
53
51
|
@click="$emit('close')"
|
|
52
|
+
class="toolbar-item toolbar-close"
|
|
53
|
+
data-cy="close-btn"
|
|
54
54
|
>
|
|
55
55
|
{{ $t('Close') }}
|
|
56
56
|
</a>
|
|
@@ -60,18 +60,9 @@
|
|
|
60
60
|
@navigate="onNavigate"
|
|
61
61
|
@show="onShow"
|
|
62
62
|
@hide="onHide"
|
|
63
|
+
data-cy="ellipsis-menu"
|
|
63
64
|
/>
|
|
64
65
|
</template>
|
|
65
|
-
<b-button
|
|
66
|
-
v-else
|
|
67
|
-
class="btn btn-sm btn-secondary mini-map-btn mx-1"
|
|
68
|
-
data-test="mini-map-btn"
|
|
69
|
-
v-b-tooltip.hover
|
|
70
|
-
:title="$t('Save')"
|
|
71
|
-
@click="$emit('saveBpmn')"
|
|
72
|
-
>
|
|
73
|
-
<font-awesome-icon :icon="saveIcon" />
|
|
74
|
-
</b-button>
|
|
75
66
|
</div>
|
|
76
67
|
</div>
|
|
77
68
|
</div>
|
|
@@ -83,7 +74,6 @@ import { faCompress, faExpand, faMapMarked, faMinus, faPlus, faRedo, faUndo, faS
|
|
|
83
74
|
import undoRedoStore from '@/undoRedoStore';
|
|
84
75
|
import Breadcrumb from '@/components/toolbar/breadcrumb/Breadcrumb';
|
|
85
76
|
import TopRail from '@/components/topRail/TopRail.vue';
|
|
86
|
-
import AlignButtons from '@/components/toolbar/alignButtons/AlignButtons';
|
|
87
77
|
|
|
88
78
|
export default {
|
|
89
79
|
name: 'tool-bar',
|
|
@@ -91,7 +81,6 @@ export default {
|
|
|
91
81
|
Breadcrumb,
|
|
92
82
|
TopRail,
|
|
93
83
|
FontAwesomeIcon,
|
|
94
|
-
AlignButtons,
|
|
95
84
|
},
|
|
96
85
|
props: [
|
|
97
86
|
'canvasDragPosition',
|
|
@@ -103,6 +92,7 @@ export default {
|
|
|
103
92
|
'validationErrors',
|
|
104
93
|
'warnings',
|
|
105
94
|
'xmlManager',
|
|
95
|
+
'validationBar',
|
|
106
96
|
],
|
|
107
97
|
watch: {
|
|
108
98
|
miniMapOpen(isOpen) {
|
|
@@ -163,13 +153,18 @@ export default {
|
|
|
163
153
|
spinner: faSpinner,
|
|
164
154
|
ellipsisMenuActions: [
|
|
165
155
|
{
|
|
166
|
-
value: '
|
|
167
|
-
content: this.$t('
|
|
156
|
+
value: 'save-template',
|
|
157
|
+
content: this.$t('Save as Template'),
|
|
168
158
|
icon: '',
|
|
169
159
|
},
|
|
170
160
|
{
|
|
171
|
-
value: 'save-
|
|
172
|
-
content: this.$t('Save as
|
|
161
|
+
value: 'save-pm-block',
|
|
162
|
+
content: this.$t('Save as PM Block'),
|
|
163
|
+
icon: '',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: 'discard-draft',
|
|
167
|
+
content: this.$t('Discard Draft'),
|
|
173
168
|
icon: '',
|
|
174
169
|
},
|
|
175
170
|
],
|
|
@@ -202,6 +197,9 @@ export default {
|
|
|
202
197
|
case 'save-template':
|
|
203
198
|
this.$emit('publishTemplate');
|
|
204
199
|
break;
|
|
200
|
+
case 'save-pm-block':
|
|
201
|
+
this.$emit('publishPmBlock');
|
|
202
|
+
break;
|
|
205
203
|
default:
|
|
206
204
|
break;
|
|
207
205
|
}
|
|
@@ -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,13 +75,6 @@ $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;
|
|
@@ -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,14 +1,20 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
1
|
import cloneDeep from 'lodash/cloneDeep';
|
|
3
2
|
import store from '@/store';
|
|
4
3
|
|
|
4
|
+
const COLOR_DEFAULT = '#5096db';
|
|
5
|
+
const COLOR_ERROR = '##FF0000';
|
|
6
|
+
const COLOR_IN_PROGRESS = '#1572C2';
|
|
7
|
+
const COLOR_IDLE = '#ced4da';
|
|
8
|
+
const COLOR_COMPLETED = '#00875A';
|
|
9
|
+
const COLOR_COMPLETED_FILL = '#edfffc';
|
|
10
|
+
|
|
5
11
|
const errorHighlighter = {
|
|
6
12
|
highlighter: {
|
|
7
13
|
name: 'stroke',
|
|
8
14
|
options: {
|
|
9
15
|
padding: 10,
|
|
10
16
|
attrs: {
|
|
11
|
-
stroke:
|
|
17
|
+
stroke: COLOR_ERROR,
|
|
12
18
|
'stroke-width': 10,
|
|
13
19
|
opacity: 0.3,
|
|
14
20
|
},
|
|
@@ -21,7 +27,7 @@ const defaultHighlighter = {
|
|
|
21
27
|
name: 'stroke',
|
|
22
28
|
options: {
|
|
23
29
|
attrs: {
|
|
24
|
-
stroke:
|
|
30
|
+
stroke: COLOR_DEFAULT,
|
|
25
31
|
'stroke-width': 3,
|
|
26
32
|
'data-cy': 'selected',
|
|
27
33
|
},
|
|
@@ -34,7 +40,7 @@ const completedHighlighter = {
|
|
|
34
40
|
name: 'stroke',
|
|
35
41
|
options: {
|
|
36
42
|
attrs: {
|
|
37
|
-
stroke:
|
|
43
|
+
stroke: COLOR_COMPLETED,
|
|
38
44
|
'stroke-width': 3,
|
|
39
45
|
},
|
|
40
46
|
},
|
|
@@ -46,7 +52,7 @@ const inProgressHighlighter = {
|
|
|
46
52
|
name: 'stroke',
|
|
47
53
|
options: {
|
|
48
54
|
attrs: {
|
|
49
|
-
stroke:
|
|
55
|
+
stroke: COLOR_IN_PROGRESS,
|
|
50
56
|
'stroke-width': 3,
|
|
51
57
|
'stroke-dasharray': '4 4',
|
|
52
58
|
},
|
|
@@ -54,6 +60,18 @@ const inProgressHighlighter = {
|
|
|
54
60
|
},
|
|
55
61
|
};
|
|
56
62
|
|
|
63
|
+
const idleHighlighter = {
|
|
64
|
+
highlighter: {
|
|
65
|
+
name: 'stroke',
|
|
66
|
+
options: {
|
|
67
|
+
attrs: {
|
|
68
|
+
stroke: COLOR_IDLE,
|
|
69
|
+
'stroke-width': 3,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
57
75
|
export default {
|
|
58
76
|
props: [
|
|
59
77
|
'highlighted',
|
|
@@ -63,6 +81,7 @@ export default {
|
|
|
63
81
|
'borderOutline',
|
|
64
82
|
'isCompleted',
|
|
65
83
|
'isInProgress',
|
|
84
|
+
'isIdle',
|
|
66
85
|
],
|
|
67
86
|
data() {
|
|
68
87
|
return {
|
|
@@ -100,12 +119,17 @@ export default {
|
|
|
100
119
|
if (store.getters.isReadOnly) {
|
|
101
120
|
this.shapeView.unhighlight(this.shapeBody, completedHighlighter);
|
|
102
121
|
if (this.isCompleted) {
|
|
122
|
+
this.shape.attr('body/fill', COLOR_COMPLETED_FILL);
|
|
103
123
|
this.shapeView.highlight(this.shapeBody, completedHighlighter);
|
|
104
124
|
}
|
|
105
125
|
this.shapeView.unhighlight(this.shapeBody, inProgressHighlighter);
|
|
106
126
|
if (this.isInProgress) {
|
|
107
127
|
this.shapeView.highlight(this.shapeBody, inProgressHighlighter);
|
|
108
128
|
}
|
|
129
|
+
if (this.isIdle) {
|
|
130
|
+
this.shape.attr('body/fill', COLOR_IDLE);
|
|
131
|
+
this.shapeView.highlight(this.shapeBody, idleHighlighter);
|
|
132
|
+
}
|
|
109
133
|
return;
|
|
110
134
|
}
|
|
111
135
|
|
package/src/mixins/linkConfig.js
CHANGED
|
@@ -15,8 +15,11 @@ function isPoint(item) {
|
|
|
15
15
|
return item.x && item.y;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
const COLOR_IDLE = '#ced4da';
|
|
19
|
+
const COLOR_COMPLETED = '#00875A';
|
|
20
|
+
|
|
18
21
|
export default {
|
|
19
|
-
props: ['highlighted', 'paper'],
|
|
22
|
+
props: ['highlighted', 'paper', 'paperManager', 'isCompleted'],
|
|
20
23
|
data() {
|
|
21
24
|
return {
|
|
22
25
|
sourceShape: null,
|
|
@@ -76,6 +79,12 @@ export default {
|
|
|
76
79
|
},
|
|
77
80
|
},
|
|
78
81
|
methods: {
|
|
82
|
+
setShapeHighlight() {
|
|
83
|
+
const COLOR = this.isCompleted ? COLOR_COMPLETED : COLOR_IDLE;
|
|
84
|
+
this.shape.attr({
|
|
85
|
+
line: { stroke: COLOR },
|
|
86
|
+
});
|
|
87
|
+
},
|
|
79
88
|
findSourceShape() {
|
|
80
89
|
return this.graph.getElements().find(element => {
|
|
81
90
|
return element.component && element.component.node.definition === this.node.definition.get('sourceRef');
|
|
@@ -123,6 +132,8 @@ export default {
|
|
|
123
132
|
resetShapeColor(targetShape);
|
|
124
133
|
|
|
125
134
|
this.shape.on('change:vertices', this.onChangeVertices);
|
|
135
|
+
this.shape.listenTo(this.sourceShape, 'change:position', this.updateWaypoints);
|
|
136
|
+
this.shape.listenTo(targetShape, 'change:position', this.updateWaypoints);
|
|
126
137
|
|
|
127
138
|
const sourceShape = this.shape.getSourceElement();
|
|
128
139
|
sourceShape.embed(this.shape);
|
|
@@ -130,13 +141,15 @@ export default {
|
|
|
130
141
|
},
|
|
131
142
|
/**
|
|
132
143
|
* On Change vertices handler
|
|
133
|
-
* @param {Object} link
|
|
134
|
-
* @param {Array} vertices
|
|
135
|
-
* @param {Object} options
|
|
144
|
+
* @param {Object} link
|
|
145
|
+
* @param {Array} vertices
|
|
146
|
+
* @param {Object} options
|
|
136
147
|
*/
|
|
137
|
-
onChangeVertices(link, vertices, options){
|
|
148
|
+
async onChangeVertices(link, vertices, options){
|
|
138
149
|
if (options && options.ui) {
|
|
139
150
|
this.updateWaypoints();
|
|
151
|
+
await this.$nextTick();
|
|
152
|
+
this.$emit('save-state');
|
|
140
153
|
}
|
|
141
154
|
},
|
|
142
155
|
updateWaypoints() {
|
|
@@ -237,7 +250,6 @@ export default {
|
|
|
237
250
|
emitSave() {
|
|
238
251
|
if (this.highlighted) {
|
|
239
252
|
this.updateWaypoints.flush();
|
|
240
|
-
this.$emit('save-state');
|
|
241
253
|
document.removeEventListener('mouseup', this.emitSave);
|
|
242
254
|
this.listeningToMouseup = false;
|
|
243
255
|
}
|
|
@@ -323,6 +335,14 @@ export default {
|
|
|
323
335
|
this.shape.on('change:vertices', function() {
|
|
324
336
|
this.component.$emit('shape-resize');
|
|
325
337
|
});
|
|
338
|
+
|
|
339
|
+
if (store.getters.isReadOnly) {
|
|
340
|
+
this.$nextTick(() => {
|
|
341
|
+
this.paperManager.awaitScheduledUpdates().then(() => {
|
|
342
|
+
this.setShapeHighlight();
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
}
|
|
326
346
|
},
|
|
327
347
|
beforeDestroy() {
|
|
328
348
|
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,39 @@ 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
|
+
label: pmBlockNode.label,
|
|
72
|
+
description: pmBlockNode.description,
|
|
73
|
+
bpmnType: pmBlockNode.bpmnType,
|
|
74
|
+
rank: pmBlockNode.rank || BOTTOM,
|
|
75
|
+
items: pmBlockNode.items?.map(item => ({ ...item, type: item.id })),
|
|
76
|
+
}))
|
|
77
|
+
.sort((node1, node2) => node1.rank - node2.rank);
|
|
78
|
+
},
|
|
79
|
+
setFilteredPmBlockNodeTypes(state, searchTerm) {
|
|
80
|
+
// TODO: Configure Pm Block search bar
|
|
81
|
+
const pmBlockNodeTypes = state.pmBlockNodeTypes;
|
|
82
|
+
state.searchTerm = searchTerm;
|
|
83
|
+
const allNodes = uniqBy([...pmBlockNodeTypes], 'id');
|
|
84
|
+
state.filteredPmBlockNodeTypes = allNodes.filter(node => {
|
|
85
|
+
return node.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
86
|
+
});
|
|
87
|
+
},
|
|
60
88
|
clearFilteredNodes(state) {
|
|
61
89
|
state.filteredNodeTypes = [];
|
|
62
90
|
state.searchTerm = '';
|
|
63
91
|
},
|
|
92
|
+
clearFilteredPmBlockNodes(state) {
|
|
93
|
+
state.filteredNodeTypes = [];
|
|
94
|
+
state.filteredPmBlockNodeTypes = [];
|
|
95
|
+
state.searchTerm = '';
|
|
96
|
+
},
|
|
64
97
|
closeExplorer(state) {
|
|
65
98
|
state.explorerOpen = false;
|
|
66
99
|
},
|
|
File without changes
|
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;
|