@processmaker/modeler 1.36.6 → 1.36.8

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 (102) hide show
  1. package/.eslintrc.js +88 -13
  2. package/babel.config.js +5 -7
  3. package/cypress.config.js +28 -0
  4. package/dist/demo.html +1 -8
  5. package/dist/img/association-head.0b14da7b.svg +13 -0
  6. package/dist/img/boundary-escalation-icon.c999a95e.svg +12 -0
  7. package/dist/modeler.common.js +22670 -23598
  8. package/dist/modeler.common.js.map +1 -1
  9. package/dist/modeler.umd.js +22741 -23580
  10. package/dist/modeler.umd.js.map +1 -1
  11. package/dist/modeler.umd.min.js +9 -9
  12. package/dist/modeler.umd.min.js.map +1 -1
  13. package/jest.config.js +9 -0
  14. package/package.json +43 -42
  15. package/src/components/IconSelector.vue +2 -2
  16. package/src/components/crown/crownMultiselect/crownAlign.vue +2 -2
  17. package/src/components/crown/crownMultiselect/crownMultiselect.vue +2 -2
  18. package/src/components/crown/utils.js +1 -1
  19. package/src/components/hotkeys/main.js +1 -1
  20. package/src/components/inspectors/LoopCharacteristics.vue +0 -1
  21. package/src/components/inspectors/WeekdaySelect.vue +2 -1
  22. package/src/components/modeler/Modeler.vue +2 -2
  23. package/src/components/nodes/association/association.vue +1 -1
  24. package/src/components/nodes/boundaryEscalationEvent/boundaryEscalationEvent.vue +1 -1
  25. package/src/components/nodes/boundaryTimerEvent/boundaryTimerEvent.vue +9 -0
  26. package/src/components/nodes/dataInputAssociation/dataInputAssociation.vue +1 -1
  27. package/src/components/nodes/dataOutputAssociation/dataOutputAssociation.vue +1 -1
  28. package/src/components/nodes/node.js +4 -4
  29. package/src/components/nodes/pool/pool.vue +1 -1
  30. package/src/components/railBottom/zoomControl/ZoomControl.vue +1 -1
  31. package/src/mixins/linkConfig.js +11 -1
  32. package/src/mixins/resizeConfig.js +19 -19
  33. package/src/setup/extensions/customMarker.js +2 -2
  34. package/src/store.js +1 -1
  35. package/cypress.json +0 -6
  36. /package/dist/img/{boundary-error-event.9e053bcc.svg → boundary-error-event.894d5d30.svg} +0 -0
  37. /package/dist/img/{boundary-escalation-event.78edf607.svg → boundary-escalation-event.4dfef85a.svg} +0 -0
  38. /package/dist/img/{boundary-event.4e0fb9de.svg → boundary-event.40a868e9.svg} +0 -0
  39. /package/dist/img/{boundary-message-event.68472c0d.svg → boundary-message-event.134d7b03.svg} +0 -0
  40. /package/dist/img/{boundary-signal-event.67df855a.svg → boundary-signal-event.d0848385.svg} +0 -0
  41. /package/dist/img/{boundary-timer-event.3f60553b.svg → boundary-timer-event.cb184a17.svg} +0 -0
  42. /package/dist/img/{clipboard.5fe6f79e.svg → clipboard.06edfa02.svg} +0 -0
  43. /package/dist/img/{color-wheel.0fc36b2a.png → color-wheel.30c5d6dd.png} +0 -0
  44. /package/dist/img/{compensation.f4d397fb.svg → compensation.495ae0a2.svg} +0 -0
  45. /package/dist/img/{conditional-start-event.a56e4b5b.svg → conditional-start-event.485aa22f.svg} +0 -0
  46. /package/dist/img/{connect-artifacts.496eb4b9.svg → connect-artifacts.e3e5e73f.svg} +0 -0
  47. /package/dist/img/{connect-elements.9ec5ca93.svg → connect-elements.ab6af00f.svg} +0 -0
  48. /package/dist/img/{copy-regular.2d678143.svg → copy-regular.67a8edbd.svg} +0 -0
  49. /package/dist/img/{data-object.0d6d1585.svg → data-object.22c93e83.svg} +0 -0
  50. /package/dist/img/{data-store.32bed5ce.svg → data-store.06a1bbc9.svg} +0 -0
  51. /package/dist/img/{default-flow.156a793b.svg → default-flow.3f3d5309.svg} +0 -0
  52. /package/dist/img/{end-event.9d1ff5c0.svg → end-event.484eed9c.svg} +0 -0
  53. /package/dist/img/{error-end-event.aab86eca.svg → error-end-event.be1352e7.svg} +0 -0
  54. /package/dist/img/{event-based-gateway.9960eee5.svg → event-based-gateway.b7344f6f.svg} +0 -0
  55. /package/dist/img/{exclusive-gateway.26db4fae.svg → exclusive-gateway.2d93a745.svg} +0 -0
  56. /package/dist/img/{generic-gateway.09ca6929.svg → generic-gateway.94311044.svg} +0 -0
  57. /package/dist/img/{generic-intermediate-event.a711eb33.svg → generic-intermediate-event.96b0ece1.svg} +0 -0
  58. /package/dist/img/{highlight-shape.bdea7f76.svg → highlight-shape.5f7b1ba9.svg} +0 -0
  59. /package/dist/img/{inclusive-gateway.0f0afffd.svg → inclusive-gateway.d73cfd85.svg} +0 -0
  60. /package/dist/img/{inspector.42e5d40d.svg → inspector.c5ee8afc.svg} +0 -0
  61. /package/dist/img/{intermediate-conditional-catch-event.e9ae6198.svg → intermediate-conditional-catch-event.638dee5a.svg} +0 -0
  62. /package/dist/img/{intermediate-message-catch-event.9d25208e.svg → intermediate-message-catch-event.6c9df16a.svg} +0 -0
  63. /package/dist/img/{intermediate-message-throw-event.4309dc45.svg → intermediate-message-throw-event.43b59c5e.svg} +0 -0
  64. /package/dist/img/{intermediate-signal-catch-event.74b65f17.svg → intermediate-signal-catch-event.ce6fe9b6.svg} +0 -0
  65. /package/dist/img/{intermediate-signal-throw-event.29cad018.svg → intermediate-signal-throw-event.2f50ec9d.svg} +0 -0
  66. /package/dist/img/{intermediate-timer-event.1670a1c8.svg → intermediate-timer-event.e880bbcc.svg} +0 -0
  67. /package/dist/img/{issue-close.5d1630e6.svg → issue-close.2623c227.svg} +0 -0
  68. /package/dist/img/{issue-item.3187f291.svg → issue-item.9fbdef35.svg} +0 -0
  69. /package/dist/img/{issue-open.707390b4.svg → issue-open.8351c91c.svg} +0 -0
  70. /package/dist/img/{lane-above.0210a07c.svg → lane-above.37ee2b80.svg} +0 -0
  71. /package/dist/img/{lane-below.e67f9823.svg → lane-below.22169670.svg} +0 -0
  72. /package/dist/img/{loop.955ae4b7.svg → loop.00441d9f.svg} +0 -0
  73. /package/dist/img/{manual-task.374a73c3.svg → manual-task.166f9f35.svg} +0 -0
  74. /package/dist/img/{manualTask.d80701de.svg → manualTask.43f91d9d.svg} +0 -0
  75. /package/dist/img/{message-end-event.f15b67f5.svg → message-end-event.6b25bec9.svg} +0 -0
  76. /package/dist/img/{message-start-event.f2d4a5e6.svg → message-start-event.e2d5addf.svg} +0 -0
  77. /package/dist/img/{mini-map.ae46890c.svg → mini-map.21e75527.svg} +0 -0
  78. /package/dist/img/{minus.ca21cc3b.svg → minus.c786380f.svg} +0 -0
  79. /package/dist/img/{parallel-gateway.877bb628.svg → parallel-gateway.7b6e28ab.svg} +0 -0
  80. /package/dist/img/{parallel.1b2e8b04.svg → parallel.cf1d1995.svg} +0 -0
  81. /package/dist/img/{pin-angle-fill.0e4af645.svg → pin-angle-fill.45c5a07f.svg} +0 -0
  82. /package/dist/img/{pin-angle.3462c115.svg → pin-angle.95ef112b.svg} +0 -0
  83. /package/dist/img/{plus.afbb0b13.svg → plus.2beb376c.svg} +0 -0
  84. /package/dist/img/{pool.98d4734c.svg → pool.d79eba80.svg} +0 -0
  85. /package/dist/img/{redo.8425ce7e.svg → redo.6b68efdc.svg} +0 -0
  86. /package/dist/img/{script-task.3d8c664a.svg → script-task.8d648d88.svg} +0 -0
  87. /package/dist/img/{scriptTask.da7e394e.svg → scriptTask.ef9df329.svg} +0 -0
  88. /package/dist/img/{sequential.9db0b6ef.svg → sequential.f86ad08b.svg} +0 -0
  89. /package/dist/img/{signal-end-event.a38a6616.svg → signal-end-event.e6feb2d5.svg} +0 -0
  90. /package/dist/img/{signal-start-event.3d7b096c.svg → signal-start-event.4239bcab.svg} +0 -0
  91. /package/dist/img/{start-event.7f1911cb.svg → start-event.27ee6b1c.svg} +0 -0
  92. /package/dist/img/{sub-task.52d09847.svg → sub-task.255eb842.svg} +0 -0
  93. /package/dist/img/{subProcess.1e340068.svg → subProcess.45b0ff2c.svg} +0 -0
  94. /package/dist/img/{subprocess.363cde32.svg → subprocess.19c191a3.svg} +0 -0
  95. /package/dist/img/{task.8a1c6c75.svg → task.9eaeba47.svg} +0 -0
  96. /package/dist/img/{terminate-end-event.3aa5cd00.svg → terminate-end-event.53b2871d.svg} +0 -0
  97. /package/dist/img/{text-annotation.02df53cd.svg → text-annotation.dfcc35ba.svg} +0 -0
  98. /package/dist/img/{timer-start-event.55abac82.svg → timer-start-event.c354a032.svg} +0 -0
  99. /package/dist/img/{trash-alt-solid.58c408b8.svg → trash-alt-solid.9d41abd9.svg} +0 -0
  100. /package/dist/img/{undo.e0ffff93.svg → undo.704fb545.svg} +0 -0
  101. /package/dist/img/{validate-close.09ace97a.svg → validate-close.d8d10c76.svg} +0 -0
  102. /package/dist/img/{validate-open.b0ecf74e.svg → validate-open.6048f9de.svg} +0 -0
