@uppy/drag-drop
Advanced tools
Comparing version 2.1.1 to 3.0.0-beta
@@ -1,18 +0,10 @@ | ||
"use strict"; | ||
var _core = require("@uppy/core"); | ||
var _preact = require("preact"); | ||
const toArray = require("@uppy/utils/lib/toArray"); | ||
const isDragDropSupported = require("@uppy/utils/lib/isDragDropSupported"); | ||
const getDroppedFiles = require("@uppy/utils/lib/getDroppedFiles"); | ||
import { UIPlugin } from '@uppy/core'; | ||
import toArray from '@uppy/utils/lib/toArray'; | ||
import isDragDropSupported from '@uppy/utils/lib/isDragDropSupported'; | ||
import getDroppedFiles from '@uppy/utils/lib/getDroppedFiles'; | ||
import { h } from 'preact'; | ||
const packageJson = { | ||
"version": "2.1.1" | ||
"version": "3.0.0-beta" | ||
}; | ||
const locale = require("./locale.js"); | ||
import locale from './locale.js'; | ||
/** | ||
@@ -23,4 +15,3 @@ * Drag & Drop plugin | ||
class DragDrop extends _core.UIPlugin { | ||
export default class DragDrop extends UIPlugin { | ||
constructor(uppy, opts) { | ||
@@ -60,3 +51,3 @@ super(uppy, opts); | ||
this.title = 'Drag & Drop'; | ||
this.defaultLocale = locale; // Default options | ||
this.defaultLocale = locale; // Default options, must be kept in sync with @uppy/react/src/DragDrop.js. | ||
@@ -179,3 +170,3 @@ const defaultOpts = { | ||
} = this.uppy.opts; | ||
return (0, _preact.h)("input", { | ||
return h("input", { | ||
className: "uppy-DragDrop-input", | ||
@@ -195,3 +186,3 @@ type: "file", | ||
static renderArrowSvg() { | ||
return (0, _preact.h)("svg", { | ||
return h("svg", { | ||
"aria-hidden": "true", | ||
@@ -203,3 +194,3 @@ focusable: "false", | ||
viewBox: "0 0 16 16" | ||
}, (0, _preact.h)("path", { | ||
}, h("path", { | ||
d: "M11 10V0H5v10H2l6 6 6-6h-3zm0 0", | ||
@@ -211,6 +202,6 @@ fillRule: "evenodd" | ||
renderLabel() { | ||
return (0, _preact.h)("div", { | ||
return h("div", { | ||
className: "uppy-DragDrop-label" | ||
}, this.i18nArray('dropHereOr', { | ||
browse: (0, _preact.h)("span", { | ||
browse: h("span", { | ||
className: "uppy-DragDrop-browse" | ||
@@ -222,3 +213,3 @@ }, this.i18n('browse')) | ||
renderNote() { | ||
return (0, _preact.h)("span", { | ||
return h("span", { | ||
className: "uppy-DragDrop-note" | ||
@@ -238,3 +229,3 @@ }, this.opts.note); | ||
}; | ||
return (0, _preact.h)("button", { | ||
return h("button", { | ||
type: "button", | ||
@@ -247,3 +238,3 @@ className: dragDropClass, | ||
onDrop: this.handleDrop | ||
}, this.renderHiddenFileInput(), (0, _preact.h)("div", { | ||
}, this.renderHiddenFileInput(), h("div", { | ||
className: "uppy-DragDrop-inner" | ||
@@ -271,4 +262,2 @@ }, DragDrop.renderArrowSvg(), this.renderLabel(), this.renderNote())); | ||
} | ||
DragDrop.VERSION = packageJson.version; | ||
module.exports = DragDrop; | ||
DragDrop.VERSION = packageJson.version; |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
module.exports = require("./DragDrop.js"); | ||
export { default } from "./DragDrop.js"; |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
module.exports = { | ||
export default { | ||
strings: { | ||
@@ -5,0 +3,0 @@ // Text to show on the droppable area. |
{ | ||
"name": "@uppy/drag-drop", | ||
"description": "Droppable zone UI for Uppy. Drag and drop files into it to upload.", | ||
"version": "2.1.1", | ||
"version": "3.0.0-beta", | ||
"license": "MIT", | ||
@@ -29,8 +29,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^4.1.0", | ||
"@uppy/utils": "^5.0.0-beta", | ||
"preact": "^10.5.13" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^2.3.0" | ||
} | ||
"@uppy/core": "^3.0.0-beta" | ||
}, | ||
"stableVersion": "2.1.1" | ||
} |
@@ -25,3 +25,3 @@ import { UIPlugin } from '@uppy/core' | ||
// Default options | ||
// Default options, must be kept in sync with @uppy/react/src/DragDrop.js. | ||
const defaultOpts = { | ||
@@ -28,0 +28,0 @@ target: null, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
38061
19
530
1
+ Added@transloadit/prettier-bytes@0.3.4(transitive)
+ Added@uppy/core@3.13.1(transitive)
+ Added@uppy/store-default@3.2.2(transitive)
+ Added@uppy/utils@5.9.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addednanoid@4.0.2(transitive)
- Removed@transloadit/prettier-bytes@0.0.7(transitive)
- Removed@uppy/core@2.3.4(transitive)
- Removed@uppy/store-default@2.1.1(transitive)
- Removed@uppy/utils@4.1.3(transitive)
- Removedlodash.throttle@4.1.1(transitive)
- Removednanoid@3.3.7(transitive)
Updated@uppy/utils@^5.0.0-beta