@processmaker/screen-builder 2.70.0 → 2.71.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": "2.70.0",
3
+ "version": "2.71.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -39,7 +39,7 @@
39
39
  "@cypress/code-coverage": "^3.8.1",
40
40
  "@fortawesome/fontawesome-free": "^5.6.1",
41
41
  "@panter/vue-i18next": "^0.15.2",
42
- "@processmaker/vue-form-elements": "0.45.0",
42
+ "@processmaker/vue-form-elements": "0.46.0",
43
43
  "@processmaker/vue-multiselect": "^2.2.0",
44
44
  "@vue/cli-plugin-babel": "^3.6.0",
45
45
  "@vue/cli-plugin-e2e-cypress": "^4.0.3",
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@panter/vue-i18next": "^0.15.0",
91
- "@processmaker/vue-form-elements": "0.45.0",
91
+ "@processmaker/vue-form-elements": "0.46.0",
92
92
  "i18next": "^15.0.8",
93
93
  "vue": "^2.6.12",
94
94
  "vuex": "^3.1.1"
package/src/.DS_Store CHANGED
Binary file
@@ -11,6 +11,7 @@ class Validations {
11
11
  firstPage = 0;
12
12
  data = {};
13
13
  insideLoop = false;
14
+ pagesValidated = [];
14
15
  constructor(element, options) {
15
16
  this.element = element;
16
17
  Object.assign(this, options);
@@ -64,10 +65,10 @@ class ScreenValidations extends Validations {
64
65
  async addValidations(validations) {
65
66
  // add validations for page 1
66
67
  if (this.element.config[this.firstPage]) {
67
- this.element.pagesValidated = [this.firstPage];
68
+ this.pagesValidated = [this.firstPage];
68
69
  const screenValidations = ValidationsFactory(this.element.config[this.firstPage].items, { screen: this.element, data: this.data });
69
70
  await screenValidations.addValidations(validations);
70
- delete this.element.pagesValidated;
71
+ this.pagesValidated = [];
71
72
  }
72
73
  }
73
74
  }
@@ -192,8 +193,8 @@ class PageNavigateValidations extends Validations {
192
193
  if (!this.isVisible()) {
193
194
  return;
194
195
  }
195
- if (this.screen.pagesValidated && !this.screen.pagesValidated.includes(parseInt(this.element.config.eventData))) {
196
- this.screen.pagesValidated.push(parseInt(this.element.config.eventData));
196
+ if (this.pagesValidated.length > 0 && !this.pagesValidated.includes(parseInt(this.element.config.eventData))) {
197
+ this.pagesValidated.push(parseInt(this.element.config.eventData));
197
198
  if (this.screen.config[this.element.config.eventData] && this.screen.config[this.element.config.eventData].items) {
198
199
  await ValidationsFactory(this.screen.config[this.element.config.eventData].items, { screen: this.screen, data: this.data }).addValidations(validations);
199
200
  }