package/jest.config.js CHANGED
@@ -5,6 +5,7 @@ module.exports = {
5
5
  'json',
6
6
  'vue',
7
7
  ],
8
+
8
9
  transform: {
9
10
  '^.+\\.vue$': 'vue-jest',
10
11
  '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
@@ -12,23 +13,31 @@ module.exports = {
12
13
  '\\.svg$': '<rootDir>/fileTransformer.js',
13
14
  '\\.yml$': '<rootDir>/fileTransformer.js',
14
15
  },
16
+
15
17
  transformIgnorePatterns: [
16
18
  '/node_modules/((?!@fortawesome).)*/',
17
19
  ],
20
+
18
21
  moduleNameMapper: {
19
22
  '^@/(.*)$': '<rootDir>/src/$1',
20
23
  '^js-yaml-loader\\!@fortawesome/(.*)\\.yml$': '<rootDir>/node_modules/@fortawesome/$1.yml',
21
24
  },
25
+
22
26
  snapshotSerializers: [
23
27
  'jest-serializer-vue',
24
28
  ],
29
+
25
30
  testMatch: [
26
31
  '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)',
27
32
  ],
33
+
28
34
  watchPlugins: [
29
35
  'jest-watch-typeahead/filename',
30
36
  'jest-watch-typeahead/testname',
31
37
  ],
38
+
32
39
  collectCoverage: true,
33
40
  coverageDirectory: 'jest-coverage',
41
+ testEnvironment: 'jsdom',
42
+ preset: '@vue/cli-plugin-unit-jest',
34
43
  };
