@processmaker/modeler 1.30.3 → 1.32.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 (207) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/img/{boundary-event.5bf51421.svg → boundary-event.4e0fb9de.svg} +3 -3
  3. package/dist/img/clipboard.5fe6f79e.svg +3 -0
  4. package/dist/img/conditional-start-event.a56e4b5b.svg +4 -0
  5. package/dist/img/{connect-artifacts.5f8bed89.svg → connect-artifacts.496eb4b9.svg} +3 -3
  6. package/dist/img/{connect-elements.d4abedf2.svg → connect-elements.9ec5ca93.svg} +3 -3
  7. package/dist/img/copy-regular.2d678143.svg +3 -0
  8. package/dist/img/data-object.0d6d1585.svg +3 -0
  9. package/dist/img/data-store.32bed5ce.svg +3 -0
  10. package/dist/img/{default-flow.212147b4.svg → default-flow.156a793b.svg} +3 -3
  11. package/dist/img/end-event.9d1ff5c0.svg +3 -0
  12. package/dist/img/error-end-event.aab86eca.svg +11 -0
  13. package/dist/img/event-based-gateway.9960eee5.svg +6 -0
  14. package/dist/img/exclusive-gateway.26db4fae.svg +4 -0
  15. package/dist/img/generic-gateway.09ca6929.svg +3 -0
  16. package/dist/img/generic-intermediate-event.a711eb33.svg +4 -0
  17. package/dist/img/inclusive-gateway.754cb36f.svg +4 -0
  18. package/dist/img/intermediate-conditional-catch-event.e9ae6198.svg +5 -0
  19. package/dist/img/intermediate-message-catch-event.9d25208e.svg +5 -0
  20. package/dist/img/intermediate-message-throw-event.4309dc45.svg +5 -0
  21. package/dist/img/intermediate-signal-catch-event.74b65f17.svg +5 -0
  22. package/dist/img/intermediate-signal-throw-event.29cad018.svg +5 -0
  23. package/dist/img/intermediate-timer-event.1670a1c8.svg +5 -0
  24. package/dist/img/issue-close.5d1630e6.svg +3 -0
  25. package/dist/img/issue-item.3187f291.svg +3 -0
  26. package/dist/img/issue-open.707390b4.svg +4 -0
  27. package/dist/img/{lane-below.890c069b.svg → lane-below.e67f9823.svg} +12 -12
  28. package/dist/img/manual-task.374a73c3.svg +4 -0
  29. package/dist/img/message-end-event.f15b67f5.svg +4 -0
  30. package/dist/img/message-start-event.f2d4a5e6.svg +4 -0
  31. package/dist/img/mini-map.ae46890c.svg +3 -0
  32. package/dist/img/minus.ca21cc3b.svg +3 -0
  33. package/dist/img/parallel-gateway.877bb628.svg +4 -0
  34. package/dist/img/pin-angle-fill.0e4af645.svg +3 -0
  35. package/dist/img/pin-angle.3462c115.svg +3 -0
  36. package/dist/img/plus.afbb0b13.svg +3 -0
  37. package/dist/img/pool.98d4734c.svg +3 -0
  38. package/dist/img/redo.8425ce7e.svg +4 -0
  39. package/dist/img/script-task.3d8c664a.svg +4 -0
  40. package/dist/img/signal-end-event.a38a6616.svg +4 -0
  41. package/dist/img/signal-start-event.3d7b096c.svg +4 -0
  42. package/dist/img/start-event.7f1911cb.svg +3 -0
  43. package/dist/img/sub-task.52d09847.svg +4 -0
  44. package/dist/img/task.8a1c6c75.svg +3 -0
  45. package/dist/img/terminate-end-event.3aa5cd00.svg +4 -0
  46. package/dist/img/text-annotation.02df53cd.svg +3 -0
  47. package/dist/img/timer-start-event.55abac82.svg +4 -0
  48. package/dist/img/trash-alt-solid.58c408b8.svg +1 -0
  49. package/dist/img/undo.e0ffff93.svg +4 -0
  50. package/dist/img/validate-close.09ace97a.svg +4 -0
  51. package/dist/img/validate-open.b0ecf74e.svg +4 -0
  52. package/dist/modeler.common.js +27454 -19961
  53. package/dist/modeler.common.js.map +1 -1
  54. package/dist/modeler.umd.js +27454 -19961
  55. package/dist/modeler.umd.js.map +1 -1
  56. package/dist/modeler.umd.min.js +28 -3
  57. package/dist/modeler.umd.min.js.map +1 -1
  58. package/jsconfig.json +12 -0
  59. package/package.json +4 -2
  60. package/src/.DS_Store +0 -0
  61. package/src/ModelerApp.vue +13 -22
  62. package/src/assets/boundary-event.svg +3 -3
  63. package/src/assets/clipboard.svg +3 -1
  64. package/src/assets/cog-solid.svg +1 -0
  65. package/src/assets/connect-artifacts.svg +3 -3
  66. package/src/assets/connect-elements.svg +3 -3
  67. package/src/assets/copy-regular.svg +3 -1
  68. package/src/assets/default-flow.svg +3 -3
  69. package/src/assets/lane-below.svg +12 -12
  70. package/src/assets/palette.svg +1 -0
  71. package/src/assets/pin-angle-fill.svg +3 -0
  72. package/src/assets/pin-angle.svg +3 -0
  73. package/src/assets/railBottom/mini-map.svg +3 -0
  74. package/src/assets/railBottom/minus.svg +3 -0
  75. package/src/assets/railBottom/plus.svg +3 -0
  76. package/src/assets/railBottom/redo.svg +4 -0
  77. package/src/assets/railBottom/undo.svg +4 -0
  78. package/src/assets/scss/settings/_settings.variables.scss +5 -0
  79. package/src/assets/scss/tools/_tools.chevron.scss +1 -1
  80. package/src/assets/toolpanel/conditional-start-event.svg +4 -0
  81. package/src/assets/toolpanel/data-object.svg +2 -8
  82. package/src/assets/toolpanel/data-store.svg +2 -5
  83. package/src/assets/toolpanel/end-event.svg +3 -19
  84. package/src/assets/toolpanel/error-end-event.svg +11 -0
  85. package/src/assets/toolpanel/event-based-gateway.svg +6 -0
  86. package/src/assets/toolpanel/exclusive-gateway.svg +4 -0
  87. package/src/assets/toolpanel/generic-gateway.svg +2 -13
  88. package/src/assets/toolpanel/generic-intermediate-event.svg +3 -4
  89. package/src/assets/toolpanel/inclusive-gateway.svg +4 -0
  90. package/src/assets/toolpanel/intermediate-conditional-catch-event.svg +5 -0
  91. package/src/assets/toolpanel/intermediate-message-catch-event.svg +5 -0
  92. package/src/assets/toolpanel/intermediate-message-throw-event.svg +4 -5
  93. package/src/assets/toolpanel/intermediate-signal-catch-event.svg +5 -0
  94. package/src/assets/toolpanel/intermediate-signal-throw-event.svg +5 -0
  95. package/src/assets/toolpanel/intermediate-timer-event.svg +5 -0
  96. package/src/assets/toolpanel/manual-task.svg +4 -0
  97. package/src/assets/toolpanel/message-end-event.svg +4 -0
  98. package/src/assets/toolpanel/message-start-event.svg +3 -3
  99. package/src/assets/toolpanel/parallel-gateway.svg +4 -0
  100. package/src/assets/toolpanel/pool.svg +3 -11
  101. package/src/assets/toolpanel/script-task.svg +4 -0
  102. package/src/assets/toolpanel/signal-end-event.svg +4 -0
  103. package/src/assets/toolpanel/signal-start-event.svg +4 -0
  104. package/src/assets/toolpanel/start-event.svg +3 -19
  105. package/src/assets/toolpanel/sub-task.svg +4 -0
  106. package/src/assets/toolpanel/task.svg +3 -14
  107. package/src/assets/toolpanel/terminate-end-event.svg +4 -0
  108. package/src/assets/toolpanel/text-annotation.svg +3 -17
  109. package/src/assets/toolpanel/timer-start-event.svg +4 -0
  110. package/src/assets/topRail/issue-close.svg +3 -0
  111. package/src/assets/topRail/issue-item.svg +3 -0
  112. package/src/assets/topRail/issue-open.svg +4 -0
  113. package/src/assets/topRail/validate-close.svg +4 -0
  114. package/src/assets/topRail/validate-open.svg +4 -0
  115. package/src/assets/trash-alt-solid.svg +1 -4
  116. package/src/components/crown/crownButtons/addLaneAboveButton.vue +6 -4
  117. package/src/components/crown/crownButtons/addLaneBelowButton.vue +6 -4
  118. package/src/components/crown/crownButtons/associationFlowButton.vue +1 -14
  119. package/src/components/crown/crownButtons/cloneButton.vue +1 -6
  120. package/src/components/crown/crownButtons/copyButton.vue +1 -4
  121. package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +7 -2
  122. package/src/components/crown/crownButtons/crownButton.vue +36 -11
  123. package/src/components/crown/crownButtons/crownColorDropdown.vue +1 -1
  124. package/src/components/crown/crownButtons/crownDropdown.scss +4 -9
  125. package/src/components/crown/crownButtons/crownTaskDropdown.vue +1 -1
  126. package/src/components/crown/crownButtons/deleteButton.vue +1 -7
  127. package/src/components/crown/crownButtons/genericFlowButton.vue +4 -4
  128. package/src/components/crown/crownButtons/icons/faAlignBottom.js +11 -0
  129. package/src/components/crown/crownButtons/icons/faAlignLeft.js +11 -0
  130. package/src/components/crown/crownButtons/icons/faAlignRight.js +11 -0
  131. package/src/components/crown/crownButtons/icons/faAlignTop.js +11 -0
  132. package/src/components/crown/crownButtons/icons/faBoundaryEvent.js +11 -0
  133. package/src/components/crown/crownButtons/icons/faCenterHorizontally.js +11 -0
  134. package/src/components/crown/crownButtons/icons/faCenterVertically.js +11 -0
  135. package/src/components/crown/crownButtons/icons/faConnectElements.js +11 -0
  136. package/src/components/crown/crownButtons/icons/faDistributeHorizontally.js +11 -0
  137. package/src/components/crown/crownButtons/icons/faDistributeVertically.js +11 -0
  138. package/src/components/crown/crownButtons/icons/faLaneAbove.js +11 -0
  139. package/src/components/crown/crownButtons/icons/faLaneBelow.js +11 -0
  140. package/src/components/crown/crownButtons/icons/index.js +12 -0
  141. package/src/components/crown/crownConfig/crownConfig.scss +5 -4
  142. package/src/components/crown/crownConfig/crownConfig.vue +5 -2
  143. package/src/components/crown/crownMultiselect/crownAlign.scss +20 -0
  144. package/src/components/crown/crownMultiselect/crownAlign.vue +302 -0
  145. package/src/components/crown/crownMultiselect/crownMultiselect.vue +60 -14
  146. package/src/components/hotkeys/escKey.js +20 -0
  147. package/src/components/hotkeys/main.js +4 -2
  148. package/src/components/miniPaper/MiniPaper.vue +16 -2
  149. package/src/components/miniPaper/miniPaper.scss +6 -12
  150. package/src/components/modeler/Modeler.vue +32 -22
  151. package/src/components/modeler/ModelerReadonly.vue +1011 -0
  152. package/src/components/modeler/Selection.vue +11 -9
  153. package/src/components/nodes/endEvent/index.js +37 -0
  154. package/src/components/nodes/exclusiveGateway/index.js +30 -0
  155. package/src/components/nodes/index.js +1 -0
  156. package/src/components/nodes/intermediateTimerEvent/index.js +44 -0
  157. package/src/components/nodes/startEvent/index.js +43 -0
  158. package/src/components/nodes/task/index.js +30 -0
  159. package/src/components/railBottom/RailBottom.vue +120 -0
  160. package/src/components/railBottom/controls/Controls.vue +80 -0
  161. package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +188 -0
  162. package/src/components/railBottom/controls/controls.scss +98 -0
  163. package/src/components/railBottom/icons/MinusIcon.vue +5 -0
  164. package/src/components/railBottom/icons/PlusIcon.vue +5 -0
  165. package/src/components/railBottom/icons/index.js +2 -0
  166. package/src/components/railBottom/miniPaperControl/MiniPaperControl.vue +46 -0
  167. package/src/components/railBottom/miniPaperControl/miniPaperControl.scss +45 -0
  168. package/src/components/railBottom/railBottom.scss +28 -0
  169. package/src/components/railBottom/undoRedoControl/UndoRedoControl.vue +89 -0
  170. package/src/components/railBottom/undoRedoControl/undoRedoControl.scss +51 -0
  171. package/src/components/railBottom/zoomControl/ZoomControl.vue +80 -0
  172. package/src/components/railBottom/zoomControl/zoomControl.scss +66 -0
  173. package/src/components/rails/explorer-rail/explorer-rail.scss +55 -0
  174. package/src/components/rails/explorer-rail/explorer.vue +93 -0
  175. package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +54 -0
  176. package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +164 -0
  177. package/src/components/rails/explorer-rail/rankConstants.js +1 -0
  178. package/src/components/toolbar/ToolBar.vue +23 -80
  179. package/src/components/topRail/TopRail.vue +91 -0
  180. package/src/components/topRail/topRail.scss +6 -0
  181. package/src/components/topRail/validateControl/index.js +3 -0
  182. package/src/components/topRail/validateControl/validateButton/ValidateButton.vue +38 -0
  183. package/src/components/topRail/validateControl/validateButton/validateButton.scss +25 -0
  184. package/src/components/topRail/validateControl/validateIssue/ValidateIssue.vue +59 -0
  185. package/src/components/topRail/validateControl/validateIssue/validateIssue.scss +54 -0
  186. package/src/components/topRail/validateControl/validatePanel/ValidatePanel.vue +51 -0
  187. package/src/components/topRail/validateControl/validatePanel/validatePanel.scss +67 -0
  188. package/src/main.js +6 -0
  189. package/src/mixins/clickAndDrop.js +100 -0
  190. package/src/mixins/highlightConfig.js +52 -8
  191. package/src/mixins/linkConfig.js +7 -0
  192. package/src/mixins/resizeConfig.js +3 -1
  193. package/src/nodeTypesStore.js +133 -0
  194. package/src/store.js +5 -0
  195. package/dist/img/clipboard.bcc7796a.svg +0 -1
  196. package/dist/img/copy-regular.3eb4c04a.svg +0 -1
  197. package/dist/img/data-object.e931f8e7.svg +0 -9
  198. package/dist/img/data-store.7ca4c899.svg +0 -6
  199. package/dist/img/end-event.1ad31396.svg +0 -19
  200. package/dist/img/generic-gateway.3a76fc75.svg +0 -14
  201. package/dist/img/generic-intermediate-event.ba2e1d71.svg +0 -5
  202. package/dist/img/intermediate-message-throw-event.ac432d96.svg +0 -6
  203. package/dist/img/pool.ac62ddae.svg +0 -11
  204. package/dist/img/start-event.e895cee2.svg +0 -19
  205. package/dist/img/task.e7419065.svg +0 -14
  206. package/dist/img/text-annotation.926416f4.svg +0 -17
  207. package/dist/img/trash-alt-solid.f2f64c1f.svg +0 -4
