@processmaker/modeler 1.31.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 (100) 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/img/issue-close.5d1630e6.svg +3 -0
  6. package/dist/img/issue-item.3187f291.svg +3 -0
  7. package/dist/img/issue-open.707390b4.svg +4 -0
  8. package/dist/img/validate-close.09ace97a.svg +4 -0
  9. package/dist/img/validate-open.b0ecf74e.svg +4 -0
  10. package/dist/modeler.common.js +3354 -2489
  11. package/dist/modeler.common.js.map +1 -1
  12. package/dist/modeler.umd.js +3354 -2489
  13. package/dist/modeler.umd.js.map +1 -1
  14. package/dist/modeler.umd.min.js +4 -4
  15. package/dist/modeler.umd.min.js.map +1 -1
  16. package/package.json +2 -2
  17. package/src/.DS_Store +0 -0
  18. package/src/ModelerApp.vue +0 -9
  19. package/src/NodeIdGenerator.js +16 -1
  20. package/src/assets/inspector.svg +5 -0
  21. package/src/assets/toolpanel/inclusive-gateway.svg +2 -2
  22. package/src/assets/topRail/issue-close.svg +3 -0
  23. package/src/assets/topRail/issue-item.svg +3 -0
  24. package/src/assets/topRail/issue-open.svg +4 -0
  25. package/src/assets/topRail/validate-close.svg +4 -0
  26. package/src/assets/topRail/validate-open.svg +4 -0
  27. package/src/components/controls/controls.vue +2 -11
  28. package/src/components/crown/crownButtons/addLaneAboveButton.vue +3 -1
  29. package/src/components/crown/crownButtons/addLaneBelowButton.vue +3 -1
  30. package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +2 -1
  31. package/src/components/crown/crownButtons/genericFlowButton.vue +2 -1
  32. package/src/components/crown/crownButtons/icons/faAlignLeft.js +1 -1
  33. package/src/components/crown/crownMultiselect/crownAlign.vue +3 -0
  34. package/src/components/crown/crownMultiselect/crownMultiselect.vue +4 -2
  35. package/src/components/hotkeys/escKey.js +20 -0
  36. package/src/components/hotkeys/main.js +4 -2
  37. package/src/components/inspectors/InspectorPanel.vue +26 -3
  38. package/src/components/inspectors/inspector.scss +11 -0
  39. package/src/components/inspectors/inspectorButton/InspectorButton.vue +38 -0
  40. package/src/components/inspectors/inspectorButton/inspectorButton.scss +19 -0
  41. package/src/components/inspectors/process.js +1 -1
  42. package/src/components/modeler/Modeler.vue +62 -5
  43. package/src/components/modeler/ModelerReadonly.vue +52 -6
  44. package/src/components/modeler/Selection.vue +9 -1
  45. package/src/components/nodes/association/index.js +1 -1
  46. package/src/components/nodes/baseStartEvent/index.js +1 -1
  47. package/src/components/nodes/boundaryEvent/index.js +1 -1
  48. package/src/components/nodes/dataInputAssociation/index.js +1 -1
  49. package/src/components/nodes/dataObject/index.js +1 -1
  50. package/src/components/nodes/dataOutputAssociation/index.js +1 -1
  51. package/src/components/nodes/dataStore/index.js +1 -1
  52. package/src/components/nodes/endEvent/index.js +1 -1
  53. package/src/components/nodes/eventBasedGateway/index.js +1 -1
  54. package/src/components/nodes/exclusiveGateway/index.js +1 -1
  55. package/src/components/nodes/gateway/index.js +1 -1
  56. package/src/components/nodes/inclusiveGateway/index.js +1 -1
  57. package/src/components/nodes/intermediateEvent/index.js +1 -1
  58. package/src/components/nodes/intermediateMessageEvent/index.js +1 -1
  59. package/src/components/nodes/intermediateTimerEvent/index.js +1 -1
  60. package/src/components/nodes/manualTask/index.js +1 -1
  61. package/src/components/nodes/messageFlow/index.js +1 -1
  62. package/src/components/nodes/parallelGateway/index.js +1 -1
  63. package/src/components/nodes/pool/index.js +1 -1
  64. package/src/components/nodes/pool/pool.vue +10 -4
  65. package/src/components/nodes/poolLane/index.js +1 -1
  66. package/src/components/nodes/scriptTask/index.js +1 -1
  67. package/src/components/nodes/sequenceFlow/index.js +1 -1
  68. package/src/components/nodes/serviceTask/index.js +1 -1
  69. package/src/components/nodes/subProcess/index.js +1 -1
  70. package/src/components/nodes/task/index.js +1 -1
  71. package/src/components/nodes/textAnnotation/index.js +1 -1
  72. package/src/components/railBottom/controls/Controls.vue +15 -75
  73. package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +5 -5
  74. package/src/components/rails/explorer-rail/explorer-rail.scss +11 -0
  75. package/src/components/rails/explorer-rail/explorer.vue +12 -3
  76. package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +15 -3
  77. package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +8 -73
  78. package/src/components/rails/explorer-rail/pmBlocksLoop/pmBlocksLoop.vue +76 -0
  79. package/src/components/shapeStackUtils.js +1 -1
  80. package/src/components/toolbar/ToolBar.vue +62 -55
  81. package/src/components/toolbar/toolbar.scss +55 -15
  82. package/src/components/topRail/TopRail.vue +92 -0
  83. package/src/components/topRail/topRail.scss +6 -0
  84. package/src/components/topRail/validateControl/index.js +3 -0
  85. package/src/components/topRail/validateControl/validateButton/ValidateButton.vue +39 -0
  86. package/src/components/topRail/validateControl/validateButton/validateButton.scss +25 -0
  87. package/src/components/topRail/validateControl/validateIssue/ValidateIssue.vue +60 -0
  88. package/src/components/topRail/validateControl/validateIssue/validateIssue.scss +54 -0
  89. package/src/components/topRail/validateControl/validatePanel/ValidatePanel.vue +54 -0
  90. package/src/components/topRail/validateControl/validatePanel/validatePanel.scss +67 -0
  91. package/src/mixins/clickAndDrop.js +107 -0
  92. package/src/mixins/highlightConfig.js +78 -10
  93. package/src/mixins/linkConfig.js +32 -8
  94. package/src/nodeTypesStore.js +48 -0
  95. package/src/setup/registerPmBlock.js +0 -0
  96. package/vue.config.js +1 -0
  97. package/dist/img/distribute-horizontally-icon.5c513cf4.svg +0 -3
  98. package/dist/img/distribute-vertically-icon.a35fb699.svg +0 -3
  99. package/dist/img/inclusive-gateway.754cb36f.svg +0 -4
  100. 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.31.0",
