@vaadin/upload
Advanced tools
Comparing version 24.5.0-alpha8 to 24.5.0-alpha9
{ | ||
"name": "@vaadin/upload", | ||
"version": "24.5.0-alpha8", | ||
"version": "24.5.0-alpha9", | ||
"publishConfig": { | ||
@@ -45,13 +45,13 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.5.0-alpha8", | ||
"@vaadin/button": "24.5.0-alpha8", | ||
"@vaadin/component-base": "24.5.0-alpha8", | ||
"@vaadin/progress-bar": "24.5.0-alpha8", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha8", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha8", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha8", | ||
"@vaadin/a11y-base": "24.5.0-alpha9", | ||
"@vaadin/button": "24.5.0-alpha9", | ||
"@vaadin/component-base": "24.5.0-alpha9", | ||
"@vaadin/progress-bar": "24.5.0-alpha9", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha9", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha9", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha9", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.5.0-alpha8", | ||
"@vaadin/chai-plugins": "24.5.0-alpha9", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
@@ -64,3 +64,3 @@ "sinon": "^18.0.0" | ||
], | ||
"gitHead": "1e227aaa55df3f5dae3d477b9afb5fce4f5ece33" | ||
"gitHead": "804744762f3bec0a2247c4bbcbbb204dbcd78bc0" | ||
} |
@@ -56,3 +56,3 @@ # @vaadin/upload | ||
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components. | ||
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. | ||
@@ -59,0 +59,0 @@ ## License |
@@ -756,2 +756,3 @@ /** | ||
this._uploadFile(file); | ||
this._updateFocus(this.files.indexOf(file)); | ||
} | ||
@@ -831,2 +832,15 @@ } | ||
/** @private */ | ||
_updateFocus(fileIndex) { | ||
if (this.files.length === 0) { | ||
this._addButton.focus(); | ||
return; | ||
} | ||
const lastFileRemoved = fileIndex === this.files.length; | ||
if (lastFileRemoved) { | ||
fileIndex -= 1; | ||
} | ||
this._fileList.children[fileIndex].firstElementChild.focus(); | ||
} | ||
/** | ||
@@ -838,3 +852,4 @@ * Remove file from upload list. Called internally if file upload was canceled. | ||
_removeFile(file) { | ||
if (this.files.indexOf(file) > -1) { | ||
const fileIndex = this.files.indexOf(file); | ||
if (fileIndex >= 0) { | ||
this.files = this.files.filter((i) => i !== file); | ||
@@ -849,2 +864,4 @@ | ||
); | ||
this._updateFocus(fileIndex); | ||
} | ||
@@ -851,0 +868,0 @@ } |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/upload", | ||
"version": "24.5.0-alpha8", | ||
"version": "24.5.0-alpha9", | ||
"description-markup": "markdown", | ||
@@ -6,0 +6,0 @@ "contributions": { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/upload", | ||
"version": "24.5.0-alpha8", | ||
"version": "24.5.0-alpha9", | ||
"description-markup": "markdown", | ||
@@ -6,0 +6,0 @@ "framework": "lit", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138214
3358
+ Added@vaadin/a11y-base@24.5.0-alpha9(transitive)
+ Added@vaadin/button@24.5.0-alpha9(transitive)
+ Added@vaadin/component-base@24.5.0-alpha9(transitive)
+ Added@vaadin/icon@24.5.0-alpha9(transitive)
+ Added@vaadin/progress-bar@24.5.0-alpha9(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.5.0-alpha9(transitive)
+ Added@vaadin/vaadin-material-styles@24.5.0-alpha9(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.5.0-alpha9(transitive)
- Removed@vaadin/a11y-base@24.5.0-alpha8(transitive)
- Removed@vaadin/button@24.5.0-alpha8(transitive)
- Removed@vaadin/component-base@24.5.0-alpha8(transitive)
- Removed@vaadin/icon@24.5.0-alpha8(transitive)
- Removed@vaadin/progress-bar@24.5.0-alpha8(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.5.0-alpha8(transitive)
- Removed@vaadin/vaadin-material-styles@24.5.0-alpha8(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.5.0-alpha8(transitive)
Updated@vaadin/button@24.5.0-alpha9