@processmaker/screen-builder 2.28.1 → 2.29.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",
3
+ "version": "2.29.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -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"
@@ -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();
@@ -327,17 +327,25 @@ export default {
327
327
  this.redirecting = task.process_request_id;
328
328
  this.$emit('redirect', task.id, true);
329
329
  return;
330
- } else if (this.task && requestId == this.task.process_request_id && this.parentRequest && this.task.process_request.status === 'COMPLETED') {
331
- // Only emit completed after getting the subprocess tasks and there are no tasks and process is completed
332
- this.$emit('completed', this.parentRequest);
330
+ } else {
331
+ this.emitIfTaskCompleted(requestId);
333
332
  }
334
333
  this.taskId = task.id;
335
334
  this.nodeId = task.element_id;
336
- } else if (this.parentRequest) {
335
+ } else if (this.parentRequest && ['COMPLETED', 'CLOSED'].includes(this.task.process_request.status)) {
337
336
  this.$emit('completed', this.parentRequest);
338
337
  }
339
338
  });
340
339
  },
340
+ emitIfTaskCompleted(requestId) {
341
+ // Only emit completed after getting the subprocess tasks and there are no tasks and process is completed
342
+ if (this.task
343
+ && this.parentRequest
344
+ && requestId == this.task.process_request_id
345
+ && this.task.process_request.status === 'COMPLETED') {
346
+ this.$emit('completed', this.parentRequest);
347
+ }
348
+ },
341
349
  classHeaderCard(status) {
342
350
  let header = 'bg-success';
343
351
  switch (status) {
@@ -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);