@processmaker/screen-builder 2.99.1 → 2.99.3

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/screen-builder",
3
- "version": "2.99.1",
3
+ "version": "2.99.3",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -56,7 +56,7 @@
56
56
  "@fortawesome/fontawesome-free": "^5.6.1",
57
57
  "@originjs/vite-plugin-commonjs": "^1.0.3",
58
58
  "@panter/vue-i18next": "^0.15.2",
59
- "@processmaker/vue-form-elements": "0.59.0",
59
+ "@processmaker/vue-form-elements": "0.60.0",
60
60
  "@processmaker/vue-multiselect": "2.3.0",
61
61
  "@storybook/addon-essentials": "^7.6.13",
62
62
  "@storybook/addon-interactions": "^7.6.13",
@@ -115,7 +115,7 @@
115
115
  },
116
116
  "peerDependencies": {
117
117
  "@panter/vue-i18next": "^0.15.0",
118
- "@processmaker/vue-form-elements": "0.59.0",
118
+ "@processmaker/vue-form-elements": "0.60.0",
119
119
  "i18next": "^15.0.8",
120
120
  "vue": "^2.6.12",
121
121
  "vuex": "^3.1.1"
@@ -81,16 +81,26 @@ export default {
81
81
  const hasIncludeScreen = params.match(/include=.*,screen,/);
82
82
  const hasIncludeNested = params.match(/include=.*,nested,/);
83
83
 
84
+ // Extract screen_version from params.
85
+ const screenVersionMatch = params.match(/screen_version=([^&]+)/);
86
+ const screenVersion = screenVersionMatch ? screenVersionMatch[1] : null;
87
+
84
88
  // remove params ?...
85
89
  promises.push(
86
90
  this.get(endpoint + params.replace(/,screen,|,nested,/g, ","))
87
91
  );
88
92
  // Get the screen from a separated cached endpoint
89
93
  if (hasIncludeScreen) {
90
- const screenEndpoint = `${(endpoint + params).replace(
94
+ let screenEndpoint = `${(endpoint + params).replace(
91
95
  /\?.+$/,
92
96
  ""
93
97
  )}/screen?include=screen${hasIncludeNested ? ",nested" : ""}`;
98
+
99
+ // Append screen_version only if screenVersion is not empty.
100
+ if (screenVersion) {
101
+ screenEndpoint += `&screen_version=${screenVersion}`;
102
+ }
103
+
94
104
  promises.push(this.get(screenEndpoint));
95
105
  }
96
106
  // Await for both promises to resolve
@@ -94,6 +94,7 @@ export default {
94
94
  initialRequestId: { type: Number, default: null },
95
95
  initialProcessId: { type: Number, default: null },
96
96
  initialNodeId: { type: String, default: null },
97
+ screenVersion: { type: Number, default: null },
97
98
  userId: { type: Number, default: null },
98
99
  csrfToken: { type: String, default: null },
99
100
  value: { type: Object, default: () => {} },
@@ -265,7 +266,12 @@ export default {
265
266
  return;
266
267
  }
267
268
 
268
- const url = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;
269
+ let url = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;
270
+
271
+ if (this.screenVersion) {
272
+ url += `&screen_version=${this.screenVersion}`;
273
+ }
274
+
269
275
  // For Vocabularies
270
276
  if (window.ProcessMaker && window.ProcessMaker.packages && window.ProcessMaker.packages.includes('package-vocabularies')) {
271
277
  window.ProcessMaker.VocabulariesSchemaUrl = `vocabularies/task_schema/${this.taskId}`;
@@ -532,6 +538,7 @@ export default {
532
538
  } else if (this.parentRequest && ['COMPLETED', 'CLOSED'].includes(this.task.process_request.status)) {
533
539
  this.$emit('completed', this.getAllowedRequestId());
534
540
  }
541
+ this.disabled = false;
535
542
  });
536
543
  },
537
544
  emitIfTaskCompleted(requestId) {
@@ -994,6 +1001,7 @@ export default {
994
1001
  this.requestData = this.value;
995
1002
  this.loopContext = this.initialLoopContext;
996
1003
  this.loadTask(true);
1004
+ this.setSelfService();
997
1005
  },
998
1006
  destroyed() {
999
1007
  this.unsubscribeSocketListeners();