package/package.json CHANGED
@@ -1,30 +1,31 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.36.6",
3
+ "version": "1.36.8",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
- "open-cypress": "TZ=UTC cypress open",
7
- "run-cypress": "TZ=UTC cypress run",
6
+ "test:unit": "vue-cli-service test:unit",
8
7
  "lint": "vue-cli-service lint --no-fix",
9
8
  "build-bundle": "vue-cli-service build --target lib --name modeler ./src/components/nodes/index.js",
10
9
  "bundle-analyze": "npm run build-bundle -- --analyze",
11
10
  "bundle-link": "npm run build-bundle",
12
- "postbundle-link": "npm link",
11
+ "check-peer-deps": "npm ls --depth=0",
12
+ "combine:reports": "nyc merge reports && mv coverage.json .nyc_output/out.json",
13
+ "copy:reports": "cp cypress-coverage/coverage-final.json reports/from-cypress.json && cp jest-coverage/coverage-final.json reports/from-jest.json",
13
14
  "lint-fix": "vue-cli-service lint",
15
+ "mkdir:reports": "mkdir reports || true",
16
+ "open-cypress": "TZ=UTC cypress open",
17
+ "postbundle-link": "npm link",
18
+ "posttest": "npm run report:combined",
19
+ "precombine:reports": "npm run copy:reports && mkdir .nyc_output || true",
20
+ "precopy:reports": "npm run mkdir:reports",
21
+ "prereport:combined": "npm run combine:reports",
14
22
  "pretest": "npm run check-peer-deps",
15
23
  "pretest-unit": "rm -rf .nyc_output || true",
24
+ "report:combined": "nyc report --reporter lcov --report-dir coverage",
25
+ "run-cypress": "TZ=UTC cypress run",
16
26
  "test": "npm run test-unit && npm run test-ci",
17
- "check-peer-deps": "npm ls --depth=0",
18
- "posttest": "npm run report:combined",
19
- "test-unit": "JEST_JUNIT_OUTPUT_DIR=test_summary_reports/jest/ vue-cli-service test:unit --ci --runInBand --reporters=default --reporters=jest-junit",
20
27
  "test-ci": "TZ=UTC vue-cli-service test:e2e --mode test --headless --browser chrome -- --reporter mocha-junit-reporter --reporter-options mochaFile=reports/mocha/test-results.xml",
