@processmaker/screen-builder 2.28.0 → 2.28.1

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.0",
3
+ "version": "2.28.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -198,7 +198,7 @@ export default {
198
198
  this.filesInfo.push(fileInfo);
199
199
  } else {
200
200
  window.ProcessMaker.alert(
201
- this.$t('File Download Missing File'),
201
+ this.$t('File ID does not exist'),
202
202
  'danger'
203
203
  );
204
204
  }
@@ -18,7 +18,7 @@
18
18
  >
19
19
  <uploader-unsupport/>
20
20
 
21
- <uploader-drop v-if="this.$refs['uploader']" class="form-control-file">
21
+ <uploader-drop v-if="uploaderLoaded" class="form-control-file">
22
22
  <p>{{ $t('Drop a file here to upload or') }}</p>
23
23
  <uploader-btn
24
24
  :attrs="nativeButtonAttrs"
@@ -46,7 +46,7 @@
46
46
  <div v-if="nativeFiles[file.id]" style="flex: 1" class="overflow-hidden" :data-cy="file.file_name.replace(/[^0-9a-zA-Z\-]/g, '-')">
47
47
  <uploader-file :file="nativeFiles[file.id]" :list="true" />
48
48
  </div>
49
- <div v-else style="flex: 1">
49
+ <div v-else class="text-truncate" :title="file.file_name" style="flex: 1">
50
50
  <i class="fas fa-paperclip"/> {{ file.file_name }}
51
51
  </div>
52
52
  <div class="pt-1">
@@ -287,10 +287,13 @@ export default {
287
287
  disabled: false,
288
288
  files: [],
289
289
  nativeFiles: {},
290
- uploading: false,
290
+ uploading: false,
291
291
  };
292
292
  },
293
293
  methods: {
294
+ uploaderLoaded() {
295
+ return this.$refs['uploader'];
296
+ },
294
297
  setFiles() {
295
298
  if (_.isEqual(this.filesData, this.files)) {
296
299
  return;
@@ -38,10 +38,11 @@ export default {
38
38
  computed: {
39
39
  classList() {
40
40
  let variant = this.variant || 'primary';
41
+ let isInvalid = this.$store.getters['globalErrorsModule/isValidScreen'] === false;
41
42
  return {
42
43
  btn: true,
43
44
  ['btn-' + variant]: true,
44
- disabled: this.errors,
45
+ disabled: this.event === 'submit' && isInvalid,
45
46
  };
46
47
  },
47
48
  options() {
@@ -4,6 +4,7 @@ export default {
4
4
  pageNavigate() {},
5
5
  pageNavigationProperties({ properties }) {
6
6
  properties['@page-navigate'] = 'pageNavigate';
7
+ properties[':validate'] = '$v';
7
8
  },
8
9
  pageNavigationBuild(screen) {
9
10
  this.addData(screen, 'currentPage__', 'this._initialPage');
@@ -19,7 +20,7 @@ export default {
19
20
  mounted() {
20
21
  this.extensions.push({
21
22
  onloadproperties(params) {
22
- if (params.componentName === 'FormButton') {
23
+ if (params.element.component === 'FormButton' && params.element.config.event === 'pageNavigate') {
23
24
  this.pageNavigationProperties(params);
24
25
  }
25
26
  },