Comparing version 1.5.19 to 1.5.20
@@ -7,4 +7,6 @@ var _class, _temp; | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var _require = require('@uppy/core'), | ||
@@ -34,5 +36,5 @@ Plugin = _require.Plugin; | ||
fill: "none", | ||
"fill-rule": "evenodd" | ||
fillRule: "evenodd" | ||
}, h("rect", { | ||
class: "uppy-ProviderIconBg", | ||
className: "uppy-ProviderIconBg", | ||
fill: "#FF753E", | ||
@@ -45,3 +47,3 @@ width: "32", | ||
fill: "#FFF", | ||
"fill-rule": "nonzero" | ||
fillRule: "nonzero" | ||
}))); | ||
@@ -255,2 +257,2 @@ } | ||
return Url; | ||
}(Plugin), _class.VERSION = "1.5.19", _temp); | ||
}(Plugin), _class.VERSION = "1.5.20", _temp); |
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var _require = require('preact'), | ||
@@ -41,9 +43,9 @@ h = _require.h, | ||
return h("div", { | ||
class: "uppy-Url" | ||
className: "uppy-Url" | ||
}, h("input", { | ||
class: "uppy-u-reset uppy-c-textInput uppy-Url-input", | ||
className: "uppy-u-reset uppy-c-textInput uppy-Url-input", | ||
type: "text", | ||
"aria-label": this.props.i18n('enterUrlToImport'), | ||
placeholder: this.props.i18n('enterUrlToImport'), | ||
onkeyup: this.handleKeyPress, | ||
onKeyUp: this.handleKeyPress, | ||
ref: function ref(input) { | ||
@@ -54,5 +56,5 @@ _this2.input = input; | ||
}), h("button", { | ||
class: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton", | ||
className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton", | ||
type: "button", | ||
onclick: this.handleClick | ||
onClick: this.handleClick | ||
}, this.props.i18n('import'))); | ||
@@ -59,0 +61,0 @@ }; |
@@ -73,8 +73,7 @@ var toArray = require('@uppy/utils/lib/toArray'); | ||
return; | ||
} else { | ||
urlItems = items.filter(function (item) { | ||
return item.kind === 'string' && item.type === 'text/plain'; | ||
}); | ||
} | ||
urlItems = items.filter(function (item) { | ||
return item.kind === 'string' && item.type === 'text/plain'; | ||
}); | ||
break; | ||
@@ -81,0 +80,0 @@ } |
{ | ||
"name": "@uppy/url", | ||
"description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", | ||
"version": "1.5.19", | ||
"version": "1.5.20", | ||
"license": "MIT", | ||
@@ -25,4 +25,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/companion-client": "^1.8.3", | ||
"@uppy/utils": "^3.4.2", | ||
"@uppy/companion-client": "^1.9.0", | ||
"@uppy/utils": "^3.5.0", | ||
"preact": "8.2.9" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "4bf107236340dc98f8584f15a06e13ffa9fc31f4" | ||
"gitHead": "6771545fe70134088a5441ef5c2f7b872e32d812" | ||
} |
@@ -11,5 +11,5 @@ const { Plugin } = require('@uppy/core') | ||
<svg aria-hidden="true" focusable="false" width="32" height="32" viewBox="0 0 32 32"> | ||
<g fill="none" fill-rule="evenodd"> | ||
<rect class="uppy-ProviderIconBg" fill="#FF753E" width="32" height="32" rx="16" /> | ||
<path d="M22.788 15.389l-2.199 2.19a3.184 3.184 0 0 1-.513.437c-.806.584-1.686.876-2.638.876a4.378 4.378 0 0 1-3.519-1.752c-.22-.292-.146-.802.147-1.021.293-.22.806-.146 1.026.146.953 1.313 2.785 1.532 4.105.583a.571.571 0 0 0 .293-.292l2.199-2.189c1.1-1.167 1.1-2.992-.073-4.086a2.976 2.976 0 0 0-4.105 0l-1.246 1.24a.71.71 0 0 1-1.026 0 .703.703 0 0 1 0-1.022l1.246-1.24a4.305 4.305 0 0 1 6.083 0c1.833 1.605 1.906 4.451.22 6.13zm-7.183 5.035l-1.246 1.24a2.976 2.976 0 0 1-4.105 0c-1.172-1.094-1.172-2.991-.073-4.086l2.2-2.19.292-.291c.66-.438 1.393-.657 2.2-.584.805.146 1.465.51 1.905 1.168.22.292.733.365 1.026.146.293-.22.367-.73.147-1.022-.733-.949-1.76-1.532-2.859-1.678-1.1-.22-2.272.073-3.225.802l-.44.438-2.199 2.19c-1.686 1.75-1.612 4.524.074 6.202.88.803 1.979 1.241 3.078 1.241 1.1 0 2.199-.438 3.079-1.24l1.246-1.241a.703.703 0 0 0 0-1.022c-.294-.292-.807-.365-1.1-.073z" fill="#FFF" fill-rule="nonzero" /> | ||
<g fill="none" fillRule="evenodd"> | ||
<rect className="uppy-ProviderIconBg" fill="#FF753E" width="32" height="32" rx="16" /> | ||
<path d="M22.788 15.389l-2.199 2.19a3.184 3.184 0 0 1-.513.437c-.806.584-1.686.876-2.638.876a4.378 4.378 0 0 1-3.519-1.752c-.22-.292-.146-.802.147-1.021.293-.22.806-.146 1.026.146.953 1.313 2.785 1.532 4.105.583a.571.571 0 0 0 .293-.292l2.199-2.189c1.1-1.167 1.1-2.992-.073-4.086a2.976 2.976 0 0 0-4.105 0l-1.246 1.24a.71.71 0 0 1-1.026 0 .703.703 0 0 1 0-1.022l1.246-1.24a4.305 4.305 0 0 1 6.083 0c1.833 1.605 1.906 4.451.22 6.13zm-7.183 5.035l-1.246 1.24a2.976 2.976 0 0 1-4.105 0c-1.172-1.094-1.172-2.991-.073-4.086l2.2-2.19.292-.291c.66-.438 1.393-.657 2.2-.584.805.146 1.465.51 1.905 1.168.22.292.733.365 1.026.146.293-.22.367-.73.147-1.022-.733-.949-1.76-1.532-2.859-1.678-1.1-.22-2.272.073-3.225.802l-.44.438-2.199 2.19c-1.686 1.75-1.612 4.524.074 6.202.88.803 1.979 1.241 3.078 1.241 1.1 0 2.199-.438 3.079-1.24l1.246-1.241a.703.703 0 0 0 0-1.022c-.294-.292-.807-.365-1.1-.073z" fill="#FFF" fillRule="nonzero" /> | ||
</g> | ||
@@ -40,4 +40,4 @@ </svg> | ||
failedToFetch: 'Companion failed to fetch this URL, please make sure it’s correct', | ||
enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file' | ||
} | ||
enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file', | ||
}, | ||
} | ||
@@ -65,3 +65,3 @@ | ||
companionUrl: this.opts.companionUrl, | ||
companionHeaders: this.opts.companionHeaders || this.opts.serverHeaders | ||
companionHeaders: this.opts.companionHeaders || this.opts.serverHeaders, | ||
}) | ||
@@ -134,7 +134,7 @@ } | ||
data: { | ||
size: meta.size | ||
size: meta.size, | ||
}, | ||
isRemote: true, | ||
body: { | ||
url: url | ||
url, | ||
}, | ||
@@ -146,6 +146,6 @@ remote: { | ||
fileId: url, | ||
url: url | ||
url, | ||
}, | ||
providerOptions: this.client.opts | ||
} | ||
providerOptions: this.client.opts, | ||
}, | ||
} | ||
@@ -168,3 +168,3 @@ return tagFile | ||
message: this.i18n('failedToFetch'), | ||
details: err | ||
details: err, | ||
}, 'error', 4000) | ||
@@ -171,0 +171,0 @@ }) |
@@ -26,9 +26,9 @@ const { h, Component } = require('preact') | ||
return ( | ||
<div class="uppy-Url"> | ||
<div className="uppy-Url"> | ||
<input | ||
class="uppy-u-reset uppy-c-textInput uppy-Url-input" | ||
className="uppy-u-reset uppy-c-textInput uppy-Url-input" | ||
type="text" | ||
aria-label={this.props.i18n('enterUrlToImport')} | ||
placeholder={this.props.i18n('enterUrlToImport')} | ||
onkeyup={this.handleKeyPress} | ||
onKeyUp={this.handleKeyPress} | ||
ref={(input) => { this.input = input }} | ||
@@ -38,5 +38,5 @@ data-uppy-super-focusable | ||
<button | ||
class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" | ||
className="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" | ||
type="button" | ||
onclick={this.handleClick} | ||
onClick={this.handleClick} | ||
> | ||
@@ -43,0 +43,0 @@ {this.props.i18n('import')} |
@@ -69,8 +69,7 @@ const toArray = require('@uppy/utils/lib/toArray') | ||
return | ||
} else { | ||
urlItems = items.filter((item) => | ||
item.kind === 'string' && | ||
item.type === 'text/plain' | ||
) | ||
} | ||
urlItems = items.filter((item) => | ||
item.kind === 'string' | ||
&& item.type === 'text/plain') | ||
break | ||
@@ -80,5 +79,4 @@ } | ||
urlItems = items.filter((item) => | ||
item.kind === 'string' && | ||
item.type === 'text/uri-list' | ||
) | ||
item.kind === 'string' | ||
&& item.type === 'text/uri-list') | ||
break | ||
@@ -93,5 +91,4 @@ } | ||
item.getAsString((urlString) => | ||
callback(urlString) | ||
) | ||
callback(urlString)) | ||
}) | ||
} |
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
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
50493
678
Updated@uppy/utils@^3.5.0