3
+ "version": "1.33.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "open-cypress": "TZ=UTC cypress open",
@@ -74,7 +74,7 @@
74
74
  "@babel/core": "^7.12.7",
75
75
  "@cypress/code-coverage": "^1.14.0",
76
76
  "@panter/vue-i18next": "^0.15.2",
77
- "@processmaker/processmaker-bpmn-moddle": "0.13.0",
77
+ "@processmaker/processmaker-bpmn-moddle": "0.14.0",
78
78
  "@types/jest": "^24.9.1",
79
79
  "@vue/babel-preset-app": "^5.0.4",
80
80
  "@vue/cli-plugin-babel": "^4.5.9",
package/src/.DS_Store CHANGED
Binary file
@@ -18,14 +18,6 @@
18
18
  <b-card-body class="overflow-hidden position-relative p-0 vh-100">
19
19
  <modeler ref="modeler" @set-xml-manager="xmlManager = $event" @validate="validationErrors = $event" @warnings="warnings = $event" :decorations="decorations" />
20
20
  </b-card-body>
21
- <!-- TODO remove me when the time comes -->
22
- <!-- <validation-status ref="validationStatus"-->
23
- <!-- :validation-errors="validationErrors"-->
24
- <!-- :warnings="warnings"-->
25
- <!-- :xml-manager="xmlManager"-->
26
- <!-- >-->
27
- <!-- <component v-for="(component, index) in validationBar" :key="index" :is="component" />-->
28
- <!-- </validation-status>-->
29
21
  </b-card>
30
22
 
31
23
  <b-modal
@@ -64,7 +56,6 @@ export default {
64
56
  },
