@enso-ui/uploader 2.0.10 → 2.0.11

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": "@enso-ui/uploader",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "File Uploader",
5
5
  "main": "bulma/index.js",
6
6
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  "homepage": "https://github.com/enso-ui/uploader#readme",
23
23
  "dependencies": {
24
24
  "@fortawesome/fontawesome-svg-core": "^1.2.2",
25
- "@fortawesome/free-solid-svg-icons": "^5.2.0",
25
+ "@fortawesome/free-solid-svg-icons": "^5.11.2",
26
26
  "@fortawesome/vue-fontawesome": "3.0.0-5",
27
27
  "bulma": "^0.9.0",
28
28
  "vue": "^3.0"
@@ -6,6 +6,8 @@ export default {
6
6
 
7
7
  inject: ['errorHandler', 'toastr'],
8
8
 
9
+ inheritAttrs: false,
10
+
9
11
  props: {
10
12
  compact: {
11
13
  default: false,
@@ -24,7 +26,7 @@ export default {
24
26
  type: Function,
25
27
  },
26
28
  i18n: {
27
- default: (v) => v,
29
+ default: v => v,
28
30
  type: Function,
29
31
  },
30
32
  label: {
@@ -54,8 +56,6 @@ export default {
54
56
  'upload-successful', 'upload-error',
55
57
  ],
56
58
 
57
- inheritAttrs: false,
58
-
59
59
  data: () => ({
60
60
  formData: new FormData(),
61
61
  succesfull: 0,
@@ -102,17 +102,17 @@ export default {
102
102
  return;
103
103
  }
104
104
 
105
- this.http.post(this.url, this.formData).then((response) => {
105
+ this.http.post(this.url, this.formData).then(response => {
106
106
  this.reset();
107
107
  this.$emit('upload-successful', response.data);
108
- }).catch((error) => {
108
+ }).catch(error => {
109
109
  this.reset();
110
110
  this.$emit('upload-error');
111
111
  const { data, status } = error.response;
112
112
 
113
113
  if (status === 422) {
114
114
  Object.keys(data.errors)
115
- .forEach((key) => this.toastr.error(data.errors[key][0]));
115
+ .forEach(key => this.toastr.error(data.errors[key][0]));
116
116
  return;
117
117
  }
118
118
 
@@ -189,7 +189,7 @@ export default {
189
189
  },
190
190
  inputEvents: {
191
191
  change: this.onChange,
192
- input: (event) => this.$emit('input', event.target.value),
192
+ input: event => this.$emit('input', event.target.value),
193
193
  },
194
194
  label: this.displayLabel,
195
195
  multiple: this.multiple,