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.28.0 to 0.29.0

22

lib/index.js

@@ -63,3 +63,3 @@ 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.plugin = plugin;
this.Provider = plugin[plugin.id];
this.provider = opts.provider;

@@ -124,3 +124,3 @@ // set default options

this.plugin.setPluginState({ checkAuthInProgress: true });
this.Provider.checkAuth().then(function (authenticated) {
this.provider.checkAuth().then(function (authenticated) {
_this2.plugin.setPluginState({ checkAuthInProgress: false });

@@ -144,3 +144,3 @@ _this2.plugin.onAuth(authenticated);

return this._loaderWrapper(this.Provider.list(id), function (res) {
return this._loaderWrapper(this.provider.list(id), function (res) {
var folders = [];

@@ -193,7 +193,7 @@ var files = [];

serverUrl: this.plugin.opts.serverUrl,
url: '' + this.Provider.fileUrl(file.requestPath),
url: '' + this.provider.fileUrl(file.requestPath),
body: {
fileId: file.id
},
providerOptions: this.Provider.opts
providerOptions: this.provider.opts
}

@@ -234,3 +234,3 @@ };

this.Provider.logout(location.href).then(function (res) {
this.provider.logout(location.href).then(function (res) {
if (res.ok) {

@@ -396,3 +396,3 @@ var newState = {

this.plugin.setPluginState({ selectedFolders: folders });
return this.Provider.list(folder.requestPath).then(function (res) {
return this.provider.list(folder.requestPath).then(function (res) {
var files = [];

@@ -497,3 +497,3 @@ res.items.forEach(function (item) {

var authState = btoa(JSON.stringify({ origin: location.origin }));
var link = this.Provider.authUrl() + '?state=' + authState;
var link = this.provider.authUrl() + '?state=' + authState;

@@ -508,4 +508,4 @@ var authWindow = window.open(link, '_blank');

window.removeEventListener('message', handleToken);
_this6.Provider.setAuthToken(e.data.token);
_this6._loaderWrapper(_this6.Provider.checkAuth(), _this6.plugin.onAuth, _this6.handleError);
_this6.provider.setAuthToken(e.data.token);
_this6._loaderWrapper(_this6.provider.checkAuth(), _this6.plugin.onAuth, _this6.handleError);
};

@@ -546,3 +546,3 @@ window.addEventListener('message', handleToken);

if (scrollPos < 50 && path && !this._isHandlingScroll) {
this.Provider.list(path).then(function (res) {
this.provider.list(path).then(function (res) {
var _plugin$getPluginStat5 = _this7.plugin.getPluginState(),

@@ -549,0 +549,0 @@ files = _plugin$getPluginStat5.files,

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

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

"dependencies": {
"@uppy/utils": "0.28.0",
"@uppy/utils": "0.29.0",
"classnames": "^2.2.6",

@@ -29,8 +29,8 @@ "preact": "^8.2.9"

"devDependencies": {
"@uppy/core": "0.28.0"
"@uppy/core": "0.29.0"
},
"peerDependencies": {
"@uppy/core": "^0.28.0"
"@uppy/core": "^0.29.0"
},
"gitHead": "47a68a6148a41c7b8a1e10e78b6cd6794a53f7e5"
"gitHead": "c68f2c7e68d2c12f8a8fb7119f1dae4ca08e4174"
}

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

this.plugin = plugin
this.Provider = plugin[plugin.id]
this.provider = opts.provider

@@ -98,3 +98,3 @@ // set default options

this.plugin.setPluginState({ checkAuthInProgress: true })
this.Provider.checkAuth()
this.provider.checkAuth()
.then((authenticated) => {

@@ -117,3 +117,3 @@ this.plugin.setPluginState({ checkAuthInProgress: false })

return this._loaderWrapper(
this.Provider.list(id),
this.provider.list(id),
(res) => {

@@ -164,7 +164,7 @@ let folders = []

serverUrl: this.plugin.opts.serverUrl,
url: `${this.Provider.fileUrl(file.requestPath)}`,
url: `${this.provider.fileUrl(file.requestPath)}`,
body: {
fileId: file.id
},
providerOptions: this.Provider.opts
providerOptions: this.provider.opts
}

@@ -197,3 +197,3 @@ }

logout () {
this.Provider.logout(location.href)
this.provider.logout(location.href)
.then((res) => {

@@ -344,3 +344,3 @@ if (res.ok) {

this.plugin.setPluginState({selectedFolders: folders})
return this.Provider.list(folder.requestPath).then((res) => {
return this.provider.list(folder.requestPath).then((res) => {
let files = []

@@ -432,3 +432,3 @@ res.items.forEach((item) => {

const authState = btoa(JSON.stringify({ origin: location.origin }))
const link = `${this.Provider.authUrl()}?state=${authState}`
const link = `${this.provider.authUrl()}?state=${authState}`

@@ -443,4 +443,4 @@ const authWindow = window.open(link, '_blank')

window.removeEventListener('message', handleToken)
this.Provider.setAuthToken(e.data.token)
this._loaderWrapper(this.Provider.checkAuth(), this.plugin.onAuth, this.handleError)
this.provider.setAuthToken(e.data.token)
this._loaderWrapper(this.provider.checkAuth(), this.plugin.onAuth, this.handleError)
}

@@ -477,3 +477,3 @@ window.addEventListener('message', handleToken)

if (scrollPos < 50 && path && !this._isHandlingScroll) {
this.Provider.list(path)
this.provider.list(path)
.then((res) => {

@@ -480,0 +480,0 @@ const { files, folders } = this.plugin.getPluginState()

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