@processmaker/screen-builder 2.71.1 → 2.71.2

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.71.1",
3
+ "version": "2.71.2",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -6,12 +6,13 @@ import { Parser } from 'expr-eval';
6
6
  let globalObject = typeof window === 'undefined'
7
7
  ? global
8
8
  : window;
9
+
10
+ let pagesValidated = [];
9
11
  class Validations {
10
12
  screen = null;
11
13
  firstPage = 0;
12
14
  data = {};
13
15
  insideLoop = false;
14
- pagesValidated = [];
15
16
  constructor(element, options) {
16
17
  this.element = element;
17
18
  Object.assign(this, options);
@@ -65,10 +66,10 @@ class ScreenValidations extends Validations {
65
66
  async addValidations(validations) {
66
67
  // add validations for page 1
67
68
  if (this.element.config[this.firstPage]) {
68
- this.pagesValidated = [this.firstPage];
69
+ pagesValidated = [this.firstPage];
69
70
  const screenValidations = ValidationsFactory(this.element.config[this.firstPage].items, { screen: this.element, data: this.data });
70
71
  await screenValidations.addValidations(validations);
71
- this.pagesValidated = [];
72
+ pagesValidated = [];
72
73
  }
73
74
  }
74
75
  }
@@ -193,8 +194,8 @@ class PageNavigateValidations extends Validations {
193
194
  if (!this.isVisible()) {
194
195
  return;
195
196
  }
196
- if (this.pagesValidated.length > 0 && !this.pagesValidated.includes(parseInt(this.element.config.eventData))) {
197
- this.pagesValidated.push(parseInt(this.element.config.eventData));
197
+ if (pagesValidated.length > 0 && !pagesValidated.includes(parseInt(this.element.config.eventData))) {
198
+ pagesValidated.push(parseInt(this.element.config.eventData));
198
199
  if (this.screen.config[this.element.config.eventData] && this.screen.config[this.element.config.eventData].items) {
199
200
  await ValidationsFactory(this.screen.config[this.element.config.eventData].items, { screen: this.screen, data: this.data }).addValidations(validations);
200
201
  }
@@ -425,12 +425,13 @@ export default {
425
425
  try {
426
426
  if (screenComponent.$v) {
427
427
  screenComponent.$v.$touch();
428
- resolve();
429
428
  }
430
429
  } catch (error) {
431
430
  if (this.getMode() === "preview") {
432
431
  console.warn("There was a problem rendering the screen", error);
433
432
  }
433
+ } finally {
434
+ resolve();
434
435
  }
435
436
  });
436
437
  });