@cocreate/file 1.9.5 → 1.9.7
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/client.js +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.9.7](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.6...v1.9.7) (2023-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* declartion of render functions using object spread ([acb3fc5](https://github.com/CoCreate-app/CoCreate-file/commit/acb3fc5a549ff0a4d17bb5c8c7850f2aad4c58c8))
|
|
7
|
+
|
|
8
|
+
## [1.9.6](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.5...v1.9.6) (2023-10-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* await getValue() ([93a475a](https://github.com/CoCreate-app/CoCreate-file/commit/93a475ae31a77d9dd804b87539524fe75a8249b6))
|
|
14
|
+
|
|
1
15
|
## [1.9.5](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.4...v1.9.5) (2023-10-14)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -136,10 +136,6 @@ async function fileEvent(event) {
|
|
|
136
136
|
|
|
137
137
|
if (!input.renderValue)
|
|
138
138
|
input.renderValue(selected.values())
|
|
139
|
-
// render.render({
|
|
140
|
-
// source: input,
|
|
141
|
-
// data
|
|
142
|
-
// });
|
|
143
139
|
|
|
144
140
|
const isImport = input.getAttribute('import')
|
|
145
141
|
const isRealtime = input.getAttribute('realtime')
|
|
@@ -203,7 +199,7 @@ async function getFiles(fileInputs) {
|
|
|
203
199
|
if (!file.src)
|
|
204
200
|
file = await readFile(file)
|
|
205
201
|
|
|
206
|
-
file = getCustomData({ ...file })
|
|
202
|
+
file = await getCustomData({ ...file })
|
|
207
203
|
files.push(file)
|
|
208
204
|
}
|
|
209
205
|
}
|
|
@@ -213,14 +209,14 @@ async function getFiles(fileInputs) {
|
|
|
213
209
|
}
|
|
214
210
|
|
|
215
211
|
// gets file custom data
|
|
216
|
-
function getCustomData(file) {
|
|
212
|
+
async function getCustomData(file) {
|
|
217
213
|
let form = document.querySelector(`[file_id="${file.id}"]`);
|
|
218
214
|
if (form) {
|
|
219
215
|
let elements = form.querySelectorAll('[file]');
|
|
220
216
|
for (let i = 0; i < elements.length; i++) {
|
|
221
217
|
let name = elements[i].getAttribute('file')
|
|
222
218
|
if (name) {
|
|
223
|
-
file[name] = elements[i].getValue()
|
|
219
|
+
file[name] = await elements[i].getValue()
|
|
224
220
|
}
|
|
225
221
|
}
|
|
226
222
|
}
|