@@ -0,0 +1,98 @@
1
+ .control {
2
+
3
+ &-list {
4
+ display: flex;
5
+ align-items: center;
6
+ margin: 0px;
7
+ padding: 4px;
8
+ background-color: #ffffff;
9
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
10
+ border-radius: 8px;
11
+ list-style: none;
12
+ }
13
+
14
+ &-item {
15
+ position: relative;
16
+ display: flex;
17
+ flex-direction: column;
18
+ justify-content: center;
19
+ align-items: center;
20
+ width: 40px;
21
+ height: 40px;
22
+ margin-right: 12px;
23
+ border-radius: 4px;
24
+ cursor: pointer;
25
+
26
+ &:last-child {
27
+ margin-right: 0;
28
+ }
29
+
30
+ &:hover {
31
+ background-color: #ebeef2;
32
+ }
33
+
34
+ &.active {
35
+ background-color: #D4D7F4;
36
+
37
+ &::v-deep a > svg {
38
+ fill: #1264AA;
39
+ }
40
+ }
41
+
42
+ &-options {
43
+ position: absolute;
44
+ top: 0;
45
+ right: 0;
46
+ padding: 3px;
47
+ transform: rotate(47.59deg);
48
+ cursor: pointer;
49
+
50
+ & > span {
51
+ display: block;
52
+ width: 4px;
53
+ height: 3px;
54
+ background-color: #44494e;
55
+ clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
56
+ clip-path: padding-box;
57
+ }
58
+ }
59
+ }
60
+
61
+ &-add {
62
+ display: flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ width: 24px;
66
+ height: 24px;
67
+ background-color: #00AD73;
68
+ border-radius: 2px;
69
+ font-size: 13px;
70
+
71
+ & > svg {
72
+ fill: #ffffff;
73
+ }
74
+ }
75
+ }
76
+
77
+ .is-dragging {
78
+ color: $primary-white;
79
+ position: absolute;
80
+ z-index: 10;
81
+ box-shadow: 5px 5px 8px 0px #0000004a;
82
+ padding: 0.5rem;
83
+ pointer-events: none;
84
+ width: 40px;
85
+ height: 40px;
86
+ background-color: green;
87
+ &.no-drop {
88
+ opacity: 0.8;
89
+ cursor: no-drop;
90
+ pointer-events: none;
91
+ }
92
+
93
+ &:hover {
94
+ background-color: $primary-color;
95
+ color: $primary-white;
96
+ pointer-events: none;
97
+ }
98
+ }
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 3">
3
+ <path d="M0.356934 1.62744C0.356934 1.07516 0.868608 0.627441 1.49979 0.627441H17.4998C18.131 0.627441 18.6427 1.07516 18.6427 1.62744C18.6427 2.17973 18.131 2.62744 17.4998 2.62744H1.49979C0.868608 2.62744 0.356934 2.17973 0.356934 1.62744Z" />
4
+ </svg>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <svg viewBox="0 0 14 15" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M7.00021 0.770294C7.4736 0.770294 7.85735 1.15405 7.85735 1.62744V6.77029H13.0002C13.4736 6.77029 13.8574 7.15405 13.8574 7.62744C13.8574 8.10082 13.4736 8.48458 13.0002 8.48458H7.85735V13.6274C7.85735 14.1008 7.4736 14.4846 7.00021 14.4846C6.52682 14.4846 6.14307 14.1008 6.14307 13.6274V8.48458H1.00021C0.526822 8.48458 0.143066 8.10082 0.143066 7.62744C0.143066 7.15405 0.526822 6.77029 1.00021 6.77029H6.14307V1.62744C6.14307 1.15405 6.52682 0.770294 7.00021 0.770294Z" />
4
+ </svg>
5
+ </template>
@@ -0,0 +1,2 @@
1
+ export { default as MinusIcon } from './MinusIcon.vue';
2
+ export { default as PlusIcon } from './PlusIcon.vue';
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <div class="mini-paper-box">
3
+ <button
4
+ type="button"
5
+ class="mini-paper-button"
6
+ :class="miniMapOpen ? 'mini-paper-button-active' : ''"
7
+ data-cy="mini-paper-button"
8
+ @click="miniMapOpen = !miniMapOpen"
9
+ v-b-tooltip.hover
10
+ :title="miniMapOpen ? $t('Hide Mini-Map') : $t('Show Mini-Map')"
11
+ >
12
+ <inline-svg :src="miniMapIcon" />
13
+ </button>
14
+
15
+ <mini-paper
16
+ :isOpen="miniMapOpen"
17
+ :paperManager="paperManager"
18
+ :graph="graph"
19
+ />
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import InlineSvg from 'vue-inline-svg';
25
+ import MiniPaper from '@/components/miniPaper/MiniPaper.vue';
26
+
27
+ export default ({
28
+ components: {
29
+ InlineSvg,
30
+ MiniPaper,
31
+ },
32
+ props: {
33
+ paperManager: Object,
34
+ graph: Object,
35
+ },
36
+ data() {
37
+ return {
38
+ miniMapOpen: false,
39
+ miniMapIcon: require('@/assets/railBottom/mini-map.svg'),
40
+ };
41
+ },
42
+ });
43
+
44
+ </script>
45
+
46
+ <style lang="scss" scoped src="./miniPaperControl.scss"></style>
@@ -0,0 +1,45 @@
1
+ .mini-paper {
2
+ &-box {
3
+ position: relative;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ height: 48px;
8
+ margin-right: 14px;
9
+ padding: 6px 4px;
10
+ background-color: #ffffff;
11
+ border-radius: 8px;
12
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
13
+ }
14
+
15
+ &-button {
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ width: 40px;
20
+ height: 40px;
21
+ padding: 10px;
22
+ background-color: #ffffff;
23
+ border: 0 none;
24
+ border-radius: 4px;
25
+ cursor: pointer;
26
+
27
+ & > svg {
28
+ fill: #333344;
29
+ }
30
+
31
+ &:hover:not(.mini-paper-button-active) {
32
+ background-color: #ebeef2;
33
+ }
34
+
35
+ &:active,
36
+ &-active {
37
+ background-color: #DEEBFF;
38
+
39
+ & > svg {
40
+ fill: #1264AA;
41
+ }
42
+ }
43
+ }
44
+
45
+ }
@@ -0,0 +1,28 @@
1
+ .rail {
2
+ &-container {
3
+ position: absolute;
4
+ bottom: 20px;
5
+ left: 0;
6
+ display: flex;
7
+ align-items: center;
8
+ width: 100%;
9
+ height: 48px;
10
+ max-height: 48px;
11
+ z-index: 2;
12
+ }
13
+
14
+ &-left {
15
+ position: absolute;
16
+ display: flex;
17
+ width: auto;
18
+ padding: 0 35px;
19
+ }
20
+
21
+ &-center {
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ column-gap: 22px;
26
+ width: 100%;
27
+ }
28
+ }
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <div class="ur-box">
3
+ <button type="button"
4
+ class="ur-button"
5
+ data-cy="undo-control"
6
+ :disabled="!canUndo"
7
+ v-b-tooltip.hover
8
+ :title="$t('Undo')"
9
+ @click="undo"
10
+ >
11
+ <inline-svg :src="undoIcon" />
12
+ </button>
13
+
14
+ <button type="button"
15
+ class="ur-button"
16
+ data-cy="redo-control"
17
+ :disabled="!canRedo"
18
+ v-b-tooltip.hover
19
+ :title="$t('Redo')"
20
+ @click="redo"
21
+ >
22
+ <inline-svg :src="redoIcon" />
23
+ </button>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import InlineSvg from 'vue-inline-svg';
29
+ import undoRedoStore from '@/undoRedoStore';
30
+
31
+ export default ({
32
+ components: {
33
+ InlineSvg,
34
+ },
35
+ props: {
36
+ isRendering: {
37
+ type: Boolean,
38
+ },
39
+ },
40
+ data() {
41
+ return {
42
+ undoIcon: require('@/assets/railBottom/undo.svg'),
43
+ redoIcon: require('@/assets/railBottom/redo.svg'),
44
+ };
45
+ },
46
+ watch: {
47
+ canUndo(canUndo) {
48
+ if (!canUndo) {
49
+ this.$root.$emit('bv::hide::tooltip');
50
+ }
51
+ },
52
+ canRedo(canRedo) {
53
+ if (!canRedo) {
54
+ this.$root.$emit('bv::hide::tooltip');
55
+ }
56
+ },
57
+ },
58
+ computed: {
59
+ canUndo() {
60
+ return undoRedoStore.getters.canUndo;
61
+ },
62
+ canRedo() {
63
+ return undoRedoStore.getters.canRedo;
64
+ },
65
+ },
66
+ methods: {
67
+ undo() {
68
+ this.$emit('clearSelection');
69
+ if (this.isRendering) {
70
+ return;
71
+ }
72
+ undoRedoStore
73
+ .dispatch('undo')
74
+ .then(() => this.$emit('load-xml'));
75
+ },
76
+ redo() {
77
+ this.$emit('clearSelection');
78
+ if (this.isRendering) {
79
+ return;
80
+ }
81
+ undoRedoStore
82
+ .dispatch('redo')
83
+ .then(() => this.$emit('load-xml'));
84
+ },
85
+ },
86
+ });
87
+ </script>
88
+
89
+ <style lang="scss" scoped src="./undoRedoControl.scss"></style>
@@ -0,0 +1,51 @@
1
+ .ur {
2
+ &-box {
3
+ display: flex;
4
+ align-items: center;
5
+ height: 48px;
6
+ padding: 6px 4px;
7
+ background-color: #FFFFFF;
8
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
9
+ border-radius: 8px;
10
+ z-index: 2;
11
+ }
12
+
13
+ &-button {
14
+ justify-content: center;
15
+ display: flex;
16
+ align-items: center;
17
+ width: 40px;
18
+ height: 40px;
19
+ padding: 12px;
20
+ background-color: #ffffff;
21
+ border: 0 none;
22
+ border-radius: 4px;
23
+ color: #333344;
24
+ cursor: pointer;
25
+ outline: none;
26
+
27
+ &:hover {
28
+ background-color: #ebeef2;
29
+ }
30
+
31
+ &:active {
32
+ background-color: #DEEBFF;
33
+
34
+ & > svg {
35
+ fill: #1264AA;
36
+ }
37
+ }
38
+
39
+ &:disabled {
40
+ background-color: #ffffff;
41
+ color: #7e7e92;
42
+ cursor: not-allowed;
43
+ }
44
+
45
+ & > svg {
46
+ width: 24px;
47
+ height: 24px;
48
+ fill: #333344;
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <div class="zoom-box">
3
+ <button
4
+ type="button"
5
+ class="zoom-button"
6
+ data-cy="zoom-out-control"
7
+ @click="onClickZoomOut"
8
+ v-b-tooltip.hover
9
+ :title="$t('Zoom Out')"
10
+ >
11
+ <inline-svg :src="minusIcon" />
12
+ </button>
13
+
14
+ <button
15
+ v-if="paperManager"
16
+ @click="onClickReset"
17
+ class="zoom-button zoom-reset"
18
+ data-cy="zoom-reset-control"
19
+ v-b-tooltip.hover
20
+ :title="$t('Reset to initial scale')"
21
+ >
22
+ {{ percentageText }}
23
+ </button>
24
+
25
+ <button
26
+ type="button"
27
+ class="zoom-button"
28
+ data-cy="zoom-in-control"
29
+ @click="onClickZoomIn"
30
+ v-b-tooltip.hover
31
+ :title="$t('Zoom In')"
32
+ >
33
+ <inline-svg :src="plusIcon" />
34
+ </button>
35
+ </div>
36
+ </template>
37
+
38
+ <script>
39
+ import InlineSvg from 'vue-inline-svg';
40
+
41
+ export default ({
42
+ components: {
43
+ InlineSvg,
44
+ },
45
+ props: {
46
+ paperManager: Object,
47
+ },
48
+ data() {
49
+ return {
50
+ initialScale: 1,
51
+ minimumScale: 0.2,
52
+ scaleStep: 0.1,
53
+ minusIcon: require('@/assets/railBottom/minus.svg'),
54
+ plusIcon: require('@/assets/railBottom/plus.svg'),
55
+ };
56
+ },
57
+ computed: {
58
+ percentageText() {
59
+ return `${Math.round(this.$props.paperManager.scale.sx * 100)}%`;
60
+ },
61
+ },
62
+ methods: {
63
+ onClickZoomOut() {
64
+ this.paperManager.scale = Math.max(
65
+ this.minimumScale,
66
+ this.paperManager.scale.sx -= this.scaleStep
67
+ );
68
+ },
69
+ onClickZoomIn() {
70
+ this.paperManager.scale = this.paperManager.scale.sx + this.scaleStep;
71
+ },
72
+ onClickReset() {
73
+ this.paperManager.scale = this.initialScale;
74
+ },
75
+ },
76
+ });
77
+
78
+ </script>
79
+
80
+ <style lang="scss" scoped src="./zoomControl.scss"></style>
@@ -0,0 +1,66 @@
1
+ .zoom {
2
+ &-box {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ height: 48px;
7
+ padding: 6px 4px;
8
+ background-color: #FFFFFF;
9
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
10
+ border-radius: 8px;
11
+ }
12
+
13
+ &-button {
14
+ display: flex;
15
+ justify-content: center;
16
+ align-items: center;
17
+ width: 40px;
18
+ height: 40px;
19
+ padding: 12px;
20
+ border: 0 none;
21
+ border-radius: 4px;
22
+ background-color: #ffffff;
23
+ color: #333344;
24
+ cursor: pointer;
25
+ outline: none;
26
+ user-select: none;
27
+
28
+ &:first-child {
29
+ margin-right: 4px;
30
+ }
31
+
32
+ &:last-child {
33
+ margin-left: 4px;
34
+ }
35
+
36
+ & > svg {
37
+ fill: #333344;
38
+ }
39
+ }
40
+
41
+ &-button:hover {
42
+ background-color: #ebeef2;
43
+ }
44
+
45
+ &-button:active {
46
+ background-color: #DEEBFF;
47
+
48
+ & > svg {
49
+ fill: #1264AA;
50
+ }
51
+ }
52
+
53
+ &-reset {
54
+ padding: {
55
+ left: 24px;
56
+ right: 24px;
57
+ };
58
+ font-size: 14px;
59
+ font-weight: 700;
60
+ user-select: none;
61
+
62
+ &:active {
63
+ color: #1264AA;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,55 @@
1
+ $controls-column-max-width: 340px;
2
+ $controls-transition: 0.3s;
3
+ $secondary-color-nav: #6c757d;
4
+
5
+ #explorer-rail {
6
+ overflow: hidden;
7
+ max-width: $controls-column-max-width;
8
+ background-color: white;
9
+ width: 100%;
10
+ height: 80%;
11
+ transition: all $controls-transition ease-out;
12
+ z-index: 2;
13
+ border-radius: 4px;
14
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
15
+ padding-left: 1rem;
16
+ overflow-y: auto;
17
+ }
18
+
19
+ .rail-menu {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ padding: 0.5rem 0;
24
+ .nav-link {
25
+ color: $secondary-color-nav;
26
+ &.active {
27
+ font-weight: bold;
28
+ border-bottom: 2px solid #1572C2;
29
+ color: #000;
30
+ }
31
+ }
32
+
33
+ .close--container {
34
+ width: 50px;
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
38
+ height: 40px;
39
+ &:hover {
40
+ cursor: pointer;
41
+ }
42
+ }
43
+ }
44
+
45
+ .node-types {
46
+ &__container {
47
+ padding: 0.5rem 1rem;
48
+ p {
49
+ font-size: 13px;
50
+ line-height: 19px;
51
+ color: #000;
52
+ }
53
+ }
54
+ }
55
+
@@ -0,0 +1,93 @@
1
+ <script>
2
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
3
+ import { faTimes } from '@fortawesome/free-solid-svg-icons';
4
+ import nodeTypesStore from '@/nodeTypesStore';
5
+ import FilterNodeTypes from '@/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue';
6
+ import NodeTypesLoop from '@/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue';
7
+
8
+ export default {
9
+ name: 'ExplorerRail',
10
+ props: {
11
+ explorerExpanded: {
12
+ type: Boolean,
13
+ },
14
+ nodeTypes: {
15
+ type: Array,
16
+ },
17
+ },
18
+ components: {
19
+ FontAwesomeIcon,
20
+ FilterNodeTypes,
21
+ NodeTypesLoop,
22
+ },
23
+ data() {
24
+ return {
25
+ tabs: [{
26
+ idx: 0,
27
+ label: 'Add Object',
28
+ }, {
29
+ idx: 1,
30
+ label: 'PM Blocks',
31
+ }],
32
+ tabIndex: 0,
33
+ };
34
+ },
35
+ computed: {
36
+ explorerOpen() {
37
+ return nodeTypesStore.getters.getExplorerOpen;
38
+ },
39
+ },
40
+ created() {
41
+ nodeTypesStore.commit('setNodeTypes', this.nodeTypes);
42
+ },
43
+ methods: {
44
+ faTimes() {
45
+ return faTimes;
46
+ },
47
+ /**
48
+ * @param {string} idx
49
+ * @return void
50
+ */
51
+ setTabIndex(idx) {
52
+ if (this.tabIndex === idx) return;
53
+ this.tabIndex = idx;
54
+ this.clearFilteredObjects();
55
+ },
56
+ closeRail() {
57
+ nodeTypesStore.commit('closeExplorer');
58
+ this.clearFilteredObjects();
59
+ },
60
+ clearFilteredObjects() {
61
+ nodeTypesStore.commit('clearFilteredNodes');
62
+ },
63
+ },
64
+ };
65
+ </script>
66
+
67
+ <template>
68
+ <div id="explorer-rail" data-test="explorer-rail" v-if="explorerOpen">
69
+ <div class="rail-menu">
70
+ <b-tabs class="tabs--container" :no-nav-style="true">
71
+ <template v-for="tab in tabs">
72
+ <b-tab :title="$t(tab.label)" :active="tab.idx === tabIndex"
73
+ @click="setTabIndex(tab.idx)" :key="tab.idx"
74
+ />
75
+ </template>
76
+ </b-tabs>
77
+ <div class="close--container" @click="closeRail()">
78
+ <font-awesome-icon :icon="faTimes()"/>
79
+ </div>
80
+ </div>
81
+ <div class="node-types__container" v-if="tabIndex === 0">
82
+ <filter-node-types />
83
+ <node-types-loop
84
+ v-on="$listeners"
85
+ />
86
+ </div>
87
+ <div class="pm-blocks__container">
88
+ <!-- Here goes the PM Blocks -->
89
+ </div>
90
+ </div>
91
+ </template>
92
+
93
+ <style lang="scss" src="./explorer-rail.scss"></style>