@processmaker/modeler 1.43.17 → 1.43.19

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.19",
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() {
@@ -2100,6 +2100,7 @@ export default {
2100
2100
  });
2101
2101
  },
2102
2102
  onGenerateAssets() {
2103
+ this.isAiGenerated = false;
2103
2104
  this.saveBpmn(null, null, true);
2104
2105
  },
2105
2106
  generateAssets() {
@@ -2215,9 +2216,8 @@ export default {
2215
2216
  streamCompletedEvent,
2216
2217
  (response) => {
2217
2218
  if (response.data) {
2218
- setTimeout(() => {
2219
- window.location.replace(window.location.href.split('?')[0]);
2220
- }, 1500);
2219
+ this.updateScreenRefs(response.data.screenIds);
2220
+ this.updateScriptRefs(response.data.scriptIds);
2221
2221
  }
2222
2222
  },
2223
2223
  );
@@ -2241,6 +2241,30 @@ export default {
2241
2241
  this.loadingAI = false;
2242
2242
  }
2243
2243
  },
2244
+ updateScreenRefs(elements) {
2245
+ elements.forEach(el => {
2246
+ const node = this.nodes.find(n => n.definition.id === el.node_id);
2247
+ let definition = node.definition;
2248
+
2249
+ if (node.type === 'processmaker-modeler-task') {
2250
+ definition.screenRef = el.screen_id;
2251
+ store.commit('updateNodeProp', { node, key: 'definition', value: definition });
2252
+ this.$emit('save-state');
2253
+ }
2254
+ });
2255
+ },
2256
+ updateScriptRefs(elements) {
2257
+ elements.forEach(el => {
2258
+ const node = this.nodes.find(n => n.definition.id === el.node_id);
2259
+ let definition = node.definition;
2260
+
2261
+ if (node.type === 'processmaker-modeler-script-task') {
2262
+ definition.scriptRef = el.script_id;
2263
+ store.commit('updateNodeProp', { node, key: 'definition', value: definition });
2264
+ this.$emit('save-state');
2265
+ }
2266
+ });
2267
+ },
2244
2268
  },
2245
2269
  created() {
2246
2270
  if (runningInCypressTest()) {