21
- "mkdir:reports": "mkdir reports || true",
22
- "precopy:reports": "npm run mkdir:reports",
23
- "copy:reports": "cp cypress-coverage/coverage-final.json reports/from-cypress.json && cp jest-coverage/coverage-final.json reports/from-jest.json",
24
- "precombine:reports": "npm run copy:reports && mkdir .nyc_output || true",
25
- "combine:reports": "nyc merge reports && mv coverage.json .nyc_output/out.json",
26
- "prereport:combined": "npm run combine:reports",
27
- "report:combined": "nyc report --reporter lcov --report-dir coverage"
28
+ "test-unit": "JEST_JUNIT_OUTPUT_DIR=test_summary_reports/jest/ vue-cli-service test:unit --ci --runInBand --reporters=default --reporters=jest-junit"
28
29
  },
29
30
  "main": "./dist/modeler.common.js",
30
31
  "files": [
@@ -44,13 +45,12 @@
44
45
  "@processmaker/screen-builder": "2.70.0",
45
46
  "@processmaker/vue-form-elements": "0.45.0",
46
47
  "@processmaker/vue-multiselect": "^2.2.0",
47
- "acorn": "^6.4.2",
48
48
  "bootstrap": "^4.3.1",
49
49
  "bootstrap-vue": "^2.0.4",
50
50
  "bpmn-moddle": "^6.0.0",
51
51
  "bpmnlint": "^6.4.0",
52
52
  "bpmnlint-plugin-processmaker": "1.5.0",
53
- "core-js": "^3.7.0",
53
+ "core-js": "^3.8.3",
54
54
  "file-saver": "^2.0.5",
55
55
  "jest-junit": "^12.0.0",
56
56
  "jointjs": "^3.1.1",
@@ -71,35 +71,37 @@
71
71
  "vuex": "^3.5.1"
72
72
  },
73
73
  "devDependencies": {
74
- "@babel/core": "^7.12.7",
75
- "@cypress/code-coverage": "^1.14.0",
74
+ "@babel/core": "^7.12.16",
75
+ "@babel/eslint-parser": "^7.12.16",
76
+ "@cypress/code-coverage": "^3.11.0",
76
77
  "@panter/vue-i18next": "^0.15.2",
77
78
  "@processmaker/processmaker-bpmn-moddle": "0.14.0",
78
79
  "@types/jest": "^24.9.1",
79
80
  "@vue/babel-preset-app": "^5.0.4",
80
- "@vue/cli-plugin-babel": "^4.5.9",
81
- "@vue/cli-plugin-e2e-cypress": "5.0.0",
82
- "@vue/cli-plugin-eslint": "^4.5.9",
83
- "@vue/cli-plugin-unit-jest": "^4.5.9",
84
- "@vue/cli-service": "^4.5.9",
85
- "@vue/test-utils": "^1.0.0-beta.29",
81
+ "@vue/cli-plugin-babel": "~5.0.0",
82
+ "@vue/cli-plugin-e2e-cypress": "~5.0.8",
83
+ "@vue/cli-plugin-eslint": "~5.0.0",
84
+ "@vue/cli-plugin-unit-jest": "~5.0.0",
85
+ "@vue/cli-service": "~5.0.8",
86
+ "@vue/test-utils": "^1.3.6",
87
+ "@vue/vue2-jest": "^27.0.0-alpha.2",
86
88
  "axios": "^0.21.0",
87
89
  "axios-mock-adapter": "^1.19.0",
88
90
  "babel-core": "7.0.0-bridge.0",
89
91
  "babel-eslint": "^10.1.0",
90
- "babel-jest": "^24.9.0",
91
- "babel-plugin-istanbul": "^5.2.0",
92
+ "babel-jest": "^27.0.6",
92
93
  "bpmnlint-loader": "^0.1.4",
93
94
  "circular-dependency-plugin": "^5.2.2",
94
95
  "copy-webpack-plugin": "^5.1.1",
95
- "cypress": "6.2.0",
96
- "cypress-vue-unit-test": "^1.11.7",
97
- "eslint": "^5.16.0",
96
+ "cypress": "10.3.0",
97
+ "eslint": "^7.32.0",
98
98
  "eslint-plugin-cypress": "^2.12.1",
99
- "eslint-plugin-vue": "^5.2.3",
99
+ "eslint-plugin-jest": "^27.2.3",
100
+ "eslint-plugin-vue": "^8.0.3",
100
101
  "husky": "^4.3.5",
101
102
  "i18next": "^15.0.8",
102
- "istanbul-lib-coverage": "^2.0.5",
103
+ "jest": "^27.1.0",
104
+ "jest-environment-jsdom": "^27.5.1",
103
105
  "nyc": "^14.1.1",
104
106
  "sass": "^1.51.0",
105
107
  "sass-loader": "^8.0.2",
@@ -111,7 +113,6 @@
111
113
  "vue-loader": "latest",
112
114
  "vue-template-compiler": "^2.6.12",
113
115
  "webpack-bundle-analyzer": "^3.6.0",
114
- "webpack-cli": "^3.3.12",
115
116
  "yargs": "^14.2.3"
116
117
  },
