@uppy/dashboard
Advanced tools
Comparing version 4.0.0-beta.10 to 4.0.0-beta.11
@@ -39,2 +39,9 @@ # @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 | ||
@@ -41,0 +48,0 @@ |
@@ -73,3 +73,3 @@ import { UIPlugin, type UIPluginOptions, type UnknownPlugin, type Uppy, type State } from '@uppy/core'; | ||
disableThumbnailGenerator?: boolean; | ||
doneButtonHandler?: () => void; | ||
doneButtonHandler?: null | (() => void); | ||
fileManagerSelectionType?: 'files' | 'folders' | 'both'; | ||
@@ -76,0 +76,0 @@ hideCancelButton?: boolean; |
@@ -21,3 +21,3 @@ function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
const packageJson = { | ||
"version": "4.0.0-beta.10" | ||
"version": "4.0.0-beta.11" | ||
}; | ||
@@ -76,3 +76,3 @@ import locale from "./locale.js"; | ||
// appear in the default options so TS knows they'll be defined. | ||
doneButtonHandler: null, | ||
doneButtonHandler: undefined, | ||
onRequestCloseModal: null | ||
@@ -99,3 +99,3 @@ }; | ||
constructor(uppy, _opts) { | ||
var _opts$autoOpen, _this$opts4, _this$opts4$doneButto, _this$opts5, _this$opts5$onRequest; | ||
var _opts$autoOpen, _this$opts4, _this$opts4$onRequest; | ||
const autoOpen = (_opts$autoOpen = _opts == null ? void 0 : _opts.autoOpen) != null ? _opts$autoOpen : null; | ||
@@ -1133,7 +1133,11 @@ super(uppy, { | ||
// Dynamic default options: | ||
(_this$opts4$doneButto = (_this$opts4 = this.opts).doneButtonHandler) != null ? _this$opts4$doneButto : _this$opts4.doneButtonHandler = () => { | ||
this.uppy.clear(); | ||
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.clear(); | ||
this.requestCloseModal(); | ||
}; | ||
} | ||
(_this$opts4$onRequest = (_this$opts4 = this.opts).onRequestCloseModal) != null ? _this$opts4$onRequest : _this$opts4.onRequestCloseModal = () => this.closeModal(); | ||
this.i18nInit(); | ||
@@ -1140,0 +1144,0 @@ } |
{ | ||
"name": "@uppy/dashboard", | ||
"description": "Universal UI plugin for Uppy.", | ||
"version": "4.0.0-beta.10", | ||
"version": "4.0.0-beta.11", | ||
"license": "MIT", | ||
@@ -27,6 +27,6 @@ "main": "lib/index.js", | ||
"@uppy/informer": "^4.0.0-beta.2", | ||
"@uppy/provider-views": "^4.0.0-beta.9", | ||
"@uppy/provider-views": "^4.0.0-beta.10", | ||
"@uppy/status-bar": "^4.0.0-beta.9", | ||
"@uppy/thumbnail-generator": "^4.0.0-beta.4", | ||
"@uppy/utils": "^6.0.0-beta.8", | ||
"@uppy/utils": "^6.0.0-beta.9", | ||
"classnames": "^2.2.6", | ||
@@ -40,6 +40,6 @@ "lodash": "^4.17.21", | ||
"devDependencies": { | ||
"@uppy/google-drive": "^3.6.0-beta.1", | ||
"@uppy/google-drive": "^4.0.0-beta.1", | ||
"@uppy/status-bar": "^4.0.0-beta.9", | ||
"@uppy/url": "^4.0.0-beta.7", | ||
"@uppy/webcam": "^4.0.0-beta.8", | ||
"@uppy/url": "^4.0.0-beta.8", | ||
"@uppy/webcam": "^4.0.0-beta.9", | ||
"resize-observer-polyfill": "^1.5.0", | ||
@@ -49,5 +49,5 @@ "vitest": "^1.2.1" | ||
"peerDependencies": { | ||
"@uppy/core": "^4.0.0-beta.10" | ||
"@uppy/core": "^4.0.0-beta.11" | ||
}, | ||
"stableVersion": "3.8.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
750539
10737