@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.
Files changed (84) hide show
  1. package/README.md +7 -0
  2. package/babel.config.js +1 -2
  3. package/dist/img/inclusive-gateway.0f0afffd.svg +4 -0
  4. package/dist/img/inspector.42e5d40d.svg +5 -0
  5. package/dist/modeler.common.js +2827 -2638
  6. package/dist/modeler.common.js.map +1 -1
  7. package/dist/modeler.umd.js +2827 -2638
  8. package/dist/modeler.umd.js.map +1 -1
  9. package/dist/modeler.umd.min.js +4 -4
  10. package/dist/modeler.umd.min.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/.DS_Store +0 -0
  13. package/src/NodeIdGenerator.js +16 -1
  14. package/src/assets/inspector.svg +5 -0
  15. package/src/assets/toolpanel/inclusive-gateway.svg +2 -2
  16. package/src/components/controls/controls.vue +2 -11
  17. package/src/components/crown/crownButtons/addLaneAboveButton.vue +3 -1
  18. package/src/components/crown/crownButtons/addLaneBelowButton.vue +3 -1
  19. package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +2 -1
  20. package/src/components/crown/crownButtons/genericFlowButton.vue +2 -1
  21. package/src/components/crown/crownButtons/icons/faAlignLeft.js +1 -1
  22. package/src/components/crown/crownMultiselect/crownAlign.vue +3 -0
  23. package/src/components/crown/crownMultiselect/crownMultiselect.vue +4 -2
  24. package/src/components/inspectors/InspectorPanel.vue +26 -3
  25. package/src/components/inspectors/inspector.scss +11 -0
  26. package/src/components/inspectors/inspectorButton/InspectorButton.vue +38 -0
  27. package/src/components/inspectors/inspectorButton/inspectorButton.scss +19 -0
  28. package/src/components/inspectors/process.js +1 -1
  29. package/src/components/modeler/Modeler.vue +59 -5
  30. package/src/components/modeler/ModelerReadonly.vue +31 -0
  31. package/src/components/modeler/Selection.vue +9 -1
  32. package/src/components/nodes/association/index.js +1 -1
  33. package/src/components/nodes/baseStartEvent/index.js +1 -1
  34. package/src/components/nodes/boundaryEvent/index.js +1 -1
  35. package/src/components/nodes/dataInputAssociation/index.js +1 -1
  36. package/src/components/nodes/dataObject/index.js +1 -1
  37. package/src/components/nodes/dataOutputAssociation/index.js +1 -1
  38. package/src/components/nodes/dataStore/index.js +1 -1
  39. package/src/components/nodes/endEvent/index.js +1 -1
  40. package/src/components/nodes/eventBasedGateway/index.js +1 -1
  41. package/src/components/nodes/exclusiveGateway/index.js +1 -1
  42. package/src/components/nodes/gateway/index.js +1 -1
  43. package/src/components/nodes/inclusiveGateway/index.js +1 -1
  44. package/src/components/nodes/intermediateEvent/index.js +1 -1
  45. package/src/components/nodes/intermediateMessageEvent/index.js +1 -1
  46. package/src/components/nodes/intermediateTimerEvent/index.js +1 -1
  47. package/src/components/nodes/manualTask/index.js +1 -1
  48. package/src/components/nodes/messageFlow/index.js +1 -1
  49. package/src/components/nodes/parallelGateway/index.js +1 -1
  50. package/src/components/nodes/pool/index.js +1 -1
  51. package/src/components/nodes/pool/pool.vue +10 -4
  52. package/src/components/nodes/poolLane/index.js +1 -1
  53. package/src/components/nodes/scriptTask/index.js +1 -1
  54. package/src/components/nodes/sequenceFlow/index.js +1 -1
  55. package/src/components/nodes/serviceTask/index.js +1 -1
  56. package/src/components/nodes/subProcess/index.js +1 -1
  57. package/src/components/nodes/task/index.js +1 -1
  58. package/src/components/nodes/textAnnotation/index.js +1 -1
  59. package/src/components/railBottom/controls/Controls.vue +8 -0
  60. package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +5 -5
  61. package/src/components/rails/explorer-rail/explorer-rail.scss +11 -0
  62. package/src/components/rails/explorer-rail/explorer.vue +12 -3
  63. package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +15 -3
  64. package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +6 -1
  65. package/src/components/rails/explorer-rail/pmBlocksLoop/pmBlocksLoop.vue +76 -0
  66. package/src/components/shapeStackUtils.js +1 -1
  67. package/src/components/toolbar/ToolBar.vue +42 -44
  68. package/src/components/toolbar/toolbar.scss +55 -15
  69. package/src/components/topRail/TopRail.vue +1 -0
  70. package/src/components/topRail/validateControl/validateButton/ValidateButton.vue +1 -0
  71. package/src/components/topRail/validateControl/validateIssue/ValidateIssue.vue +1 -0
  72. package/src/components/topRail/validateControl/validatePanel/ValidatePanel.vue +4 -1
  73. package/src/components/topRail/validateControl/validatePanel/validatePanel.scss +1 -1
  74. package/src/mixins/clickAndDrop.js +17 -10
  75. package/src/mixins/highlightConfig.js +29 -5
  76. package/src/mixins/linkConfig.js +26 -6
  77. package/src/nodeTypesStore.js +34 -1
  78. package/src/setup/registerPmBlock.js +0 -0
  79. package/vue.config.js +1 -0
  80. package/dist/.DS_Store +0 -0
  81. package/dist/img/distribute-horizontally-icon.5c513cf4.svg +0 -3
  82. package/dist/img/distribute-vertically-icon.a35fb699.svg +0 -3
  83. package/dist/img/inclusive-gateway.754cb36f.svg +0 -4
  84. package/src/components/controls/rankConstants.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "open-cypress": "TZ=UTC cypress open",