117
118
  "peerDependencies": {
@@ -141,6 +142,16 @@
141
142
  "not ie <= 8",
142
143
  "chrome >= 69"
143
144
  ],
145
+ "engines": {
146
+ "npm": ">=8",
147
+ "node": ">=16 <18"
148
+ },
149
+ "husky": {
150
+ "hooks": {
151
+ "pre-commit": "./checkForOnly.sh",
152
+ "pre-push": "npm run lint && npm run test-unit"
153
+ }
154
+ },
144
155
  "nyc": {
145
156
  "extension": [
146
157
  ".js",
@@ -150,15 +161,5 @@
150
161
  "tests/**/*.js"
151
162
  ],
152
163
  "report-dir": "cypress-coverage"
153
- },
154
- "husky": {
155
- "hooks": {
156
- "pre-commit": "./checkForOnly.sh",
157
- "pre-push": "npm run lint && npm run test-unit"
158
- }
159
- },
160
- "engines": {
161
- "npm": ">=8",
162
- "node": ">=16 <18"
163
164
  }
164
165
  }
@@ -150,8 +150,8 @@ export default {
150
150
  this.$emit(
151
151
  'error',
152
152
  this.$t(
153
- 'The custom icon file is too large. File size must be less than 2KB.'
154
- )
153
+ 'The custom icon file is too large. File size must be less than 2KB.',
154
+ ),
155
155
  );
156
156
  } else {
157
157
  this.file = value;
@@ -218,7 +218,7 @@ export default {
218
218
  this.shape.stopListening(
219
219
  this.paper,
220
220
  'element:pointerup',
221
- this.setNodePosition
221
+ this.setNodePosition,
222
222
  );
223
223
  this.savePositionOnPointerupEventSet = false;
224
224
 
@@ -238,7 +238,7 @@ export default {
238
238
  setUpCrownConfig() {
239
239
  this.paper.on(
240
240
  'render:done scale:changed translate:changed',
241
- this.repositionCrown
241
+ this.repositionCrown,
242
242
  );
243
243
  },
244
244
  setUpPositionHandling() {},
@@ -129,7 +129,7 @@ export default {
129
129
  this.shape.stopListening(
130
130
  this.paper,
131
131
  'element:pointerup',
132
- this.setNodePosition
132
+ this.setNodePosition,
133
133
  );
134
134
  this.savePositionOnPointerupEventSet = false;
135
135
 
@@ -149,7 +149,7 @@ export default {
149
149
  setUpCrownConfig() {
150
150
  this.paper.on(
151
151
  'render:done scale:changed translate:changed',
152
- this.repositionCrown
152
+ this.repositionCrown,
153
153
  );
154
154
  },
155
155
  setUpPositionHandling() {},
@@ -177,7 +177,7 @@ export function findIOSpecificationOwner(ioSpec, modeler) {
177
177
  const owner = ioSpec.$parent;
178
178
  if (!owner) {
179
179
  return modeler.nodes.find(node => node.definition.ioSpecification === ioSpec ||
180
- node.definition.ioSpecification?.id === ioSpec.id
180
+ node.definition.ioSpecification?.id === ioSpec.id,
181
181
  )?.definition;
182
182
  }
183
183
  return owner;
@@ -55,7 +55,7 @@ export default {
55
55
  if (this.canvasDragPosition && !this.clientLeftPaper) {
56
56
  this.paperManager.translate(
57
57
  event.offsetX - this.canvasDragPosition.x,
58
- event.offsetY - this.canvasDragPosition.y
58
+ event.offsetY - this.canvasDragPosition.y,
59
59
  );
60
60
  }
61
61
  });
@@ -198,7 +198,6 @@ export default {
198
198
  this.previous.inputData = this.inputData;
199
199
  this.previous.outputData = this.outputData;
200
200
  this.previous.loopCardinality = this.loopCardinality;
201
- this.completionCondition = this.completionCondition;
202
201
  this.loopMaximum = this.getLoopMaximum();
203
202
  this.loopCondition = this.getLoopCondition();
204
203
  },
@@ -107,7 +107,7 @@ export default {
107
107
  selected: false,
108
108
  },
109
109
  ],
110
- cycleManager: new CycleManager(this.startDate, this.repeat, this.periodicityValue, this.selectedWeekdays, this.endDate, this.ends, this.times),
110
+ cycleManager: null,
111
111
  };
112
112
  },
113
113
  watch: {
@@ -143,6 +143,7 @@ export default {
143
143
  foundDay.selected = true;
144
144
  }
145
145
  });
146
+ this.cycleManager = new CycleManager(this.startDate, this.repeat, this.periodicityValue, this.selectedWeekdays, this.endDate, this.ends, this.times);
146
147
  },
