@processmaker/screen-builder 3.5.5 → 3.5.7

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": "3.5.5",
3
+ "version": "3.5.7",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -472,7 +472,6 @@ export default {
472
472
  editIndex: this.editIndex,
473
473
  removeIndex: this.removeIndex,
474
474
  valueTypeReturned: this.valueTypeReturned,
475
- optionAriaLabel: this.optionAriaLabel,
476
475
  };
477
476
  },
478
477
  },
@@ -490,7 +489,6 @@ export default {
490
489
  this.selectedEndPoint = this.options.selectedEndPoint,
491
490
  this.key = this.options.key;
492
491
  this.value = this.options.value;
493
- this.optionAriaLabel = this.options.ariaLabel;
494
492
  this.pmqlQuery = this.options.pmqlQuery;
495
493
  this.defaultOptionKey= this.options.defaultOptionKey;
496
494
  this.selectedOptions = this.options.selectedOptions;
@@ -593,8 +591,11 @@ export default {
593
591
  this.editIndex = index;
594
592
  this.optionContent = this.optionsList[index][this.valueField];
595
593
  this.optionValue = this.optionsList[index][this.keyField];
594
+ this.optionAriaLabel = "";
596
595
  if (this.renderAs === "checkbox") {
597
- this.optionAriaLabel = this.optionsListExtra[index][this.ariaLabelField];
596
+ this.optionAriaLabel = this.optionsListExtra[index]
597
+ ? this.optionsListExtra[index][this.ariaLabelField]
598
+ : "";
598
599
  }
599
600
  this.optionError = '';
600
601
  },
@@ -850,6 +850,10 @@ export default {
850
850
  * @param {Object} data - The event data received from the socket listener.
851
851
  */
852
852
  handleRedirect(data) {
853
+ // Validate if the task is still active before redirects
854
+ if (data.params?.activeTokens?.includes(this.taskId)) {
855
+ return;
856
+ }
853
857
  switch (data.method) {
854
858
  case 'redirectToTask':
855
859
  this.handleRedirectToTask(data);
@@ -300,6 +300,7 @@
300
300
  <button
301
301
  class="btn btn-sm btn-primary mr-2"
302
302
  :title="$t('Copy Control')"
303
+ data-test="copy-control-btn"
303
304
  @click="duplicateItem(index)"
304
305
  >
305
306
  <i class="fas fa-copy text-light" />
@@ -1326,7 +1327,7 @@ export default {
1326
1327
  this.updateState();
1327
1328
  },
1328
1329
  duplicateItem(index) {
1329
- const duplicate = _.cloneDeep(this.config[this.currentPage].items[index]);
1330
+ const duplicate = _.cloneDeep(this.extendedPages[this.currentPage].items[index]);
1330
1331
  this.updateUuids(duplicate);
1331
1332
  this.extendedPages[this.currentPage].items.push(duplicate);
1332
1333
  },