dnm-react-uploader
Advanced tools
Comparing version 1.26.4 to 1.26.5
@@ -164,2 +164,55 @@ import React from 'react'; | ||
</div> | ||
<div id="second-uploader-parent"> | ||
<Uploader | ||
// heavy on purpose, to check loading look | ||
src={this.state.second.src} | ||
srcType={this.state.second.srcType} | ||
customAttributes={{ | ||
root: { | ||
id: 'third-uploader' | ||
} | ||
}} | ||
catalogue={catalogue} | ||
compact={true} | ||
removable | ||
onRemoveClick={() => alert('onRemoveClick 3')} | ||
croppable | ||
onCropClick={() => alert('onCropClick 3')} | ||
cuttable | ||
downloadable | ||
downloadIcon={<Svg.Edit />} | ||
range={[3, null]} | ||
gain={-20} | ||
onCutClick={() => { | ||
alert('onCutClick 3') | ||
console.log('Fireplace replaced with rain in 4s') | ||
setTimeout(() => { | ||
this.setState({ | ||
second: { | ||
src: 'https://s3.eu-west-3.amazonaws.com/com.danim.test/rain.mp3', | ||
} | ||
}) | ||
}, 4000) | ||
}} | ||
maxSizes={maxSizes} | ||
onChange={file => this.setState(prevState => ({ | ||
second: { | ||
...prevState.second, | ||
src: URL.createObjectURL(file), | ||
srcType: file.type, | ||
} | ||
}))} | ||
fileType="audio" | ||
onFirstLoad={() => console.log('onFirstLoad 3')} | ||
onLoad={() => console.log('onLoad 3')} | ||
onFileTooLargeError={(size, maxSize) => alert(`onFileTooLargeError3: ${size} > ${maxSize}`)} | ||
onInvalidFileExtensionError={() => alert('onInvalidFileExtensionError 3')} | ||
onInvalidURLError={() => alert('onInvalidURLError 3')} | ||
onURLInjectionError={() => alert('onURLInjectionError 3')} | ||
onNotSupportedVideoLoad={(err) => console.error("Video source not supported", err)} | ||
removeIcon={<Svg.Erase />} | ||
mediaCrop={{ x: 0, y: 0, width: 100, height: 100 }} | ||
backgroundSize="contain" | ||
/> | ||
</div> | ||
</React.Fragment> | ||
@@ -166,0 +219,0 @@ ); |
{ | ||
"name": "dnm-react-uploader", | ||
"version": "1.26.4", | ||
"version": "1.26.5", | ||
"description": "React file uploader", | ||
@@ -5,0 +5,0 @@ "main": "dist/dnm-react-uploader.umd.min.js", |
@@ -666,2 +666,13 @@ import React from 'react'; | ||
} | ||
{this.props.downloadable === true && | ||
<span | ||
className="uploader-zone-fog-controls-control" | ||
onClick={e => { | ||
e.stopPropagation(); | ||
this.handleClick(); | ||
}} | ||
> | ||
{this.props.downloadIcon || <Svg.Edit />} | ||
</span> | ||
} | ||
{this.props.cuttable === true && | ||
@@ -853,2 +864,3 @@ <span className="uploader-zone-fog-controls-control" onClick={this.handleCutClick}> | ||
croppable: PropTypes.bool, | ||
downloadable: PropTypes.bool, | ||
editable: PropTypes.bool, | ||
@@ -923,2 +935,4 @@ customAttributes: PropTypes.object, | ||
cropIcon: null, // if let null, it will be default one | ||
downloadable: false, | ||
downloadIcon: null, // if let null, it will be default one | ||
customAttributes: {}, | ||
@@ -925,0 +939,0 @@ cuttable: false, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
907435
17614
13