Comparing version 0.27.4 to 0.27.5
@@ -169,4 +169,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
}).then(function () { | ||
var dashboard = _this3.uppy.getPlugin('Dashboard'); | ||
if (dashboard) dashboard.hideAllPanels(); | ||
// Close the Dashboard panel if plugin is installed | ||
// into Dashboard (could be other parent UI plugin) | ||
// if (this.parent && this.parent.hideAllPanels) { | ||
// this.parent.hideAllPanels() | ||
// } | ||
}).catch(function (err) { | ||
@@ -240,2 +243,11 @@ _this3.uppy.log(err); | ||
Url.prototype.onMount = function onMount() { | ||
if (this.el) { | ||
this.el.addEventListener('drop', this.handleDrop); | ||
this.el.addEventListener('dragover', this.handleDragOver); | ||
this.el.addEventListener('dragleave', this.handleDragLeave); | ||
this.el.addEventListener('paste', this.handlePaste); | ||
} | ||
}; | ||
Url.prototype.install = function install() { | ||
@@ -246,14 +258,11 @@ var target = this.opts.target; | ||
} | ||
this.el.addEventListener('drop', this.handleDrop); | ||
this.el.addEventListener('dragover', this.handleDragOver); | ||
this.el.addEventListener('dragleave', this.handleDragLeave); | ||
this.el.addEventListener('paste', this.handlePaste); | ||
}; | ||
Url.prototype.uninstall = function uninstall() { | ||
this.el.removeEventListener('drop', this.handleDrop); | ||
this.el.removeEventListener('dragover', this.handleDragOver); | ||
this.el.removeEventListener('dragleave', this.handleDragLeave); | ||
this.el.removeEventListener('paste', this.handlePaste); | ||
if (this.el) { | ||
this.el.removeEventListener('drop', this.handleDrop); | ||
this.el.removeEventListener('dragover', this.handleDragOver); | ||
this.el.removeEventListener('dragleave', this.handleDragLeave); | ||
this.el.removeEventListener('paste', this.handlePaste); | ||
} | ||
@@ -260,0 +269,0 @@ this.unmount(); |
{ | ||
"name": "@uppy/url", | ||
"description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", | ||
"version": "0.27.4", | ||
"version": "0.27.5", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@uppy/core": "0.27.2" | ||
"@uppy/core": "0.27.3" | ||
}, | ||
@@ -37,3 +37,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "4819ff33ce676cdc4ad8208b616829b15fc059c6" | ||
"gitHead": "113d6f09bbe248ca156af87054244cd9e6ee9d8b" | ||
} |
@@ -144,4 +144,7 @@ const { Plugin } = require('@uppy/core') | ||
.then(() => { | ||
const dashboard = this.uppy.getPlugin('Dashboard') | ||
if (dashboard) dashboard.hideAllPanels() | ||
// Close the Dashboard panel if plugin is installed | ||
// into Dashboard (could be other parent UI plugin) | ||
// if (this.parent && this.parent.hideAllPanels) { | ||
// this.parent.hideAllPanels() | ||
// } | ||
}) | ||
@@ -210,2 +213,11 @@ .catch((err) => { | ||
onMount () { | ||
if (this.el) { | ||
this.el.addEventListener('drop', this.handleDrop) | ||
this.el.addEventListener('dragover', this.handleDragOver) | ||
this.el.addEventListener('dragleave', this.handleDragLeave) | ||
this.el.addEventListener('paste', this.handlePaste) | ||
} | ||
} | ||
install () { | ||
@@ -216,14 +228,11 @@ const target = this.opts.target | ||
} | ||
this.el.addEventListener('drop', this.handleDrop) | ||
this.el.addEventListener('dragover', this.handleDragOver) | ||
this.el.addEventListener('dragleave', this.handleDragLeave) | ||
this.el.addEventListener('paste', this.handlePaste) | ||
} | ||
uninstall () { | ||
this.el.removeEventListener('drop', this.handleDrop) | ||
this.el.removeEventListener('dragover', this.handleDragOver) | ||
this.el.removeEventListener('dragleave', this.handleDragLeave) | ||
this.el.removeEventListener('paste', this.handlePaste) | ||
if (this.el) { | ||
this.el.removeEventListener('drop', this.handleDrop) | ||
this.el.removeEventListener('dragover', this.handleDragOver) | ||
this.el.removeEventListener('dragleave', this.handleDragLeave) | ||
this.el.removeEventListener('paste', this.handlePaste) | ||
} | ||
@@ -230,0 +239,0 @@ this.unmount() |
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
38309
758