@vaadin/upload 24.8.0-alpha9 → 24.8.0-beta1

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": "@vaadin/upload",
3
- "version": "24.8.0-alpha9",
3
+ "version": "24.8.0-beta1",
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-alpha9",
41
- "@vaadin/button": "24.8.0-alpha9",
42
- "@vaadin/component-base": "24.8.0-alpha9",
43
- "@vaadin/progress-bar": "24.8.0-alpha9",
44
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
45
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
46
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
40
+ "@vaadin/a11y-base": "24.8.0-beta1",
41
+ "@vaadin/button": "24.8.0-beta1",
42
+ "@vaadin/component-base": "24.8.0-beta1",
43
+ "@vaadin/progress-bar": "24.8.0-beta1",
44
+ "@vaadin/vaadin-lumo-styles": "24.8.0-beta1",
45
+ "@vaadin/vaadin-material-styles": "24.8.0-beta1",
46
+ "@vaadin/vaadin-themable-mixin": "24.8.0-beta1",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.8.0-alpha9",
51
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
50
+ "@vaadin/chai-plugins": "24.8.0-beta1",
51
+ "@vaadin/test-runner-commands": "24.8.0-beta1",
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": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
59
+ "gitHead": "57ce3a90de99e49049312b0ba4041d3e7542e9d8"
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.8.0-alpha9",
4
+ "version": "24.8.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.8.0-alpha9",
4
+ "version": "24.8.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- export * from './vaadin-upload.js';