@processmaker/screen-builder 2.71.0 → 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.0",
3
+ "version": "2.71.2",
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.46.0",
42
+ "@processmaker/vue-form-elements": "0.46.1",
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.46.0",
91
+ "@processmaker/vue-form-elements": "0.46.1",
92
92
  "i18next": "^15.0.8",
93
93
  "vue": "^2.6.12",
94
94
  "vuex": "^3.1.1"
@@ -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
  }
@@ -541,12 +541,11 @@ export default {
541
541
  return null;
542
542
  },
543
543
  start() {
544
+ this.uploading = true;
544
545
  // Prevent the upload from being started when the file is invalid.
545
546
  if (this.invalidFile) {
546
547
  return;
547
548
  }
548
-
549
- this.uploading = true;
550
549
  if (this.parentRecordList(this) === null) {
551
550
  this.row_id = null;
552
551
  }
@@ -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
  });