@processmaker/screen-builder 3.5.7 → 3.6.0

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.7",
3
+ "version": "3.6.0",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -617,13 +617,16 @@ export default {
617
617
  return;
618
618
  }
619
619
  const newOption = {
620
- [this.valueField]: this.optionContent,
621
- [this.keyField]: this.optionValue,
622
- };
620
+ [this.valueField]: this.optionContent,
621
+ [this.keyField]: this.optionValue
622
+ };
623
623
  if (this.renderAs === "checkbox") {
624
+ const index = this.optionsList.length;
624
625
  this.optionsList.push(newOption);
625
- this.optionsListExtra.push({...newOption, [this.ariaLabelField]: this.optionAriaLabel});
626
-
626
+ this.optionsListExtra[index] = {
627
+ ...newOption,
628
+ [this.ariaLabelField]: this.optionAriaLabel
629
+ };
627
630
  } else {
628
631
  this.optionsList.push(newOption);
629
632
  }
@@ -635,7 +638,10 @@ export default {
635
638
  this.optionsList[this.editIndex][this.keyField] = this.optionValue;
636
639
  this.optionsList[this.editIndex][this.valueField] = this.optionContent;
637
640
  if (this.renderAs === "checkbox") {
638
- this.optionsListExtra[this.editIndex] = {...this.optionsList[this.editIndex], [this.ariaLabelField]: this.optionAriaLabel};
641
+ this.optionsListExtra[this.editIndex] = {
642
+ ...this.optionsList[this.editIndex],
643
+ [this.ariaLabelField]: this.optionAriaLabel
644
+ };
639
645
  }
640
646
  }
641
647
 
@@ -978,6 +978,9 @@ export default {
978
978
  if (
979
979
  ['ACTIVITY_ACTIVATED'].includes(data.event)
980
980
  ) {
981
+ if (data.activeTokens?.includes(this.taskId)) {
982
+ return;
983
+ }
981
984
  this.closeTask(this.parentRequest);
982
985
  }
983
986
  if (