Comparing version 1.1.0 to 1.2.0
@@ -45,2 +45,3 @@ var _class, _temp; | ||
"aria-hidden": "true", | ||
focusable: "false", | ||
width: "23", | ||
@@ -174,9 +175,7 @@ height: "23", | ||
_this3.uppy.addFile(tagFile); | ||
} catch (err) {// Nothing, restriction errors handled in Core | ||
} catch (err) { | ||
if (!err.isRestriction) { | ||
_this3.uppy.log(err); | ||
} | ||
} | ||
}).then(function () {// 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) { | ||
@@ -232,2 +231,2 @@ _this3.uppy.log(err); | ||
return Url; | ||
}(Plugin), _class.VERSION = "1.1.0", _temp); | ||
}(Plugin), _class.VERSION = "1.2.0", _temp); |
@@ -26,15 +26,3 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
_proto.componentDidMount = function componentDidMount() { | ||
var _this2 = this; | ||
this.input.value = ''; // My guess about why browser scrolls to top on focus: | ||
// Component is mounted right away, but the tab panel might be animating | ||
// still, so input element is positioned outside viewport. This fixes it. | ||
setTimeout(function () { | ||
if (!_this2.input) return; | ||
_this2.input.focus({ | ||
preventScroll: true | ||
}); | ||
}, 150); | ||
this.input.value = ''; | ||
}; | ||
@@ -53,3 +41,3 @@ | ||
_proto.render = function render() { | ||
var _this3 = this; | ||
var _this2 = this; | ||
@@ -65,4 +53,5 @@ return h("div", { | ||
ref: function ref(input) { | ||
_this3.input = input; | ||
} | ||
_this2.input = input; | ||
}, | ||
"data-uppy-super-focusable": true | ||
}), h("button", { | ||
@@ -69,0 +58,0 @@ class: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton", |
@@ -50,8 +50,12 @@ var toArray = require('@uppy/utils/lib/toArray'); | ||
*/ | ||
// Finds all links dropped/pasted from one browser window to another. | ||
// @param {object} dataTransfer - DataTransfer instance, e.g. e.clipboardData, or e.dataTransfer | ||
// @param {string} isDropOrPaste - either 'drop' or 'paste' | ||
// @param {function} callback - (urlString) => {} | ||
/** | ||
* Finds all links dropped/pasted from one browser window to another. | ||
* | ||
* @param {Object} dataTransfer - DataTransfer instance, e.g. e.clipboardData, or e.dataTransfer | ||
* @param {string} isDropOrPaste - either 'drop' or 'paste' | ||
* @param {Function} callback - (urlString) => {} | ||
*/ | ||
module.exports = function forEachDroppedOrPastedUrl(dataTransfer, isDropOrPaste, callback) { | ||
@@ -58,0 +62,0 @@ var items = toArray(dataTransfer.items); |
{ | ||
"name": "@uppy/url", | ||
"description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -25,8 +25,8 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/companion-client": "1.1.0", | ||
"@uppy/utils": "1.1.0", | ||
"@uppy/companion-client": "1.2.0", | ||
"@uppy/utils": "1.2.0", | ||
"preact": "8.2.9" | ||
}, | ||
"devDependencies": { | ||
"@uppy/core": "1.1.0" | ||
"@uppy/core": "1.2.0" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "28d235fe2fb57d87a399c20883fd6590aa49f4f4" | ||
"gitHead": "bd2beedcffbaa840de7069860e341f02268ddbb1" | ||
} |
@@ -20,3 +20,3 @@ const { Plugin } = require('@uppy/core') | ||
this.type = 'acquirer' | ||
this.icon = () => <svg aria-hidden="true" width="23" height="23" viewBox="0 0 23 23"> | ||
this.icon = () => <svg aria-hidden="true" focusable="false" width="23" height="23" viewBox="0 0 23 23"> | ||
<path d="M20.485 11.236l-2.748 2.737c-.184.182-.367.365-.642.547-1.007.73-2.107 1.095-3.298 1.095-1.65 0-3.298-.73-4.398-2.19-.275-.365-.183-1.003.183-1.277.367-.273 1.008-.182 1.283.183 1.191 1.642 3.482 1.915 5.13.73a.714.714 0 0 0 .367-.365l2.75-2.737c1.373-1.46 1.373-3.74-.093-5.108a3.72 3.72 0 0 0-5.13 0L12.33 6.4a.888.888 0 0 1-1.283 0 .88.88 0 0 1 0-1.277l1.558-1.55a5.38 5.38 0 0 1 7.605 0c2.29 2.006 2.382 5.564.274 7.662zm-8.979 6.294L9.95 19.081a3.72 3.72 0 0 1-5.13 0c-1.467-1.368-1.467-3.74-.093-5.108l2.75-2.737.366-.365c.824-.547 1.74-.82 2.748-.73 1.008.183 1.833.639 2.382 1.46.275.365.917.456 1.283.182.367-.273.458-.912.183-1.277-.916-1.186-2.199-1.915-3.573-2.098-1.374-.273-2.84.091-4.031 1.004l-.55.547-2.749 2.737c-2.107 2.189-2.015 5.655.092 7.753C4.727 21.453 6.101 22 7.475 22c1.374 0 2.749-.547 3.848-1.55l1.558-1.551a.88.88 0 0 0 0-1.278c-.367-.364-1.008-.456-1.375-.09z" fill="#FF814F" fill-rule="nonzero" /> | ||
@@ -137,12 +137,7 @@ </svg> | ||
} catch (err) { | ||
// Nothing, restriction errors handled in Core | ||
if (!err.isRestriction) { | ||
this.uppy.log(err) | ||
} | ||
} | ||
}) | ||
.then(() => { | ||
// 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((err) => { | ||
@@ -149,0 +144,0 @@ this.uppy.log(err) |
@@ -12,9 +12,2 @@ const { h, Component } = require('preact') | ||
this.input.value = '' | ||
// My guess about why browser scrolls to top on focus: | ||
// Component is mounted right away, but the tab panel might be animating | ||
// still, so input element is positioned outside viewport. This fixes it. | ||
setTimeout(() => { | ||
if (!this.input) return | ||
this.input.focus({ preventScroll: true }) | ||
}, 150) | ||
} | ||
@@ -40,3 +33,4 @@ | ||
onkeyup={this.handleKeyPress} | ||
ref={(input) => { this.input = input }} /> | ||
ref={(input) => { this.input = input }} | ||
data-uppy-super-focusable /> | ||
<button | ||
@@ -43,0 +37,0 @@ class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" |
@@ -52,6 +52,9 @@ const toArray = require('@uppy/utils/lib/toArray') | ||
// Finds all links dropped/pasted from one browser window to another. | ||
// @param {object} dataTransfer - DataTransfer instance, e.g. e.clipboardData, or e.dataTransfer | ||
// @param {string} isDropOrPaste - either 'drop' or 'paste' | ||
// @param {function} callback - (urlString) => {} | ||
/** | ||
* Finds all links dropped/pasted from one browser window to another. | ||
* | ||
* @param {Object} dataTransfer - DataTransfer instance, e.g. e.clipboardData, or e.dataTransfer | ||
* @param {string} isDropOrPaste - either 'drop' or 'paste' | ||
* @param {Function} callback - (urlString) => {} | ||
*/ | ||
module.exports = function forEachDroppedOrPastedUrl (dataTransfer, isDropOrPaste, callback) { | ||
@@ -58,0 +61,0 @@ const items = toArray(dataTransfer.items) |
28137
632
+ Added@uppy/companion-client@1.2.0(transitive)
+ Added@uppy/utils@1.2.0(transitive)
- Removed@uppy/companion-client@1.1.0(transitive)
- Removed@uppy/utils@1.1.0(transitive)
Updated@uppy/companion-client@1.2.0
Updated@uppy/utils@1.2.0