@vaadin/upload 24.8.0-alpha9 → 24.8.0-rc1
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 +11 -11
- package/src/vaadin-upload-mixin.js +14 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-lit-upload.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "24.8.0-
|
|
3
|
+
"version": "24.8.0-rc1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/a11y-base": "24.8.0-
|
|
41
|
-
"@vaadin/button": "24.8.0-
|
|
42
|
-
"@vaadin/component-base": "24.8.0-
|
|
43
|
-
"@vaadin/progress-bar": "24.8.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.8.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.8.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.8.0-
|
|
40
|
+
"@vaadin/a11y-base": "24.8.0-rc1",
|
|
41
|
+
"@vaadin/button": "24.8.0-rc1",
|
|
42
|
+
"@vaadin/component-base": "24.8.0-rc1",
|
|
43
|
+
"@vaadin/progress-bar": "24.8.0-rc1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.8.0-rc1",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.8.0-rc1",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.8.0-rc1",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "24.8.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "24.8.0-
|
|
50
|
+
"@vaadin/chai-plugins": "24.8.0-rc1",
|
|
51
|
+
"@vaadin/test-runner-commands": "24.8.0-rc1",
|
|
52
52
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
53
53
|
"sinon": "^18.0.0"
|
|
54
54
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "901d3eb9224983fd81e222e2fa5c7c207f9a6e46"
|
|
60
60
|
}
|
|
@@ -608,6 +608,19 @@ export const UploadMixin = (superClass) =>
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
+
// In some cases (like dragging attachments from Outlook on Windows), "webkitGetAsEntry"
|
|
612
|
+
// can return null for "dataTransfer" items. Also, there is no reason to check for
|
|
613
|
+
// "webkitGetAsEntry" when there are no folders. Therefore, "dataTransfer.files" is used
|
|
614
|
+
// to handle such cases.
|
|
615
|
+
const containsFolders = Array.from(dropEvent.dataTransfer.items)
|
|
616
|
+
.filter((item) => !!item)
|
|
617
|
+
.filter((item) => typeof item.webkitGetAsEntry === 'function')
|
|
618
|
+
.map((item) => item.webkitGetAsEntry())
|
|
619
|
+
.some((entry) => !!entry && entry.isDirectory);
|
|
620
|
+
if (!containsFolders) {
|
|
621
|
+
return Promise.resolve(dropEvent.dataTransfer.files ? Array.from(dropEvent.dataTransfer.files) : []);
|
|
622
|
+
}
|
|
623
|
+
|
|
611
624
|
const filePromises = Array.from(dropEvent.dataTransfer.items)
|
|
612
625
|
.map((item) => item.webkitGetAsEntry())
|
|
613
626
|
.filter((entry) => !!entry)
|
|
@@ -826,7 +839,7 @@ export const UploadMixin = (superClass) =>
|
|
|
826
839
|
|
|
827
840
|
/** @private */
|
|
828
841
|
_renderFileList() {
|
|
829
|
-
if (this._fileList) {
|
|
842
|
+
if (this._fileList && typeof this._fileList.requestContentUpdate === 'function') {
|
|
830
843
|
this._fileList.requestContentUpdate();
|
|
831
844
|
}
|
|
832
845
|
}
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED