@kigi/components 1.58.0-beta.3 → 1.58.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": "@kigi/components",
3
- "version": "1.58.0-beta.3",
3
+ "version": "1.58.0",
4
4
  "description": "@kigi/components",
5
5
  "main": "src/components/index.ts",
6
6
  "scripts": {
@@ -57,12 +57,14 @@ class MbgInputFileController {
57
57
  }
58
58
 
59
59
  openImageChoice() {
60
+ delete this.ngModel
60
61
  this.$timeout(() => this.$element.find('input[type="file"]')[0].click())
61
62
  }
62
63
 
63
64
  onFilesChoice(evt) {
64
65
  const files: Array<File> = Array.from(evt.target.files)
65
66
  if (files && files.length > 0) {
67
+ delete this.ngModel
66
68
  this.processFiles(files)
67
69
  }
68
70
  }
@@ -78,19 +80,6 @@ class MbgInputFileController {
78
80
  processFiles(files) {
79
81
  this.uploading = true
80
82
  this.$timeout(async () => {
81
- if (this.disableFirebase) {
82
- this.$timeout(() => {
83
- this.uploadingError = false
84
- this.uploading = false
85
- this.ngModel = {
86
- fileName: files[0].name,
87
- fileSize: files[0].size,
88
- file: files[0],
89
- }
90
- this.$timeout(() => (this.uploadProgress = 0), 1000)
91
- })
92
- return
93
- }
94
83
  this.uploadTask = await ImageUploadFirebase.uploadFile(files[0], {
95
84
  onResume: () => {
96
85
  this.$timeout(() => (this.uploadPaused = false))
@@ -114,9 +103,10 @@ class MbgInputFileController {
114
103
  this.ngModel = response
115
104
  this.ngModel.file = files[0]
116
105
  this.$timeout(() => (this.uploadProgress = 0), 1000)
117
- })
106
+ }, 300)
118
107
  },
119
108
  })
109
+
120
110
  if (this.onFileSelect) {
121
111
  this.onFileSelect({ file: files[0] })
122
112
  }