@uppy/dashboard
Advanced tools
Comparing version 3.9.0 to 3.9.1
# @uppy/dashboard | ||
## 3.9.1 | ||
Released: 2024-06-27 | ||
Included in: Uppy v3.27.1 | ||
- @uppy/dashboard: fix handling of `null` for `doneButtonHandler` (Antoine du Hamel / #5283) | ||
## 3.8.3 | ||
@@ -4,0 +11,0 @@ |
@@ -21,3 +21,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.9.0" | ||
"version": "3.9.1" | ||
}; | ||
@@ -78,3 +78,3 @@ import locale from "./locale.js"; | ||
// appear in the default options so TS knows they'll be defined. | ||
doneButtonHandler: null, | ||
doneButtonHandler: undefined, | ||
onRequestCloseModal: null | ||
@@ -101,3 +101,3 @@ }; | ||
constructor(uppy, _opts) { | ||
var _this$opts4, _this$opts4$doneButto, _this$opts5, _this$opts5$onRequest; | ||
var _this$opts4, _this$opts4$onRequest; | ||
// support for the legacy `autoOpenFileEditor` option, | ||
@@ -1147,7 +1147,11 @@ // TODO: we can remove this code when we update the Uppy major version | ||
// Dynamic default options: | ||
(_this$opts4$doneButto = (_this$opts4 = this.opts).doneButtonHandler) != null ? _this$opts4$doneButto : _this$opts4.doneButtonHandler = () => { | ||
this.uppy.clearUploadedFiles(); | ||
this.requestCloseModal(); | ||
}; | ||
(_this$opts5$onRequest = (_this$opts5 = this.opts).onRequestCloseModal) != null ? _this$opts5$onRequest : _this$opts5.onRequestCloseModal = () => this.closeModal(); | ||
if (this.opts.doneButtonHandler === undefined) { | ||
// `null` means "do not display a Done button", while `undefined` means | ||
// "I want the default behavior". For this reason, we need to differentiate `null` and `undefined`. | ||
this.opts.doneButtonHandler = () => { | ||
this.uppy.clearUploadedFiles(); | ||
this.requestCloseModal(); | ||
}; | ||
} | ||
(_this$opts4$onRequest = (_this$opts4 = this.opts).onRequestCloseModal) != null ? _this$opts4$onRequest : _this$opts4.onRequestCloseModal = () => this.closeModal(); | ||
this.i18nInit(); | ||
@@ -1154,0 +1158,0 @@ } |
{ | ||
"name": "@uppy/dashboard", | ||
"description": "Universal UI plugin for Uppy.", | ||
"version": "3.9.0", | ||
"version": "3.9.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
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
725256
10568