65
57
  data() {
66
58
  return {
67
- validationBar: [],
68
59
  decorations: {
69
60
  borderOutline: {},
70
61
  },
@@ -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>
@@ -0,0 +1,3 @@
1
+ <svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0.693905 5.53599L6.00816 0.222004C6.26437 -0.0342065 6.68 -0.0342065 6.93621 0.222004L7.55609 0.841887C7.81203 1.09782 7.8123 1.51236 7.55719 1.76884L3.34543 6.00001L7.55691 10.2315C7.8123 10.4879 7.81176 10.9025 7.55582 11.1584L6.93594 11.7783C6.67973 12.0345 6.2641 12.0345 6.00789 11.7783L0.693905 6.46404C0.437694 6.20782 0.437694 5.7922 0.693905 5.53599Z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 0.1875C2.78906 0.1875 0.1875 2.78906 0.1875 6C0.1875 9.21094 2.78906 11.8125 6 11.8125C9.21094 11.8125 11.8125 9.21094 11.8125 6C11.8125 2.78906 9.21094 0.1875 6 0.1875ZM8.85 7.52578C8.96016 7.63594 8.96016 7.81406 8.85 7.92422L7.92188 8.85C7.81172 8.96016 7.63359 8.96016 7.52344 8.85L6 7.3125L4.47422 8.85C4.36406 8.96016 4.18594 8.96016 4.07578 8.85L3.15 7.92188C3.03984 7.81172 3.03984 7.63359 3.15 7.52344L4.6875 6L3.15 4.47422C3.03984 4.36406 3.03984 4.18594 3.15 4.07578L4.07812 3.14766C4.18828 3.0375 4.36641 3.0375 4.47656 3.14766L6 4.6875L7.52578 3.15C7.63594 3.03984 7.81406 3.03984 7.92422 3.15L8.85234 4.07812C8.9625 4.18828 8.9625 4.36641 8.85234 4.47656L7.3125 6L8.85 7.52578Z" />
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="15" height="8" viewBox="0 0 15 8" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.96966 7.43098L0.896437 2.11689C0.603531 1.8606 0.603531 1.44508 0.896437 1.18881L1.60478 0.569014C1.89719 0.313159 2.37109 0.312666 2.66419 0.56792L7.5 4.77943L12.3358 0.56792C12.6289 0.312666 13.1028 0.313159 13.3952 0.569014L14.1035 1.18881C14.3964 1.44511 14.3964 1.86062 14.1035 2.11689L8.03034 7.43098C7.73744 7.68725 7.26256 7.68725 6.96966 7.43098Z" />
3
+ </svg>
4
+
@@ -0,0 +1,4 @@
1
+ <svg width="18" height="16" viewBox="0 0 18 16" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1.81873 8C1.81873 4.39289 4.74287 1.46875 8.34998 1.46875C9.54059 1.46875 10.6551 1.78679 11.6152 2.34215C11.899 2.50635 12.2622 2.40935 12.4264 2.1255C12.5906 1.84166 12.4936 1.47844 12.2098 1.31424C11.0739 0.657144 9.75491 0.28125 8.34998 0.28125C4.08703 0.28125 0.631226 3.73705 0.631226 8C0.631226 12.2629 4.08703 15.7188 8.34998 15.7188C12.6129 15.7188 16.0687 12.2629 16.0687 8C16.0687 7.67208 15.8029 7.40625 15.475 7.40625C15.1471 7.40625 14.8812 7.67208 14.8812 8C14.8812 11.6071 11.9571 14.5312 8.34998 14.5312C4.74287 14.5312 1.81873 11.6071 1.81873 8Z" />
3
+ <path d="M17.0823 2.48234C17.3142 2.25047 17.3142 1.87453 17.0823 1.64266C16.8504 1.41078 16.4745 1.41078 16.2426 1.64266L8.34998 9.53531L5.20732 6.39266C4.97545 6.16078 4.5995 6.16078 4.36763 6.39266C4.13576 6.62453 4.13576 7.00047 4.36763 7.23234L7.93013 10.7948C8.162 11.0267 8.53795 11.0267 8.76982 10.7948L17.0823 2.48234Z" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="19" height="18" viewBox="0 0 19 18" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1.80589 9C1.80589 13.2502 5.25137 16.6957 9.50156 16.6957C13.7517 16.6957 17.1972 13.2502 17.1972 9C17.1972 4.75024 13.7524 1.30498 9.50272 1.30435C9.14254 1.30429 8.85058 1.01226 8.85063 0.652077C8.85069 0.291891 9.14273 -5.34573e-05 9.50291 7.34216e-09C14.4729 0.000737734 18.5016 4.02995 18.5016 9C18.5016 13.9706 14.4721 18 9.50156 18C4.53099 18 0.501541 13.9706 0.501541 9C0.501541 7.11913 1.08174 5.32928 2.12769 3.83814L1.38144 3.18945C0.988324 2.84772 1.13471 2.20576 1.63712 2.06822L4.47212 1.29212C4.92098 1.16925 5.3504 1.54254 5.29118 2.00413L4.9172 4.91955C4.85093 5.43621 4.23559 5.67051 3.84247 5.32877L3.11835 4.6993C2.27288 5.95119 1.80589 7.43811 1.80589 9Z" />
3
+ <path d="M12.7244 5.87213C13.0539 5.54262 13.5881 5.54262 13.9176 5.87213C14.2431 6.19759 14.2471 6.72279 13.9296 7.05316L9.43837 12.6672C9.43189 12.6753 9.42496 12.683 9.41763 12.6904C9.08812 13.0199 8.55389 13.0199 8.22438 12.6904L5.24713 9.71312C4.91762 9.38361 4.91762 8.84938 5.24713 8.51988C5.57663 8.19037 6.11087 8.19037 6.44037 8.51988L8.79558 10.8751L12.702 5.89737C12.709 5.88851 12.7164 5.88009 12.7244 5.87213Z" />
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,
@@ -0,0 +1,20 @@
1
+ import nodeTypesStore from '@/nodeTypesStore';
2
+
3
+ export default {
4
+ methods: {
5
+ escapeKeyHandler(event) {
6
+ if (this.selectedNode) {
7
+ event.preventDefault();
8
+ window.ProcessMaker.EventBus.$emit('custom-pointerclick', event);
9
+ }
10
+ },
11
+ },
12
+ computed: {
13
+ selectedNode() {
14
+ return nodeTypesStore.getters.getSelectedNode;
15
+ },
16
+ movedElement() {
17
+ return nodeTypesStore.getters.getGhostNode;
18
+ },
19
+ },
20
+ };
@@ -1,10 +1,11 @@
1
1
  import ZoomInOut from './zoomInOut';
2
2
  import CopyPaste from './copyPaste.js';
3
- import store from '@/store';
4
3
  import moveShapeByKeypress from './moveWithArrowKeys';
4
+ import EscKey from './escKey';
5
+ import store from '@/store';
5
6
 
6
7
  export default {
7
- mixins: [ZoomInOut, CopyPaste],
8
+ mixins: [ZoomInOut, CopyPaste, EscKey],
8
9
  computed: {
9
10
  clientLeftPaper() {
10
11
  return store.getters.clientLeftPaper;
@@ -19,6 +20,7 @@ export default {
19
20
  // Pass event to all handlers
20
21
  this.zoomInOutHandler(event, options);
21
22
  this.copyPasteHandler(event, options);
23
+ this.escapeKeyHandler(event);
22
24
  },
23
25
  keyupListener(event) {
24
26
  if (event.code === 'Space') {
@@ -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
  },
@@ -7,11 +7,16 @@
7
7
  :paper-manager="paperManager"
8
8
  :breadcrumb-data="breadcrumbData"
9
9
  :panelsCompressed="panelsCompressed"
10
+ :validation-errors="validationErrors"
11
+ :warnings="allWarnings"
12
+ :xml-manager="xmlManager"
13
+ :validationBar="validationBar"
10
14
  @load-xml="loadXML"
11
15
  @toggle-panels-compressed="panelsCompressed = !panelsCompressed"
12
16
  @toggle-mini-map-open="miniMapOpen = $event"
13
17
  @saveBpmn="saveBpmn"
14
18
  @publishTemplate="publishTemplate"
19
+ @publishPmBlock="publishPmBlock"
15
20
  @close="close"
16
21
  @save-state="pushToUndoStack"
17
22
  @clearSelection="clearSelection"
@@ -25,6 +30,7 @@
25
30
  />
26
31
  <explorer-rail
27
32
  :node-types="nodeTypes"
33
+ :pm-block-nodes="pmBlockNodes"
28
34
  @set-cursor="cursor = $event"
29
35
  @onCreateElement="onCreateElementHandler"
30
36
  />
@@ -38,9 +44,14 @@
38
44
  <div ref="paper" data-test="paper" class="main-paper" />
39
45
  </b-col>
40
46
 
47
+ <InspectorButton
48
+ :showInspector="isOpenInspector"
49
+ @toggleInspector="handleToggleInspector"
50
+ />
51
+
41
52
  <InspectorPanel
42
53
  ref="inspector-panel"
43
- v-show="!(highlightedNodes.length > 1)"
54
+ v-show="isOpenInspector && !(highlightedNodes.length > 1)"
44
55
  :style="{ height: parentHeight }"
45
56
  :nodeRegistry="nodeRegistry"
46
57
  :moddle="moddle"
@@ -50,8 +61,8 @@
50
61
  class="inspector h-100"
51
62
  :parent-height="parentHeight"
52
63
  :canvas-drag-position="canvasDragPosition"
53
- :compressed="panelsCompressed && noElementsSelected"
54
64
  @shape-resize="shapeResize(false)"
65
+ @toggleInspector="handleToggleInspector"
55
66
  />
56
67
 
57
68
  <component
@@ -135,6 +146,8 @@ import ExplorerRail from '../rails/explorer-rail/explorer';
135
146
  import pull from 'lodash/pull';
136
147
  import remove from 'lodash/remove';
137
148
  import store from '@/store';
149
+ import nodeTypesStore from '@/nodeTypesStore';
150
+ import InspectorButton from '@/components/inspectors/inspectorButton/InspectorButton.vue';
138
151
  import InspectorPanel from '@/components/inspectors/InspectorPanel';
139
152
  import undoRedoStore from '@/undoRedoStore';
140
153
  import { Linter } from 'bpmnlint';
@@ -185,6 +198,7 @@ export default {
185
198
  components: {
186
199
  ToolBar,
187
200
  ExplorerRail,
201
+ InspectorButton,
188
202
  InspectorPanel,
189
203
  ProcessmakerModelerGenericFlow,
190
204
  Selection,
@@ -198,6 +212,7 @@ export default {
198
212
  return {};
199
213
  },
200
214
  },
215
+ validationBar: Array,
201
216
  },
202
217
  mixins: [hotkeys, cloneSelection],
203
218
  data() {
@@ -237,10 +252,12 @@ export default {
237
252
  validationErrors: {},
238
253
  miniMapOpen: false,
239
254
  panelsCompressed: false,
255
+ isOpenInspector: false,
240
256
  isGrabbing: false,
241
257
  isRendering: false,
242
258
  allWarnings: [],
243
259
  nodeTypes: [],
260
+ pmBlockNodes: [],
244
261
  breadcrumbData: [],
245
262
  activeNode: null,
246
263
  xmlManager: null,
@@ -311,6 +328,9 @@ export default {
311
328
  },
312
329
  },
313
330
  methods: {
331
+ handleToggleInspector(value) {
332
+ this.isOpenInspector = value;
333
+ },
314
334
  isAppleOS() {
315
335
  return typeof navigator !== 'undefined' && /Mac|iPad|iPhone/.test(navigator.platform);
316
336
  },
@@ -357,6 +377,9 @@ export default {
357
377
  publishTemplate() {
358
378
  this.$emit('publishTemplate');
359
379
  },
380
+ publishPmBlock() {
381
+ this.$emit('publishPmBlock');
382
+ },
360
383
  async pasteElements() {
361
384
  if (this.copiedElements.length > 0 && !this.pasteInProgress) {
362
385
  this.pasteInProgress = true;
@@ -518,8 +541,7 @@ export default {
518
541
  } else {
519
542
  process = this.moddle.create('bpmn:Process');
520
543
  this.processes.push(process);
521
- process.set('id', `process_${this.processes.length}`);
522
-
544
+ process.set('id', this.nodeIdGenerator.generateProcessId());
523
545
  this.definitions.get('rootElements').push(process);
524
546
  }
525
547
 
@@ -615,6 +637,29 @@ export default {
615
637
  this.parsers[bpmnType].default.push(defaultParser);
616
638
  });
617
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
+ },
618
663
  addMessageFlows() {
619
664
  if (this.collaboration) {
620
665
  this.collaboration
@@ -1000,6 +1045,16 @@ export default {
1000
1045
  this.$refs.selector.clearSelection();
1001
1046
  await this.$nextTick();
1002
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
+
1003
1058
  },
1004
1059
  async removeNodes() {
1005
1060
  await this.performSingleUndoRedoTransaction(async() => {
@@ -1217,6 +1272,7 @@ export default {
1217
1272
  if (runningInCypressTest()) {
1218
1273
  /* Add reference to store on window; this is used in testing to verify rendered nodes */
1219
1274
  window.store = store;
1275
+ window.undoRedoStore = undoRedoStore;
1220
1276
  }
1221
1277
 
1222
1278
  this.$t = this.$t.bind(this);
@@ -1237,6 +1293,7 @@ export default {
1237
1293
  registerBpmnExtension: this.registerBpmnExtension,
1238
1294
  registerNode: this.registerNode,
1239
1295
  registerStatusBar: this.registerStatusBar,
1296
+ registerPmBlock: this.registerPmBlock,
1240
1297
  });
1241
1298
 
1242
1299
  this.moddle = new BpmnModdle(this.extensions);
@@ -1367,4 +1424,4 @@ export default {
1367
1424
  },
1368
1425
  };
1369
1426
  </script>
1370
- <style lang="scss" src="./modeler.scss" />
1427
+ <style lang="scss" src="./modeler.scss" />