package/src/.DS_Store CHANGED
Binary file
@@ -1,13 +1,15 @@
1
1
  export default class NodeIdGenerator {
2
2
  static prefix = 'node_';
3
-
3
+ static processPrefix = 'Process_';
4
4
  static #counter = 1;
5
5
  static #diagramCounter = 1;
6
+ static #processCounter = 1;
6
7
 
7
8
  constructor(definitions) {
8
9
  this.definitions = definitions;
9
10
  this.refreshLastIdCounter();
10
11
  this.refreshLastDiagramIdCounter();
12
+ this.refreshLastProcessIdCounter();
11
13
  }
12
14
 
13
15
  findById(id, root = this.definitions.rootElements, walked = []) {
@@ -61,12 +63,19 @@ export default class NodeIdGenerator {
61
63
  let lastIdCounter = this.matchIds(new RegExp(`^${NodeIdGenerator.prefix}(\\d+)_di$`), this.definitions.diagrams);
62
64
  NodeIdGenerator.#diagramCounter = lastIdCounter + 1;
63
65
  }
66
+ refreshLastProcessIdCounter() {
67
+ let lastIdCounter = this.matchIds(new RegExp(`^${NodeIdGenerator.processPrefix}(\\d+)$`), this.definitions.rootElements);
68
+ NodeIdGenerator.#processCounter = lastIdCounter + 1;
69
+ }
64
70
 
65
71
  generate() {
66
72
  let definitionId = this.#generateDefinitionId();
67
73
  let diagramId = this.#generateDiagramId();
68
74
  return [definitionId, diagramId];
69
75
  }
76
+ generateProcessId() {
77
+ return this.#generateProcessId();
78
+ }
70
79
 
71
80
  #generateDefinitionId = () => {
72
81
  const id = NodeIdGenerator.prefix + NodeIdGenerator.#counter;
@@ -79,6 +88,12 @@ export default class NodeIdGenerator {
79
88
  const id = NodeIdGenerator.prefix + NodeIdGenerator.#diagramCounter + '_di';
80
89
  NodeIdGenerator.#diagramCounter++;
81
90
 
91
+ return id;
92
+ };
93
+ #generateProcessId = () => {
94
+ const id = NodeIdGenerator.processPrefix + NodeIdGenerator.#processCounter;
95
+ NodeIdGenerator.#processCounter++;
96
+
82
97
  return id;
83
98
  };
84
99
  }
