@processmaker/modeler 1.43.17 → 1.43.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.43.17",
3
+ "version": "1.43.18",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve --mode development",
6
6
  "test:unit": "vue-cli-service test:unit",
@@ -104,6 +104,8 @@ export default {
104
104
  'highlightedNode.definition.assignmentRules'(current, previous) { this.handleAssignmentChanges(current, previous); },
105
105
  'highlightedNode.definition.allowInterstitial'(current, previous) { this.handleAssignmentChanges(current, previous); },
106
106
  'highlightedNode.definition.interstitialScreenRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
107
+ 'highlightedNode.definition.screenRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
108
+ 'highlightedNode.definition.scriptRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
107
109
  },
108
110
  computed: {
109
111
  inspectorHeaderTitle() {
@@ -2215,9 +2215,8 @@ export default {
2215
2215
  streamCompletedEvent,
2216
2216
  (response) => {
2217
2217
  if (response.data) {
2218
- setTimeout(() => {
2219
- window.location.replace(window.location.href.split('?')[0]);
2220
- }, 1500);
2218
+ this.updateScreenRefs(response.data.screenIds);
2219
+ this.updateScriptRefs(response.data.scriptIds);
2221
2220
  }
2222
2221
  },
2223
2222
  );
@@ -2241,6 +2240,30 @@ export default {
2241
2240
  this.loadingAI = false;
2242
2241
  }
2243
2242
  },
2243
+ updateScreenRefs(elements) {
2244
+ elements.forEach(el => {
2245
+ const node = this.nodes.find(n => n.definition.id === el.node_id);
2246
+ let definition = node.definition;
2247
+
2248
+ if (node.type === 'processmaker-modeler-task') {
2249
+ definition.screenRef = el.screen_id;
2250
+ store.commit('updateNodeProp', { node, key: 'definition', value: definition });
2251
+ this.$emit('save-state');
2252
+ }
2253
+ });
2254
+ },
2255
+ updateScriptRefs(elements) {
2256
+ elements.forEach(el => {
2257
+ const node = this.nodes.find(n => n.definition.id === el.node_id);
2258
+ let definition = node.definition;
2259
+
2260
+ if (node.type === 'processmaker-modeler-script-task') {
2261
+ definition.scriptRef = el.script_id;
2262
+ store.commit('updateNodeProp', { node, key: 'definition', value: definition });
2263
+ this.$emit('save-state');
2264
+ }
2265
+ });
2266
+ },
2244
2267
  },
2245
2268
  created() {
2246
2269
  if (runningInCypressTest()) {