Socket
Socket
Sign inDemoInstall

@uppy/drag-drop

Package Overview
Dependencies
Maintainers
8
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/drag-drop - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0-beta

47

lib/DragDrop.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc