Socket
Socket
Sign inDemoInstall

@uppy/provider-views

Package Overview
Dependencies
Maintainers
5
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 0.30.5 to 1.0.0

25

lib/AuthView.js

@@ -32,2 +32,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var pluginNameComponent = h(
"span",
{ "class": "uppy-Provider-authTitleName" },
this.props.pluginName,
h("br", null)
);
return h(

@@ -42,12 +48,5 @@ "div",

h(
"h1",
"div",
{ "class": "uppy-Provider-authTitle" },
"Please authenticate with ",
h(
"span",
{ "class": "uppy-Provider-authTitleName" },
this.props.pluginName
),
h("br", null),
" to select files"
this.props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })
),

@@ -64,9 +63,3 @@ h(

},
"Connect to ",
this.props.pluginName
),
this.props.demo && h(
"button",
{ "class": "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn", onclick: this.props.handleDemoAuth },
"Proceed with Demo Account"
this.props.i18nArray('authenticateWith', { pluginName: this.props.pluginName })
)

@@ -73,0 +66,0 @@ );

@@ -85,3 +85,2 @@ 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; };

this.handleAuth = this.handleAuth.bind(this);
this.handleDemoAuth = this.handleDemoAuth.bind(this);
this.sortByTitle = this.sortByTitle.bind(this);

@@ -479,9 +478,2 @@ this.sortByDate = this.sortByDate.bind(this);

ProviderView.prototype.handleDemoAuth = function handleDemoAuth() {
var state = this.plugin.getPluginState();
this.plugin.setPluginState({}, state, {
authenticated: true
});
};
ProviderView.prototype.handleAuth = function handleAuth() {

@@ -527,3 +519,6 @@ var _this5 = this;

uppy.log(error.toString());
var message = uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError');
if (error.isAuthError) {
return;
}
var message = uppy.i18n('companionError');
uppy.info({ message: message, details: error.toString() }, 'error', 5000);

@@ -625,5 +620,5 @@ };

pluginIcon: this.plugin.icon,
demo: this.plugin.opts.demo,
handleAuth: this.handleAuth,
handleDemoAuth: this.handleDemoAuth })
i18n: this.plugin.uppy.i18n,
i18nArray: this.plugin.uppy.i18nArray })
);

@@ -642,3 +637,2 @@ }

logout: this.logout,
demo: this.plugin.opts.demo,
isActiveRow: this.isActiveRow,

@@ -645,0 +639,0 @@ isChecked: this.isChecked,

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

@@ -27,8 +27,8 @@ "main": "lib/index.js",

"devDependencies": {
"@uppy/core": "0.30.5"
"@uppy/core": "1.0.0"
},
"peerDependencies": {
"@uppy/core": "^0.30.0"
"@uppy/core": "^1.0.0"
},
"gitHead": "0f95529cc56175c017e149dd3a122a3bcf9325b7"
"gitHead": "25d4b3678b9bebb2127798b9185a0b2083a9dac1"
}

@@ -12,5 +12,10 @@ const { h, Component } = require('preact')

render () {
const pluginNameComponent = (
<span class="uppy-Provider-authTitleName">{this.props.pluginName}<br /></span>
)
return <div class="uppy-Provider-auth">
<div class="uppy-Provider-authIcon">{this.props.pluginIcon()}</div>
<h1 class="uppy-Provider-authTitle">Please authenticate with <span class="uppy-Provider-authTitleName">{this.props.pluginName}</span><br /> to select files</h1>
<div class="uppy-Provider-authTitle">
{this.props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })}
</div>
<button

@@ -22,7 +27,4 @@ type="button"

>
Connect to {this.props.pluginName}
{this.props.i18nArray('authenticateWith', { pluginName: this.props.pluginName })}
</button>
{this.props.demo &&
<button class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn" onclick={this.props.handleDemoAuth}>Proceed with Demo Account</button>
}
</div>

@@ -29,0 +31,0 @@ }

@@ -61,3 +61,2 @@ const { h, Component } = require('preact')

this.handleAuth = this.handleAuth.bind(this)
this.handleDemoAuth = this.handleDemoAuth.bind(this)
this.sortByTitle = this.sortByTitle.bind(this)

@@ -414,9 +413,2 @@ this.sortByDate = this.sortByDate.bind(this)

handleDemoAuth () {
const state = this.plugin.getPluginState()
this.plugin.setPluginState({}, state, {
authenticated: true
})
}
handleAuth () {

@@ -458,3 +450,6 @@ const authState = btoa(JSON.stringify({ origin: location.origin }))

uppy.log(error.toString())
const message = uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')
if (error.isAuthError) {
return
}
const message = uppy.i18n('companionError')
uppy.info({message: message, details: error.toString()}, 'error', 5000)

@@ -540,5 +535,5 @@ }

pluginIcon={this.plugin.icon}
demo={this.plugin.opts.demo}
handleAuth={this.handleAuth}
handleDemoAuth={this.handleDemoAuth} />
i18n={this.plugin.uppy.i18n}
i18nArray={this.plugin.uppy.i18nArray} />
</CloseWrapper>

@@ -558,3 +553,2 @@ )

logout: this.logout,
demo: this.plugin.opts.demo,
isActiveRow: this.isActiveRow,

@@ -561,0 +555,0 @@ isChecked: this.isChecked,

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