@uppy/dashboard
Advanced tools
Comparing version 3.0.0 to 3.0.1
# @uppy/dashboard | ||
## 3.0.1 | ||
Released: 2022-08-30 | ||
Included in: Uppy v3.0.1 | ||
- @uppy/dashboard,@uppy/webcam: add nativeCameraFacingMode to Webcam and Dashboard (Artur Paikin / #4047) | ||
- @uppy/core,@uppy/dashboard,@uppy/thumbnail-generator: update definition type files for TS 4.8 compatibility (Antoine du Hamel / #4055) | ||
## 3.0.0 | ||
@@ -4,0 +12,0 @@ |
@@ -53,3 +53,3 @@ let _Symbol$for; | ||
this.renderHiddenCameraInput = (type, refCallback) => { | ||
this.renderHiddenCameraInput = (type, nativeCameraFacingMode, refCallback) => { | ||
const typeToAccept = { | ||
@@ -68,3 +68,3 @@ photo: 'image/*', | ||
onChange: this.onFileInputChange, | ||
capture: "user", | ||
capture: nativeCameraFacingMode, | ||
accept: accept, | ||
@@ -296,3 +296,4 @@ ref: refCallback | ||
showNativePhotoCameraButton, | ||
showNativeVideoCameraButton | ||
showNativeVideoCameraButton, | ||
nativeCameraFacingMode | ||
} = this.props; | ||
@@ -305,5 +306,5 @@ return h("div", { | ||
this.folderInput = ref; | ||
}), showNativePhotoCameraButton && this.renderHiddenCameraInput('photo', ref => { | ||
}), showNativePhotoCameraButton && this.renderHiddenCameraInput('photo', nativeCameraFacingMode, ref => { | ||
this.mobilePhotoFileInput = ref; | ||
}), showNativeVideoCameraButton && this.renderHiddenCameraInput('video', ref => { | ||
}), showNativeVideoCameraButton && this.renderHiddenCameraInput('video', nativeCameraFacingMode, ref => { | ||
this.mobileVideoFileInput = ref; | ||
@@ -310,0 +311,0 @@ }), this.renderDropPasteBrowseTagline(), this.renderSourcesList(this.props.acquirers, this.props.disableLocalFiles), h("div", { |
@@ -22,3 +22,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.0.0" | ||
"version": "3.0.1" | ||
}; | ||
@@ -954,2 +954,3 @@ import locale from './locale.js'; | ||
showNativeVideoCameraButton: this.opts.showNativeVideoCameraButton, | ||
nativeCameraFacingMode: this.opts.nativeCameraFacingMode, | ||
handleCancelRestore: this.handleCancelRestore, | ||
@@ -956,0 +957,0 @@ handleRequestThumbnail: this.handleRequestThumbnail, |
{ | ||
"name": "@uppy/dashboard", | ||
"description": "Universal UI plugin for Uppy.", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"license": "MIT", | ||
@@ -30,4 +30,4 @@ "main": "lib/index.js", | ||
"@uppy/status-bar": "^3.0.0", | ||
"@uppy/thumbnail-generator": "^3.0.0", | ||
"@uppy/utils": "^5.0.0", | ||
"@uppy/thumbnail-generator": "^3.0.1", | ||
"@uppy/utils": "^5.0.1", | ||
"classnames": "^2.2.6", | ||
@@ -41,3 +41,3 @@ "is-shallow-equal": "^1.0.1", | ||
"devDependencies": { | ||
"@jest/globals": "^28.0.0", | ||
"@jest/globals": "^29.0.0", | ||
"@uppy/google-drive": "^3.0.0", | ||
@@ -48,4 +48,4 @@ "@uppy/status-bar": "^3.0.0", | ||
"peerDependencies": { | ||
"@uppy/core": "^3.0.0" | ||
"@uppy/core": "^3.0.1" | ||
} | ||
} |
@@ -50,3 +50,3 @@ import { h, Component, Fragment } from 'preact' | ||
renderHiddenCameraInput = (type, refCallback) => { | ||
renderHiddenCameraInput = (type, nativeCameraFacingMode, refCallback) => { | ||
const typeToAccept = { photo: 'image/*', video: 'video/*' } | ||
@@ -64,3 +64,3 @@ const accept = typeToAccept[type] | ||
onChange={this.onFileInputChange} | ||
capture="user" | ||
capture={nativeCameraFacingMode} | ||
accept={accept} | ||
@@ -280,3 +280,7 @@ ref={refCallback} | ||
render () { | ||
const { showNativePhotoCameraButton, showNativeVideoCameraButton } = this.props | ||
const { | ||
showNativePhotoCameraButton, | ||
showNativeVideoCameraButton, | ||
nativeCameraFacingMode, | ||
} = this.props | ||
@@ -287,4 +291,4 @@ return ( | ||
{this.renderHiddenInput(true, (ref) => { this.folderInput = ref })} | ||
{showNativePhotoCameraButton && this.renderHiddenCameraInput('photo', (ref) => { this.mobilePhotoFileInput = ref })} | ||
{showNativeVideoCameraButton && this.renderHiddenCameraInput('video', (ref) => { this.mobileVideoFileInput = ref })} | ||
{showNativePhotoCameraButton && this.renderHiddenCameraInput('photo', nativeCameraFacingMode, (ref) => { this.mobilePhotoFileInput = ref })} | ||
{showNativeVideoCameraButton && this.renderHiddenCameraInput('video', nativeCameraFacingMode, (ref) => { this.mobileVideoFileInput = ref })} | ||
{this.renderDropPasteBrowseTagline()} | ||
@@ -291,0 +295,0 @@ {this.renderSourcesList(this.props.acquirers, this.props.disableLocalFiles)} |
@@ -974,2 +974,3 @@ import { h } from 'preact' | ||
showNativeVideoCameraButton: this.opts.showNativeVideoCameraButton, | ||
nativeCameraFacingMode: this.opts.nativeCameraFacingMode, | ||
handleCancelRestore: this.handleCancelRestore, | ||
@@ -976,0 +977,0 @@ handleRequestThumbnail: this.handleRequestThumbnail, |
@@ -1,2 +0,2 @@ | ||
import type { PluginOptions, UIPlugin, PluginTarget, UppyFile, GenericEventCallback } from '@uppy/core' | ||
import type { PluginOptions, UIPlugin, PluginTarget, UppyFile, IndexedObject } from '@uppy/core' | ||
import type { StatusBarLocale } from '@uppy/status-bar' | ||
@@ -89,4 +89,4 @@ import type { ThumbnailOptions } from '@uppy/thumbnail-generator' | ||
export type DashboardFileEditStartCallback<TMeta> = (file?: UppyFile<TMeta>) => void; | ||
export type DashboardFileEditCompleteCallback<TMeta> = (file?: UppyFile<TMeta>) => void; | ||
export type DashboardFileEditStartCallback<TMeta extends IndexedObject<any>> = (file?: UppyFile<TMeta>) => void; | ||
export type DashboardFileEditCompleteCallback<TMeta extends IndexedObject<any>> = (file?: UppyFile<TMeta>) => void; | ||
declare module '@uppy/core' { | ||
@@ -93,0 +93,0 @@ export interface UppyEventMap<TMeta> { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
662243
9526
Updated@uppy/utils@^5.0.1