@processmaker/modeler 1.43.16 → 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.16",
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() {
@@ -169,7 +169,7 @@
169
169
  />
170
170
 
171
171
  <RailBottom
172
- v-if="!loadingAI"
172
+ v-show="!loadingAI"
173
173
  :nodeTypes="nodeTypes"
174
174
  :paper-manager="paperManager"
175
175
  :graph="graph"
@@ -2192,10 +2192,13 @@ export default {
2192
2192
  this.assetFail = true;
2193
2193
  this.loadingAI = false;
2194
2194
  } else {
2195
+ this.highlightTaskArrays(response.data);
2196
+ setTimeout(() => {
2197
+ this.unhighlightTaskArrays(response.data);
2198
+ }, 1000);
2195
2199
  this.setPromptSessions(response.data.promptSessionId);
2196
2200
  // Successful generation
2197
- this.assetsCreated = true;
2198
- this.unhighlightTaskArrays(response.data);
2201
+ this.assetsCreated = true;
2199
2202
  this.fetchHistory();
2200
2203
  setTimeout(() => {
2201
2204
  this.loadingAI = false;
@@ -2212,9 +2215,8 @@ export default {
2212
2215
  streamCompletedEvent,
2213
2216
  (response) => {
2214
2217
  if (response.data) {
2215
- setTimeout(() => {
2216
- window.location.replace(window.location.href.split('?')[0]);
2217
- }, 1500);
2218
+ this.updateScreenRefs(response.data.screenIds);
2219
+ this.updateScriptRefs(response.data.scriptIds);
2218
2220
  }
2219
2221
  },
2220
2222
  );
@@ -2238,6 +2240,30 @@ export default {
2238
2240
  this.loadingAI = false;
2239
2241
  }
2240
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
+ },
2241
2267
  },
2242
2268
  created() {
2243
2269
  if (runningInCypressTest()) {