@vaadin/upload 24.5.0-alpha8 → 24.5.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/README.md +1 -1
- package/package.json +10 -10
- package/src/vaadin-upload-mixin.js +18 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ import '@vaadin/upload/src/vaadin-upload.js';
|
|
|
53
53
|
|
|
54
54
|
## Contributing
|
|
55
55
|
|
|
56
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/contributing
|
|
56
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
57
57
|
|
|
58
58
|
## License
|
|
59
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
44
44
|
"@polymer/polymer": "^3.0.0",
|
|
45
|
-
"@vaadin/a11y-base": "24.5.0-
|
|
46
|
-
"@vaadin/button": "24.5.0-
|
|
47
|
-
"@vaadin/component-base": "24.5.0-
|
|
48
|
-
"@vaadin/progress-bar": "24.5.0-
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "24.5.0-
|
|
50
|
-
"@vaadin/vaadin-material-styles": "24.5.0-
|
|
51
|
-
"@vaadin/vaadin-themable-mixin": "24.5.0-
|
|
45
|
+
"@vaadin/a11y-base": "24.5.0-beta1",
|
|
46
|
+
"@vaadin/button": "24.5.0-beta1",
|
|
47
|
+
"@vaadin/component-base": "24.5.0-beta1",
|
|
48
|
+
"@vaadin/progress-bar": "24.5.0-beta1",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-beta1",
|
|
50
|
+
"@vaadin/vaadin-material-styles": "24.5.0-beta1",
|
|
51
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-beta1",
|
|
52
52
|
"lit": "^3.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@vaadin/chai-plugins": "24.5.0-
|
|
55
|
+
"@vaadin/chai-plugins": "24.5.0-beta1",
|
|
56
56
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
57
57
|
"sinon": "^18.0.0"
|
|
58
58
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"web-types.json",
|
|
61
61
|
"web-types.lit.json"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "da4b57724d7089e3766d59d01068159322adb2b8"
|
|
64
64
|
}
|
|
@@ -753,6 +753,7 @@ export const UploadMixin = (superClass) =>
|
|
|
753
753
|
);
|
|
754
754
|
if (evt) {
|
|
755
755
|
this._uploadFile(file);
|
|
756
|
+
this._updateFocus(this.files.indexOf(file));
|
|
756
757
|
}
|
|
757
758
|
}
|
|
758
759
|
|
|
@@ -827,13 +828,27 @@ export const UploadMixin = (superClass) =>
|
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
830
|
|
|
831
|
+
/** @private */
|
|
832
|
+
_updateFocus(fileIndex) {
|
|
833
|
+
if (this.files.length === 0) {
|
|
834
|
+
this._addButton.focus();
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
const lastFileRemoved = fileIndex === this.files.length;
|
|
838
|
+
if (lastFileRemoved) {
|
|
839
|
+
fileIndex -= 1;
|
|
840
|
+
}
|
|
841
|
+
this._fileList.children[fileIndex].firstElementChild.focus();
|
|
842
|
+
}
|
|
843
|
+
|
|
830
844
|
/**
|
|
831
845
|
* Remove file from upload list. Called internally if file upload was canceled.
|
|
832
846
|
* @param {!UploadFile} file File to remove
|
|
833
847
|
* @protected
|
|
834
848
|
*/
|
|
835
849
|
_removeFile(file) {
|
|
836
|
-
|
|
850
|
+
const fileIndex = this.files.indexOf(file);
|
|
851
|
+
if (fileIndex >= 0) {
|
|
837
852
|
this.files = this.files.filter((i) => i !== file);
|
|
838
853
|
|
|
839
854
|
this.dispatchEvent(
|
|
@@ -843,6 +858,8 @@ export const UploadMixin = (superClass) =>
|
|
|
843
858
|
composed: true,
|
|
844
859
|
}),
|
|
845
860
|
);
|
|
861
|
+
|
|
862
|
+
this._updateFocus(fileIndex);
|
|
846
863
|
}
|
|
847
864
|
}
|
|
848
865
|
|
package/web-types.json
CHANGED