@uppy/status-bar
Advanced tools
Comparing version 3.2.2 to 3.2.3
# @uppy/status-bar | ||
## 3.2.3 | ||
Released: 2023-07-20 | ||
Included in: Uppy v3.13.0 | ||
- @uppy/status-bar: fix ETA when status bar is installed during upload (Antoine du Hamel / #4588) | ||
## 3.2.2 | ||
@@ -4,0 +11,0 @@ |
@@ -10,3 +10,3 @@ function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | ||
const packageJson = { | ||
"version": "3.2.2" | ||
"version": "3.2.3" | ||
}; | ||
@@ -225,2 +225,7 @@ import locale from './locale.js'; | ||
this.uppy.on('upload', _classPrivateFieldLooseBase(this, _onUploadStart)[_onUploadStart]); | ||
// To cover the use case where the status bar is installed while the upload | ||
// has started, we set `lastUpdateTime` right away. | ||
_classPrivateFieldLooseBase(this, _lastUpdateTime)[_lastUpdateTime] = performance.now(); | ||
_classPrivateFieldLooseBase(this, _previousUploadedBytes)[_previousUploadedBytes] = this.uppy.getFiles().reduce((pv, file) => pv + file.progress.bytesUploaded, 0); | ||
} | ||
@@ -227,0 +232,0 @@ uninstall() { |
{ | ||
"name": "@uppy/status-bar", | ||
"description": "A progress bar for Uppy, with many bells and whistles.", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "0.0.9", | ||
"@uppy/utils": "^5.4.1", | ||
"@uppy/utils": "^5.4.2", | ||
"classnames": "^2.2.6", | ||
@@ -34,0 +34,0 @@ "preact": "^10.5.13" |
@@ -257,2 +257,8 @@ import { UIPlugin } from '@uppy/core' | ||
this.uppy.on('upload', this.#onUploadStart) | ||
// To cover the use case where the status bar is installed while the upload | ||
// has started, we set `lastUpdateTime` right away. | ||
this.#lastUpdateTime = performance.now() | ||
this.#previousUploadedBytes = this.uppy.getFiles() | ||
.reduce((pv, file) => pv + file.progress.bytesUploaded, 0) | ||
} | ||
@@ -259,0 +265,0 @@ |
Sorry, the diff of this file is not supported yet
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
168051
2588
Updated@uppy/utils@^5.4.2