@processmaker/screen-builder 2.28.1-RC4B → 2.30.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.28.1-RC4B",
3
+ "version": "2.30.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "is-proxy": "^1.0.6",
25
- "lodash": "^4.17.20",
25
+ "lodash": "^4.17.21",
26
26
  "moment": "^2.29.1",
27
27
  "moment-timezone": "^0.5.27",
28
28
  "scrollparent": "^2.0.1",
@@ -38,7 +38,7 @@
38
38
  "@cypress/code-coverage": "^3.8.1",
39
39
  "@fortawesome/fontawesome-free": "^5.6.1",
40
40
  "@panter/vue-i18next": "^0.15.2",
41
- "@processmaker/vue-form-elements": "0.29.0",
41
+ "@processmaker/vue-form-elements": "0.29.1",
42
42
  "@processmaker/vue-multiselect": "^2.2.0",
43
43
  "@vue/cli-plugin-babel": "^3.6.0",
44
44
  "@vue/cli-plugin-e2e-cypress": "^4.0.3",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@panter/vue-i18next": "^0.15.0",
85
- "@processmaker/vue-form-elements": "0.29.0",
85
+ "@processmaker/vue-form-elements": "0.29.1",
86
86
  "i18next": "^15.0.8",
87
87
  "vue": "^2.6.12",
88
88
  "vuex": "^3.1.1"
@@ -35,7 +35,7 @@ class Validations {
35
35
  isVisible() {
36
36
  // Disable validations if field is hidden
37
37
  let visible = true;
38
- if (!this.data.noData && this.element.config.conditionalHide) {
38
+ if (this.element.config.conditionalHide) {
39
39
  try {
40
40
  visible = !!Parser.evaluate(this.element.config.conditionalHide, this.data);
41
41
  } catch (error) {
@@ -43,7 +43,7 @@ class Validations {
43
43
  }
44
44
  }
45
45
  return visible;
46
- }
46
+ }
47
47
  }
48
48
 
49
49
  /**
@@ -115,7 +115,8 @@ class FormLoopValidations extends Validations {
115
115
  const loopField = get(validations, this.element.config.name);
116
116
  loopField['$each'] = {};
117
117
  this.checkForSiblings(validations);
118
- await ValidationsFactory(this.element.items, { screen: this.screen, data: {_parent: this.data, noData:true }, parentVisibilityRule: this.element.config.conditionalHide, insideLoop: true }).addValidations(loopField['$each']);
118
+ const firstRow = (get(this.data, this.element.config.name) || [{}])[0];
119
+ await ValidationsFactory(this.element.items, { screen: this.screen, data: {_parent: this.data, ...firstRow }, parentVisibilityRule: this.element.config.conditionalHide, insideLoop: true }).addValidations(loopField['$each']);
119
120
  }
120
121
  checkForSiblings(validations) {
121
122
  const siblings = [];
@@ -45,7 +45,7 @@ export default {
45
45
  computed: {
46
46
  classList() {
47
47
  return {
48
- 'is-invalid': (this.validator && this.validator.errorCount) || this.error,
48
+ 'has-errors': (this.validator && this.validator.errorCount) || this.error,
49
49
  };
50
50
  },
51
51
  },
@@ -59,7 +59,7 @@ export default {
59
59
  </script>
60
60
 
61
61
  <style lang="scss">
62
- .is-invalid .multiselect__tags {
63
- border-color: red !important;
62
+ .has-errors .multiselect__tags {
63
+ border-color: red;
64
64
  }
65
- </style>
65
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <input type="text" class="form-control" v-model="currencyValue" ref="currencyInput" >
2
+ <input type="text" class="form-control" @keyup="keyup" v-model="currencyValue" ref="currencyInput" >
3
3
  </template>
4
4
 
5
5
  <script>
@@ -66,6 +66,13 @@ export default {
66
66
  this.currencyInput.inputmask.setValue(this.value);
67
67
  }
68
68
  },
69
+ keyup(event) {
70
+ // Workaround for a bug in inputmask where backspacing after
71
+ // the decimal does not trigger an input event
72
+ if (this.currencyValue !== event.target.value) {
73
+ this.currencyValue = event.target.value;
74
+ }
75
+ },
69
76
  },
70
77
  mounted() {
71
78
  this.loadMasks();
@@ -103,15 +103,7 @@ export default {
103
103
  },
104
104
  mustache(text) {
105
105
  try {
106
- const data = new Proxy(this, {
107
- get(target, name) {
108
- if (name === '_parent') {
109
- return target._parent;
110
- } else {
111
- return target.vdata[name];
112
- }
113
- },
114
- });
106
+ const data = Object.assign({_parent: this._parent}, this.vdata);
115
107
  return text && Mustache.render(text, data);
116
108
  } catch (e) {
117
109
  return 'MUSTACHE: ' + e.message;
@@ -187,7 +179,7 @@ export default {
187
179
  this.$set(
188
180
  object,
189
181
  attr,
190
- setValue
182
+ setValue,
191
183
  );
192
184
 
193
185
  object = get(object, attr);
@@ -3,7 +3,7 @@ import { debounce } from 'lodash';
3
3
 
4
4
  export default {
5
5
  mounted() {
6
- this.refreshValidationRulesByName = debounce(this.refreshValidationRulesByName, 1000);
6
+ this.refreshValidationRulesByName = debounce(this.refreshValidationRulesByName, 500);
7
7
 
8
8
  this.$root.$on('refresh-validation-rules', () => {
9
9
  this.loadValidationRules();
@@ -30,7 +30,7 @@ export default {
30
30
 
31
31
  window.setTimeout(() => {
32
32
  this.refreshValidationRulesByName(fieldName, isVisible);
33
- }, 1000);
33
+ }, 250);
34
34
  return isVisible;
35
35
  } catch (e) {
36
36
  return false;