147
148
  computed: {
148
149
  repeatOnValidationError() {
@@ -1086,7 +1086,7 @@ export default {
1086
1086
  await this.paperManager.performAtomicAction(async() => {
1087
1087
  const waitPromises = [];
1088
1088
  this.highlightedNodes.forEach((node) =>
1089
- waitPromises.push(this.removeNode(node, { removeRelationships: true }))
1089
+ waitPromises.push(this.removeNode(node, { removeRelationships: true })),
1090
1090
  );
1091
1091
  await Promise.all(waitPromises);
1092
1092
  store.commit('highlightNode');
@@ -1449,7 +1449,7 @@ export default {
1449
1449
  if (this.canvasDragPosition && !this.clientLeftPaper) {
1450
1450
  this.paperManager.translate(
1451
1451
  event.offsetX - this.canvasDragPosition.x,
1452
- event.offsetY - this.canvasDragPosition.y
1452
+ event.offsetY - this.canvasDragPosition.y,
1453
1453
  );
1454
1454
  }
1455
1455
  }
@@ -19,7 +19,7 @@
19
19
  import { shapes } from 'jointjs';
20
20
  import linkConfig from '@/mixins/linkConfig';
21
21
  import get from 'lodash/get';
22
- import associationHead from '!!url-loader!@/assets/association-head.svg';
22
+ import associationHead from '@/assets/association-head.svg';
23
23
  import { direction } from './associationConfig';
24
24
  import CrownConfig from '@/components/crown/crownConfig/crownConfig';
25
25
 
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import BoundaryEvent from '@/components/nodes/boundaryEvent/boundaryEvent';
3
- import escalationIcon from '!!url-loader!@/assets/boundary-escalation-icon.svg';
3
+ import escalationIcon from '@/assets/boundary-escalation-icon.svg';
4
4
  import { isValidBoundaryEscalationEvent } from '@/boundaryEventValidation';
5
5
 
6
6
  export default {
@@ -11,5 +11,14 @@ export default {
11
11
  nodeIcon: timerEventIcon,
12
12
  };
13
13
  },
14
+ methods: {
15
+ addTimerEventDefinitionId() {
16
+ const id = `${this.id}_timer_event_definition`;
17
+ this.node.definition.get('eventDefinitions')[0].id = id;
18
+ },
19
+ },
20
+ mounted() {
21
+ this.addTimerEventDefinitionId();
22
+ },
14
23
  };
15
24
  </script>
@@ -19,7 +19,7 @@
19
19
  import { shapes } from 'jointjs';
20
20
  import linkConfig from '@/mixins/linkConfig';
21
21
  import get from 'lodash/get';
22
- import associationHead from '!!url-loader!@/assets/association-head.svg';
22
+ import associationHead from '@/assets/association-head.svg';
23
23
  import CrownConfig from '@/components/crown/crownConfig/crownConfig';
24
24
  import { getOrFindDataInput, removeDataInput, findIOSpecificationOwner } from '@/components/crown/utils';
25
25
  import { pull } from 'lodash';
@@ -19,7 +19,7 @@
19
19
  import { shapes } from 'jointjs';
20
20
  import linkConfig from '@/mixins/linkConfig';
21
21
  import get from 'lodash/get';
22
- import associationHead from '!!url-loader!@/assets/association-head.svg';
22
+ import associationHead from '@/assets/association-head.svg';
23
23
  import CrownConfig from '@/components/crown/crownConfig/crownConfig';
24
24
  import { pull } from 'lodash';
25
25
 
@@ -172,8 +172,8 @@ export default class Node {
172
172
  Node.eventDefinitionPropertiesToNotCopy.forEach(
173
173
  prop => clonedNode.definition.eventDefinitions &&
174
174
  clonedNode.definition.eventDefinitions[0] &&
175
- clonedNode.definition.eventDefinitions[0].hasOwnProperty(prop) &&
176
- clonedNode.definition.eventDefinitions[0].set(prop, null)
175
+ Object.hasOwn(clonedNode.definition.eventDefinitions[0], prop) &&
176
+ clonedNode.definition.eventDefinitions[0].set(prop, null),
177
177
  );
178
178
 
179
179
  return clonedNode;
@@ -217,8 +217,8 @@ export default class Node {
217
217
  Node.eventDefinitionPropertiesToNotCopy.forEach(
218
218
  prop => clonedFlow.definition.eventDefinitions &&
219
219
  clonedFlow.definition.eventDefinitions[0] &&
220
- clonedFlow.definition.eventDefinitions[0].hasOwnProperty(prop) &&
221
- clonedFlow.definition.eventDefinitions[0].set(prop, null)
220
+ Object.hasOwn(clonedFlow.definition.eventDefinitions[0], prop) &&
221
+ clonedFlow.definition.eventDefinitions[0].set(prop, null),
222
222
  );
223
223
 
224
224
  return clonedFlow;
@@ -445,7 +445,7 @@ export default {
445
445
  .getEmbeddedCells()
446
446
  .filter(element =>
447
447
  elementShouldHaveFlowNodeRef(element) &&
448
- element.component.node.pool === this.shape
448
+ element.component.node.pool === this.shape,
449
449
  )
450
450
  .forEach(element => {
451
451
  const lane = this.graph
@@ -61,7 +61,7 @@ export default ({
61
61
  onClickZoomOut() {
62
62
  this.paperManager.scale = Math.max(
63
63
  this.minimumScale,
64
- this.paperManager.scale.sx -= this.scaleStep
64
+ this.paperManager.scale.sx -= this.scaleStep,
65
65
  );
66
66
  },
67
67
  onClickZoomIn() {
@@ -139,6 +139,8 @@ export default {
139
139
  resetShapeColor(targetShape);
140
140
 
141
141
  this.shape.on('change:vertices', this.onChangeVertices);
142
+ this.shape.on('change:source', this.onChangeVertices);
143
+ this.shape.on('change:target', this.onChangeVertices);
142
144
  this.shape.listenTo(this.sourceShape, 'change:position', this.updateWaypoints);
143
145
  this.shape.listenTo(targetShape, 'change:position', this.updateWaypoints);
144
146
 
@@ -146,6 +148,13 @@ export default {
146
148
  sourceShape.embed(this.shape);
147
149
  this.$emit('set-shape-stacking', sourceShape);
148
150
  },
151
+ waitForUpdateWaypoints() {
152
+ return new Promise(resolve => {
153
+ this.updateWaypoints();
154
+ this.updateWaypoints.flush();
155
+ resolve();
156
+ });
157
+ },
149
158
  /**
150
159
  * On Change vertices handler
151
160
  * @param {Object} link
@@ -154,7 +163,8 @@ export default {
154
163
  */
155
164
  async onChangeVertices(link, vertices, options){
156
165
  if (options && options.ui) {
157
- this.updateWaypoints();
166
+ await this.$nextTick();
167
+ await this.waitForUpdateWaypoints();
158
168
  await this.$nextTick();
159
169
  this.$emit('save-state');
160
170
  }
@@ -151,11 +151,11 @@ export default {
151
151
 
152
152
  this.poolComponent.shape.resize(
153
153
  Math.round(width),
154
- Math.round(height)
154
+ Math.round(height),
155
155
  );
156
156
  this.poolComponent.shape.position(
157
157
  Math.round(x),
158
- Math.round(y)
158
+ Math.round(y),
159
159
  );
160
160
  },
161
161
  resizeUpdate() {
@@ -200,21 +200,21 @@ export default {
200
200
  const maxPoolWidth = Math.max(
201
201
  (poolX + poolWidth) - (x + this.pointWidth),
202
202
  (poolX + poolWidth) - this.elementLeftX + labelWidth,
203
- minPoolWidth
203
+ minPoolWidth,
204
204
  );
205
205
  const maxPoolHeight = Math.max(
206
206
  (poolY + poolHeight) - (y + this.pointWidth),
207
207
  poolY + poolHeight - this.elementTopY,
208
- this.poolComponent.laneSet ? minHeight : minPoolHeight
208
+ this.poolComponent.laneSet ? minHeight : minPoolHeight,
209
209
  );
210
210
  const maxLaneWidth = Math.max(
211
211
  (laneX + laneWidth) - (x + this.pointWidth),
212
212
  (laneX + laneWidth) - this.elementLeftX + poolPadding + labelWidth,
213
- minLaneWidth
213
+ minLaneWidth,
214
214
  );
215
215
  const maxLaneHeight = Math.max(
216
216
  (laneY + laneHeight) - (y + this.pointHeight),
217
- minLaneHeight
217
+ minLaneHeight,
218
218
  );
219
219
 
220
220
  if (this.isLane) {
@@ -224,7 +224,7 @@ export default {
224
224
  const maxPoolWidthLane = Math.max(
225
225
  (poolX + poolWidth) - (x + this.pointWidth) + labelWidth,
226
226
  (poolX + poolWidth) - this.elementLeftX + labelWidth,
227
- minPoolWidth
227
+ minPoolWidth,
228
228
  );
229
229
 
230
230
  this.poolComponent.shape.resize(maxPoolWidthLane, maxPoolHeight, { direction });
@@ -272,21 +272,21 @@ export default {
272
272
  const maxPoolWidth = Math.max(
273
273
  x - poolX,
274
274
  this.elementRightX - poolX,
275
- minPoolWidth
275
+ minPoolWidth,
276
276
  );
277
277
  const maxPoolHeight = Math.max(
278
278
  (poolY + poolHeight) - (y + this.pointWidth),
279
279
  poolY + poolHeight - this.elementTopY,
280
- this.poolComponent.laneSet ? minHeight : minPoolHeight
280
+ this.poolComponent.laneSet ? minHeight : minPoolHeight,
281
281
  );
282
282
  const maxLaneWidth = Math.max(
283
283
  x - laneX,
284
284
  this.elementRightX - laneX,
285
- minLaneWidth
285
+ minLaneWidth,
286
286
  );
287
287
  const maxLaneHeight = Math.max(
288
288
  (laneY + laneHeight) - (y + this.pointHeight),
289
- minLaneHeight
289
+ minLaneHeight,
290
290
  );
291
291
 
292
292
  if (this.isLane) {
@@ -340,21 +340,21 @@ export default {
340
340
  const maxPoolWidth = Math.max(
341
341
  (poolX + poolWidth) - (x + this.pointWidth),
342
342
  (poolX + poolWidth) - this.elementLeftX + labelWidth,
343
- minPoolWidth
343
+ minPoolWidth,
344
344
  );
345
345
  const maxPoolHeight = Math.max(
346
346
  y - poolY,
347
347
  this.elementBottomY - poolY,
348
- this.poolComponent.laneSet ? minHeight : minPoolHeight
348
+ this.poolComponent.laneSet ? minHeight : minPoolHeight,
349
349
  );
350
350
  const maxLaneWidth = Math.max(
351
351
  (laneX + laneWidth) - (x + this.pointWidth),
352
352
  (laneX + laneWidth) - this.elementLeftX + poolPadding + labelWidth,
353
- minLaneWidth
353
+ minLaneWidth,
354
354
  );
355
355
  const maxLaneHeight = Math.max(
356
356
  y - laneY,
357
- minLaneHeight
357
+ minLaneHeight,
358
358
  );
359
359
 
360
360
  if (this.isLane) {
@@ -365,7 +365,7 @@ export default {
365
365
  const maxPoolWidthLane = Math.max(
366
366
  (poolX + poolWidth) - (x + this.pointWidth) + labelWidth,
367
367
  (poolX + poolWidth) - this.elementLeftX + labelWidth,
368
- minPoolWidth
368
+ minPoolWidth,
369
369
  );
370
370
 
371
371
  this.poolComponent.shape.resize(maxPoolWidthLane, maxPoolHeight, { direction });
@@ -414,16 +414,16 @@ export default {
414
414
  const maxPoolHeight = Math.max(
415
415
  y - poolY,
416
416
  this.elementBottomY - poolY,
417
- this.poolComponent.laneSet ? minHeight : minPoolHeight
417
+ this.poolComponent.laneSet ? minHeight : minPoolHeight,
418
418
  );
419
419
  const maxLaneWidth = Math.max(
420
420
  x - laneX,
421
421
  this.elementRightX - laneX,
422
- minLaneWidth
422
+ minLaneWidth,
423
423
  );
424
424
  const maxLaneHeight = Math.max(
425
425
  y - laneY,
426
- minLaneHeight
426
+ minLaneHeight,
427
427
  );
428
428
 
429
429
  if (this.isLane) {
@@ -1,7 +1,7 @@
1
1
  import Task from '@/components/nodes/task/task';
2
2
  import idConfigSettings from '@/components/inspectors/idConfigSettings';
3
- import bookIcon from '!!url-loader!@/assets/book.svg';
4
- import clockIcon from '!!url-loader!@/assets/clock.svg';
3
+ import bookIcon from '@/assets/book.svg';
4
+ import clockIcon from '@/assets/clock.svg';
5
5
 
6
6
  window.ProcessMaker.EventBus.$on('modeler-init', ({ registerNode }) => {
7
7
  /* Add a custom node example */
package/src/store.js CHANGED
@@ -6,7 +6,7 @@ import uniq from 'lodash/uniq';
6
6
  Vue.use(Vuex);
7
7
 
8
8
  function setDefinitionPropertyReactive(definition, key, value) {
9
- if (definition.hasOwnProperty(key)) {
9
+ if (Object.hasOwn(definition, key)) {
10
10
  definition.set(key, value);
11
11
  return;
12
12
  }
package/cypress.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "pluginsFile": "tests/e2e/plugins/index.js",
3
- "baseUrl": "http://localhost:8080",
4
- "video": false,
5
- "screenshotOnRunFailure": true
6
- }