Socket
Socket
Sign inDemoInstall

@uppy/provider-views

Package Overview
Dependencies
Maintainers
6
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/provider-views - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

63

lib/ProviderView/AuthView.js

@@ -7,6 +7,50 @@ "use strict";

function GoogleIcon() {
return h("svg", {
width: "26",
height: "26",
viewBox: "0 0 26 26",
xmlns: "http://www.w3.org/2000/svg"
}, h("g", {
fill: "none",
"fill-rule": "evenodd"
}, h("circle", {
fill: "#FFF",
cx: "13",
cy: "13",
r: "13"
}), h("path", {
d: "M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",
fill: "#4285F4",
"fill-rule": "nonzero"
}), h("path", {
d: "M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",
fill: "#34A853",
"fill-rule": "nonzero"
}), h("path", {
d: "M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",
fill: "#FBBC05",
"fill-rule": "nonzero"
}), h("path", {
d: "M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",
fill: "#EA4335",
"fill-rule": "nonzero"
}), h("path", {
d: "M4 4h18v18H4z"
})));
}
function AuthView(props) {
const {
pluginName,
pluginIcon,
i18nArray,
handleAuth
} = props; // In order to comply with Google's brand we need to create a different button
// for the Google Drive plugin
const isGoogleDrive = pluginName === 'Google Drive';
const pluginNameComponent = h("span", {
className: "uppy-Provider-authTitleName"
}, props.pluginName, h("br", null));
}, pluginName, h("br", null));
return h("div", {

@@ -16,13 +60,18 @@ className: "uppy-Provider-auth"

className: "uppy-Provider-authIcon"
}, props.pluginIcon()), h("div", {
}, pluginIcon()), h("div", {
className: "uppy-Provider-authTitle"
}, props.i18nArray('authenticateWithTitle', {
}, i18nArray('authenticateWithTitle', {
pluginName: pluginNameComponent
})), h("button", {
})), isGoogleDrive ? h("button", {
type: "button",
className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google",
onClick: handleAuth,
"data-uppy-super-focusable": true
}, h(GoogleIcon, null), i18nArray('signInWithGoogle')) : h("button", {
type: "button",
className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn",
onClick: props.handleAuth,
onClick: handleAuth,
"data-uppy-super-focusable": true
}, props.i18nArray('authenticateWith', {
pluginName: props.pluginName
}, i18nArray('authenticateWith', {
pluginName
})));

@@ -29,0 +78,0 @@ }

2

lib/ProviderView/ProviderView.js

@@ -521,3 +521,3 @@ "use strict";

}), _class.VERSION = "2.0.1", _temp);
}), _class.VERSION = "2.0.2", _temp);

@@ -524,0 +524,0 @@ function _updateFilesAndFolders2(res, files, folders) {

@@ -283,3 +283,3 @@ "use strict";

uppyFiles: this.plugin.uppy.getFiles(),
validateRestrictions: this.plugin.uppy.validateRestrictions
validateRestrictions: (...args) => this.plugin.uppy.validateRestrictions(...args)
};

@@ -291,3 +291,3 @@ return h(CloseWrapper, {

}), _class.VERSION = "2.0.1", _temp);
}), _class.VERSION = "2.0.2", _temp);

@@ -294,0 +294,0 @@ function _updateFilesAndInputMode2(res, files) {

{
"name": "@uppy/provider-views",
"description": "View library for Uppy remote provider plugins.",
"version": "2.0.1",
"version": "2.0.2",
"license": "MIT",

@@ -22,3 +22,3 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/utils": "^4.0.0",
"@uppy/utils": "^4.0.1",
"classnames": "^2.2.6",

@@ -30,3 +30,3 @@ "preact": "^10.5.13"

},
"gitHead": "d69043aacc2c9d31813e0fabc4b0ca3f4a760d2a"
"gitHead": "b3b68c07773395d1521c38148cbf87ed88ff2364"
}
const { h } = require('preact')
function GoogleIcon () {
return (
<svg
width="26"
height="26"
viewBox="0 0 26 26"
xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<circle fill="#FFF" cx="13" cy="13" r="13" />
<path
d="M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"
fill="#4285F4"
fill-rule="nonzero"
/>
<path
d="M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z"
fill="#34A853"
fill-rule="nonzero"
/>
<path
d="M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z"
fill="#FBBC05"
fill-rule="nonzero"
/>
<path
d="M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z"
fill="#EA4335"
fill-rule="nonzero"
/>
<path d="M4 4h18v18H4z" />
</g>
</svg>
)
}
function AuthView (props) {
const { pluginName, pluginIcon, i18nArray, handleAuth } = props
// In order to comply with Google's brand we need to create a different button
// for the Google Drive plugin
const isGoogleDrive = pluginName === 'Google Drive'
const pluginNameComponent = (
<span className="uppy-Provider-authTitleName">
{props.pluginName}
{pluginName}
<br />

@@ -12,14 +53,28 @@ </span>

<div className="uppy-Provider-auth">
<div className="uppy-Provider-authIcon">{props.pluginIcon()}</div>
<div className="uppy-Provider-authIcon">{pluginIcon()}</div>
<div className="uppy-Provider-authTitle">
{props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })}
{i18nArray('authenticateWithTitle', {
pluginName: pluginNameComponent,
})}
</div>
<button
type="button"
className="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn"
onClick={props.handleAuth}
data-uppy-super-focusable
>
{props.i18nArray('authenticateWith', { pluginName: props.pluginName })}
</button>
{isGoogleDrive ? (
<button
type="button"
className="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google"
onClick={handleAuth}
data-uppy-super-focusable
>
<GoogleIcon />
{i18nArray('signInWithGoogle')}
</button>
) : (
<button
type="button"
className="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn"
onClick={handleAuth}
data-uppy-super-focusable
>
{i18nArray('authenticateWith', { pluginName })}
</button>
)}
</div>

@@ -26,0 +81,0 @@ )

@@ -247,3 +247,3 @@ const { h } = require('preact')

uppyFiles: this.plugin.uppy.getFiles(),
validateRestrictions: this.plugin.uppy.validateRestrictions,
validateRestrictions: (...args) => this.plugin.uppy.validateRestrictions(...args),
}

@@ -250,0 +250,0 @@

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

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