@@ -0,0 +1,5 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 17C0 16.4477 0.366312 16 0.818182 16H17.1818C17.6337 16 18 16.4477 18 17C18 17.5523 17.6337 18 17.1818 18H0.818182C0.366312 18 0 17.5523 0 17Z"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 9C0 8.44772 0.366312 8 0.818182 8H17.1818C17.6337 8 18 8.44772 18 9C18 9.55228 17.6337 10 17.1818 10H0.818182C0.366312 10 0 9.55228 0 9Z"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 1C0 0.447715 0.366312 0 0.818182 0H17.1818C17.6337 0 18 0.447715 18 1C18 1.55228 17.6337 2 17.1818 2H0.818182C0.366312 2 0 1.55228 0 1Z"/>
5
+ </svg>
@@ -1,4 +1,4 @@
1
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"/>
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
4
  </svg>
@@ -32,7 +32,7 @@
32
32
  </template>
33
33
 
34
34
  <script>
35
- import { BOTTOM } from '@/components/controls/rankConstants';
35
+ import nodeTypesStore from '@/nodeTypesStore';
36
36
 
37
37
  export default {
38
38
  props: ['allowDrop', 'compressed', 'canvasDragPosition', 'parentHeight', 'nodeTypes'],
@@ -53,16 +53,7 @@ export default {
53
53
  },
54
54
  computed: {
55
55
  controls() {
56
- return this.nodeTypes
57
- .filter(nodeType => nodeType.control)
58
- .map(nodeType => ({
59
- type: nodeType.id,
60
- icon: nodeType.icon,
61
- label: nodeType.label,
62
- bpmnType: nodeType.bpmnType,
63
- rank: nodeType.rank || BOTTOM,
64
- }))
65
- .sort((node1, node2) => node1.rank - node2.rank);
56
+ return nodeTypesStore.getters.getNodeTypes;
66
57
  },
67
58
  },
68
59
  methods: {
@@ -14,9 +14,11 @@ import laneAboveIcon from '@/assets/lane-above.svg';
14
14
  import CrownButton from '@/components/crown/crownButtons/crownButton';
15
15
  import { library } from '@fortawesome/fontawesome-svg-core';
16
16
  import { faLaneAbove } from './icons';
17
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
18
+
17
19
 
18
20
  export default {
19
- components: { CrownButton },
21
+ components: { CrownButton, FontAwesomeIcon },
20
22
  data() {
21
23
  return {
22
24
  laneAboveIcon,
@@ -14,9 +14,11 @@ import laneBelowIcon from '@/assets/lane-below.svg';
14
14
  import CrownButton from '@/components/crown/crownButtons/crownButton';
15
15
  import { library } from '@fortawesome/fontawesome-svg-core';
16
16
  import { faLaneBelow } from './icons';
17
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
18
+
17
19
 
18
20
  export default {
19
- components: { CrownButton },
21
+ components: { CrownButton, FontAwesomeIcon },
20
22
  data() {
21
23
  return {
22
24
  laneBelowIcon,
@@ -45,10 +45,11 @@ import store from '@/store';
45
45
  import Node from '@/components/nodes/node';
46
46
  import { library } from '@fortawesome/fontawesome-svg-core';
47
47
  import { faBoundaryEvent } from './icons';
48
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
48
49
 
49
50
  export default {
50
51
  name: 'CrownBoundaryEventDropdown',
51
- components: { CrownButton },
52
+ components: { CrownButton, FontAwesomeIcon },
52
53
  props: {
53
54
  dropdownOpen: {
54
55
  type: Boolean,
@@ -20,6 +20,7 @@ import store from '@/store';
20
20
  import { V } from 'jointjs';
21
21
  import { library } from '@fortawesome/fontawesome-svg-core';
22
22
  import { faConnectElements } from './icons';
23
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
23
24
 
24
25
  // Don't show the magic flow button on:
25
26
  const dontShowOn = [
@@ -35,7 +36,7 @@ const dontShowOn = [
35
36
  ];
36
37
 
37
38
  export default {
38
- components: { CrownButton },
39
+ components: { CrownButton, FontAwesomeIcon },
39
40
  props: ['node', 'moddle', 'nodeRegistry'],
40
41
  data() {
41
42
  return {
@@ -6,6 +6,6 @@ export const faAlignLeft = {
6
6
  16,
7
7
  [],
8
8
  'e001',
9
- 'M6.637 1.076a1 1 0 0 0-.562.538l-.062.133v10.506l.07.147c.146.307.427.524.755.584.212.039 2.112.039 2.324 0 .328-.06.609-.277.755-.584l.07-.147V1.747l-.07-.147a1.016 1.016 0 0 0-.471-.486l-.178-.087-1.241-.007-1.24-.006-.15.062M1.29 14.051a.507.507 0 0 0-.229.686.707.707 0 0 0 .293.243c.095.026 13.197.026 13.292 0a.707.707 0 0 0 .293-.243.507.507 0 0 0-.229-.686c-.106-.048-.321-.05-6.71-.05s-6.604.002-6.71.05',
9
+ 'M1.266 1.063a.637.637 0 0 0-.246.292c-.026.094-.026 13.197 0 13.291a.707.707 0 0 0 .243.293.507.507 0 0 0 .686-.229c.048-.106.05-.321.05-6.704.001-7.105.009-6.691-.127-6.841-.133-.148-.445-.2-.606-.102m2.468 4.98a.994.994 0 0 0-.718.796c-.039.211-.039 2.111 0 2.323.06.328.277.609.584.755l.147.07h10.506l.147-.07c.307-.146.524-.427.584-.755.039-.212.039-2.112 0-2.323a1 1 0 0 0-.445-.675c-.271-.174.077-.164-5.551-.162-4.405.001-5.128.007-5.254.041',
10
10
  ],
11
11
  };
@@ -39,8 +39,11 @@ import {
39
39
  faDistributeHorizontally,
40
40
  } from '../crownButtons/icons';
41
41
  import { get } from 'lodash';
42
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
43
+
42
44
 
43
45
  export default {
46
+ components: {FontAwesomeIcon},
44
47
  props: {
45
48
  paper: Object,
46
49
  hasPools: Boolean,
@@ -20,7 +20,7 @@
20
20
  <font-awesome-icon v-if="button.iconPrefix === 'fpm'" :icon="[button.iconPrefix, `fa-${button.icon}`]"/>
21
21
  <i v-else :class="`${button.iconPrefix} fa-${button.icon} text-dark`" />
22
22
  </button>
23
- <crown-align v-show="showAlignmentButtons" :paper="paper"/>
23
+ <crown-align v-show="showAlignmentButtons" :paper="paper" @save-state="$emit('save-state')" />
24
24
  </div>
25
25
  </template>
26
26
 
@@ -30,13 +30,15 @@ import runningInCypressTest from '@/runningInCypressTest';
30
30
  import crownAlign from './crownAlign';
31
31
  import { library } from '@fortawesome/fontawesome-svg-core';
32
32
  import { faCenterVertically } from '../crownButtons/icons';
33
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
34
+
33
35
 
34
36
  export default {
35
37
  props: {
36
38
  paper: Object,
37
39
  hasPools: Boolean,
38
40
  },
39
- components:{ crownAlign },
41
+ components:{ crownAlign, FontAwesomeIcon },
40
42
  data() {
41
43
  return {
42
44
  showAlignmentButtons: false,
@@ -1,17 +1,33 @@
1
1
  <template>
2
2
  <transition name="inspector">
3
3
  <b-col
4
- v-show="!compressed"
5
4
  id="inspector"
6
5
  class="pl-0 h-100 overflow-hidden inspector-column"
7
- :class="[{ 'ignore-pointer': canvasDragPosition, 'inspector-column-compressed' : compressed }]"
6
+ :class="[{ 'ignore-pointer': canvasDragPosition }]"
8
7
  data-test="inspector-column"
9
8
  >
10
9
  <b-card
11
10
  no-body class="inspector-container border-top-0 border-bottom-0 border-right-0 rounded-0"
12
11
  data-test="inspector-container"
13
12
  :style="{ height: parentHeight }"
13
+ data-cy="inspector-panel"
14
14
  >
15
+ <template #header>
16
+ <div class="inspector-header">
17
+ <div class="inspector-header-title">
18
+ {{ $t('Configuration') }}
19
+ </div>
20
+ <button
21
+ type="button"
22
+ aria-label="Close"
23
+ class="close"
24
+ @click="onClose"
25
+ data-cy="inspector-close-button"
26
+ >
27
+ ×
28
+ </button>
29
+ </div>
30
+ </template>
15
31
  <vue-form-renderer
16
32
  :key="highlightedNode._modelerId"
17
33
  v-if="highlightedNode"
@@ -63,13 +79,14 @@ Vue.component('FormDatePicker', FormDatePicker);
63
79
  Vue.component('FormMultiSelect', FormMultiSelect);
64
80
 
65
81
  export default {
66
- props: ['nodeRegistry', 'moddle', 'processNode', 'parentHeight', 'canvasDragPosition', 'compressed', 'definitions'],
82
+ props: ['nodeRegistry', 'moddle', 'processNode', 'parentHeight', 'canvasDragPosition', 'definitions'],
67
83
  data() {
68
84
  return {
69
85
  data: {},
70
86
  config: [],
71
87
  inspectorHandler: null,
72
88
  translated: [],
89
+ isVisible: true,
73
90
  };
74
91
  },
75
92
  watch: {
@@ -131,6 +148,12 @@ export default {
131
148
  },
132
149
  },
133
150
  methods: {
151
+ /**
152
+ * On Close even handler
153
+ */
154
+ onClose(){
155
+ this.$emit('toggleInspector', false);
156
+ },
134
157
  handleAssignmentChanges(currentValue, previousValue) {
135
158
  if (currentValue === previousValue) {
136
159
  return;
@@ -23,5 +23,16 @@ $inspector-column-max-width: 265px;
23
23
  .inspector-font-size {
24
24
  font-size: 0.875rem;
25
25
  }
26
+ };
27
+ &-header {
28
+ justify-content: space-between;
29
+ display: flex;
30
+ flex-direction: row;
31
+ &-title {
32
+ flex-grow: 0;
33
+ font-weight: 600;
34
+ letter-spacing: -0.02em;
35
+ flex-grow: 0;
36
+ };
26
37
  }
27
38
  }
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ @click="toggleInspector"
5
+ class="inspector-button"
6
+ data-cy="inspector-button"
7
+ >
8
+ <inline-svg :src="inspectorIcon" />
9
+ </button>
10
+ </template>
11
+
12
+ <script>
13
+ import InlineSvg from 'vue-inline-svg';
14
+
15
+ export default {
16
+ components: {
17
+ InlineSvg,
18
+ },
19
+ props: {
20
+ showInspector: {
21
+ type: Boolean,
22
+ default: true,
23
+ },
24
+ },
25
+ data() {
26
+ return {
27
+ inspectorIcon: require('@/assets/inspector.svg'),
28
+ };
29
+ },
30
+ methods: {
31
+ toggleInspector() {
32
+ this.$emit('toggleInspector', !this.showInspector);
33
+ },
34
+ },
35
+ };
36
+ </script>
37
+
38
+ <style scoped lang="scss" src="./inspectorButton.scss"></style>
@@ -0,0 +1,19 @@
1
+ .inspector-button {
2
+ position: absolute;
3
+ display: flex;
4
+ justify-content: center;
5
+ align-items: center;
6
+ width: 48px;
7
+ height: 48px;
8
+ top: 95px;
9
+ right: 65px;
10
+ padding: 4px;
11
+ background-color: #FFFFFF;
12
+ border: 0 none;
13
+ border-radius: 4px;
14
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
15
+
16
+ & > svg {
17
+ fill: #44494E;
18
+ }
19
+ }
@@ -14,7 +14,7 @@ const process = {
14
14
  container: true,
15
15
  config: {
16
16
  initiallyOpen: true,
17
- label: 'Configuration',
17
+ label: 'Properties',
18
18
  icon: 'cog',
19
19
  name: 'inspector-accordion-process',
20
20
  },
@@ -10,11 +10,13 @@
10
10
  :validation-errors="validationErrors"
11
11
  :warnings="allWarnings"
12
12
  :xml-manager="xmlManager"
13
+ :validationBar="validationBar"
13
14
  @load-xml="loadXML"
14
15
  @toggle-panels-compressed="panelsCompressed = !panelsCompressed"
15
16
  @toggle-mini-map-open="miniMapOpen = $event"
16
17
  @saveBpmn="saveBpmn"
17
18
  @publishTemplate="publishTemplate"
19
+ @publishPmBlock="publishPmBlock"
18
20
  @close="close"
19
21
  @save-state="pushToUndoStack"
20
22
  @clearSelection="clearSelection"
@@ -28,6 +30,7 @@
28
30
  />
29
31
  <explorer-rail
30
32
  :node-types="nodeTypes"
33
+ :pm-block-nodes="pmBlockNodes"
31
34
  @set-cursor="cursor = $event"
32
35
  @onCreateElement="onCreateElementHandler"
33
36
  />
@@ -41,9 +44,14 @@
41
44
  <div ref="paper" data-test="paper" class="main-paper" />
42
45
  </b-col>
43
46
 
47
+ <InspectorButton
48
+ :showInspector="isOpenInspector"
49
+ @toggleInspector="handleToggleInspector"
50
+ />
51
+
44
52
  <InspectorPanel
45
53
  ref="inspector-panel"
46
- v-show="!(highlightedNodes.length > 1)"
54
+ v-show="isOpenInspector && !(highlightedNodes.length > 1)"
47
55
  :style="{ height: parentHeight }"
48
56
  :nodeRegistry="nodeRegistry"
49
57
  :moddle="moddle"
@@ -53,8 +61,8 @@
53
61
  class="inspector h-100"
54
62
  :parent-height="parentHeight"
55
63
  :canvas-drag-position="canvasDragPosition"
56
- :compressed="panelsCompressed && noElementsSelected"
57
64
  @shape-resize="shapeResize(false)"
65
+ @toggleInspector="handleToggleInspector"
58
66
  />
59
67
 
60
68
  <component
@@ -138,6 +146,8 @@ import ExplorerRail from '../rails/explorer-rail/explorer';
138
146
  import pull from 'lodash/pull';
139
147
  import remove from 'lodash/remove';
140
148
  import store from '@/store';
149
+ import nodeTypesStore from '@/nodeTypesStore';
150
+ import InspectorButton from '@/components/inspectors/inspectorButton/InspectorButton.vue';
141
151
  import InspectorPanel from '@/components/inspectors/InspectorPanel';
142
152
  import undoRedoStore from '@/undoRedoStore';
143
153
  import { Linter } from 'bpmnlint';
@@ -188,6 +198,7 @@ export default {
188
198
  components: {
189
199
  ToolBar,
190
200
  ExplorerRail,
201
+ InspectorButton,
191
202
  InspectorPanel,
192
203
  ProcessmakerModelerGenericFlow,
193
204
  Selection,
@@ -201,6 +212,7 @@ export default {
201
212
  return {};
202
213
  },
203
214
  },
215
+ validationBar: Array,
204
216
  },
205
217
  mixins: [hotkeys, cloneSelection],
206
218
  data() {
@@ -240,10 +252,12 @@ export default {
240
252
  validationErrors: {},
241
253
  miniMapOpen: false,
242
254
  panelsCompressed: false,
255
+ isOpenInspector: false,
243
256
  isGrabbing: false,
244
257
  isRendering: false,
245
258
  allWarnings: [],
246
259
  nodeTypes: [],
260
+ pmBlockNodes: [],
247
261
  breadcrumbData: [],
248
262
  activeNode: null,
249
263
  xmlManager: null,
@@ -314,6 +328,9 @@ export default {
314
328
  },
315
329
  },
316
330
  methods: {
331
+ handleToggleInspector(value) {
332
+ this.isOpenInspector = value;
333
+ },
317
334
  isAppleOS() {
318
335
  return typeof navigator !== 'undefined' && /Mac|iPad|iPhone/.test(navigator.platform);
319
336
  },
@@ -360,6 +377,9 @@ export default {
360
377
  publishTemplate() {
361
378
  this.$emit('publishTemplate');
362
379
  },
380
+ publishPmBlock() {
381
+ this.$emit('publishPmBlock');
382
+ },
363
383
  async pasteElements() {
364
384
  if (this.copiedElements.length > 0 && !this.pasteInProgress) {
365
385
  this.pasteInProgress = true;
@@ -521,8 +541,7 @@ export default {
521
541
  } else {
522
542
  process = this.moddle.create('bpmn:Process');
523
543
  this.processes.push(process);
524
- process.set('id', `process_${this.processes.length}`);
525
-
544
+ process.set('id', this.nodeIdGenerator.generateProcessId());
526
545
  this.definitions.get('rootElements').push(process);
527
546
  }
528
547
 
@@ -618,6 +637,29 @@ export default {
618
637
  this.parsers[bpmnType].default.push(defaultParser);
619
638
  });
620
639
  },
640
+ registerPmBlock(pmBlockNode, customParser) {
641
+ const defaultParser = () => pmBlockNode.id;
642
+
643
+ this.translateConfig(pmBlockNode.inspectorConfig[0]);
644
+ addLoopCharacteristics(pmBlockNode);
645
+ this.nodeRegistry[pmBlockNode.id] = pmBlockNode;
646
+
647
+ Vue.component(pmBlockNode.id, pmBlockNode.component);
648
+ this.pmBlockNodes.push(pmBlockNode);
649
+
650
+ const types = Array.isArray(pmBlockNode.bpmnType)
651
+ ? pmBlockNode.bpmnType
652
+ : [pmBlockNode.bpmnType];
653
+
654
+ types.forEach(bpmnType => {
655
+ if (customParser) {
656
+ this.parsers[bpmnType].custom.push(customParser);
657
+ return;
658
+ }
659
+ this.parsers[bpmnType].default.push(defaultParser);
660
+ });
661
+ nodeTypesStore.commit('setPmBlockNodeTypes', this.pmBlockNodes);
662
+ },
621
663
  addMessageFlows() {
622
664
  if (this.collaboration) {
623
665
  this.collaboration
@@ -1003,6 +1045,16 @@ export default {
1003
1045
  this.$refs.selector.clearSelection();
1004
1046
  await this.$nextTick();
1005
1047
  await this.pushToUndoStack();
1048
+ // force to update the processNode property in every delete
1049
+ this.processes = this.getProcesses();
1050
+ if (this.processes && this.processes.length > 0) {
1051
+ this.processNode = new Node(
1052
+ 'processmaker-modeler-process',
1053
+ this.processes[0],
1054
+ this.planeElements.find(diagram => diagram.bpmnElement.id === this.processes[0].id),
1055
+ );
1056
+ }
1057
+
1006
1058
  },
1007
1059
  async removeNodes() {
1008
1060
  await this.performSingleUndoRedoTransaction(async() => {
@@ -1220,6 +1272,7 @@ export default {
1220
1272
  if (runningInCypressTest()) {
1221
1273
  /* Add reference to store on window; this is used in testing to verify rendered nodes */
1222
1274
  window.store = store;
1275
+ window.undoRedoStore = undoRedoStore;
1223
1276
  }
1224
1277
 
1225
1278
  this.$t = this.$t.bind(this);
@@ -1240,6 +1293,7 @@ export default {
1240
1293
  registerBpmnExtension: this.registerBpmnExtension,
1241
1294
  registerNode: this.registerNode,
1242
1295
  registerStatusBar: this.registerStatusBar,
1296
+ registerPmBlock: this.registerPmBlock,
1243
1297
  });
1244
1298
 
1245
1299
  this.moddle = new BpmnModdle(this.extensions);
@@ -1370,4 +1424,4 @@ export default {
1370
1424
  },
1371
1425
  };
1372
1426
  </script>
1373
- <style lang="scss" src="./modeler.scss" />
1427
+ <style lang="scss" src="./modeler.scss" />
@@ -47,6 +47,7 @@
47
47
  :is-rendering="isRendering"
48
48
  :is-completed="requestCompletedNodes.includes(node.definition.id)"
49
49
  :is-in-progress="requestInProgressNodes.includes(node.definition.id)"
50
+ :is-idle="requestIdleNodes.includes(node.definition.id)"
50
51
  @add-node="addNode"
51
52
  @set-cursor="cursor = $event"
52
53
  @set-pool-target="poolTarget = $event"
@@ -87,6 +88,7 @@ import controls from '../controls/controls';
87
88
  import pull from 'lodash/pull';
88
89
  import remove from 'lodash/remove';
89
90
  import store from '@/store';
91
+ import nodeTypesStore from '@/nodeTypesStore';
90
92
  import undoRedoStore from '@/undoRedoStore';
91
93
  import { Linter } from 'bpmnlint';
92
94
  import linterConfig from '../../../.bpmnlintrc';
@@ -134,6 +136,10 @@ export default {
134
136
  type: Boolean,
135
137
  default: true,
136
138
  },
139
+ requestIdleNodes: {
140
+ type: Array,
141
+ default: () => [],
142
+ },
137
143
  requestCompletedNodes: {
138
144
  type: Array,
139
145
  default: () => [],
@@ -183,6 +189,7 @@ export default {
183
189
  isRendering: false,
184
190
  allWarnings: [],
185
191
  nodeTypes: [],
192
+ pmBlockNodes: [],
186
193
  activeNode: null,
187
194
  xmlManager: null,
188
195
  previouslyStackedShape: null,
@@ -407,6 +414,29 @@ export default {
407
414
  this.parsers[bpmnType].default.push(defaultParser);
408
415
  });
409
416
  },
417
+ registerPmBlock(pmBlockNode, customParser) {
418
+ const defaultParser = () => pmBlockNode.id;
419
+
420
+ this.translateConfig(pmBlockNode.inspectorConfig[0]);
421
+ addLoopCharacteristics(pmBlockNode);
422
+ this.nodeRegistry[pmBlockNode.id] = pmBlockNode;
423
+
424
+ Vue.component(pmBlockNode.id, pmBlockNode.component);
425
+ this.pmBlockNodes.push(pmBlockNode);
426
+
427
+ const types = Array.isArray(pmBlockNode.bpmnType)
428
+ ? pmBlockNode.bpmnType
429
+ : [pmBlockNode.bpmnType];
430
+
431
+ types.forEach(bpmnType => {
432
+ if (customParser) {
433
+ this.parsers[bpmnType].custom.push(customParser);
434
+ return;
435
+ }
436
+ this.parsers[bpmnType].default.push(defaultParser);
437
+ });
438
+ nodeTypesStore.commit('setPmBlockNodeTypes', this.pmBlockNodes);
439
+ },
410
440
  addMessageFlows() {
411
441
  if (this.collaboration) {
412
442
  this.collaboration
@@ -845,6 +875,7 @@ export default {
845
875
  registerBpmnExtension: this.registerBpmnExtension,
846
876
  registerNode: this.registerNode,
847
877
  registerStatusBar: this.registerStatusBar,
878
+ registerPmBlock: this.registerPmBlock,
848
879
  });
849
880
 
850
881
  this.moddle = new BpmnModdle(this.extensions);
@@ -16,6 +16,7 @@
16
16
  :plane-elements="$parent.planeElements"
17
17
  :is-rendering="$parent.isRendering"
18
18
  :dropdown-data="[]"
19
+ @save-state="$emit('save-state')"
19
20
  :has-pools="hasPoolsOrLanesSelected"
20
21
  v-on="$listeners"
21
22
  />
@@ -771,7 +772,7 @@ export default {
771
772
  /**
772
773
  * Stop dragging elements that are in a pool
773
774
  */
774
- overPoolStopDrag(){
775
+ async overPoolStopDrag(){
775
776
  if (this.isNotPoolChilds(this.selected)) {
776
777
  this.updateFlowsWaypoint();
777
778
  this.$emit('save-state');
@@ -788,6 +789,7 @@ export default {
788
789
  if (this.newPool){
789
790
  /* Remove the shape from its current pool */
790
791
  this.moveElements(this.selected, this.oldPool, this.newPool);
792
+ this.moveConectedLinks(this.conectedLinks, this.oldPool, this.newPool);
791
793
  this.newPool = null;
792
794
  this.oldPool = null;
793
795
  this.updateLaneChildren(this.selected);
@@ -920,12 +922,18 @@ export default {
920
922
  const shapesToMove= [
921
923
  'PoolLane',
922
924
  'standard.Link',
925
+ 'processmaker.components.nodes.boundaryEvent.Shape',
923
926
  ];
924
927
  selected.filter(shape => !shapesToMove.includes(shape.model.get('type')))
925
928
  .forEach(shape => {
926
929
  oldPool.model.component.moveElement(shape.model, newPool.model);
927
930
  });
928
931
  },
932
+ moveConectedLinks(links, oldPool, newPool){
933
+ links.forEach(link => {
934
+ oldPool.model.component.moveFlow(link.model, newPool.model);
935
+ });
936
+ },
929
937
  },
930
938
  };
931
939
  </script>
@@ -26,7 +26,7 @@ export default {
26
26
  container: true,
27
27
  config: {
28
28
  initiallyOpen: true,
29
- label: 'Configuration',
29
+ label: 'Properties',
30
30
  icon: 'cog',
31
31
  name: 'inspector-accordion-association',
32
32
  },