Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/dropbox

Package Overview
Dependencies
Maintainers
8
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/dropbox - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

lib/Dropbox.js

7

CHANGELOG.md
# @uppy/dropbox
## 2.0.6
Released: 2022-04-27
Included in: Uppy v2.9.4
- @uppy/dropbox: refactor to ESM (Antoine du Hamel / #3651)
## 2.0.5

@@ -4,0 +11,0 @@

91

lib/index.js
"use strict";
var _class, _temp;
const {
UIPlugin
} = require('@uppy/core');
const {
Provider
} = require('@uppy/companion-client');
const {
ProviderViews
} = require('@uppy/provider-views');
const {
h
} = require('preact');
const locale = require('./locale');
module.exports = (_temp = _class = class Dropbox extends UIPlugin {
constructor(uppy, opts) {
super(uppy, opts);
this.id = this.opts.id || 'Dropbox';
Provider.initPlugin(this, opts);
this.title = this.opts.title || 'Dropbox';
this.icon = () => h("svg", {
"aria-hidden": "true",
focusable: "false",
width: "32",
height: "32",
viewBox: "0 0 32 32"
}, h("g", {
fill: "none",
fillRule: "evenodd"
}, h("rect", {
className: "uppy-ProviderIconBg",
fill: "#0D2481",
width: "32",
height: "32",
rx: "16"
}), h("path", {
d: "M11 8l5 3.185-5 3.186-5-3.186L11 8zm10 0l5 3.185-5 3.186-5-3.186L21 8zM6 17.556l5-3.185 5 3.185-5 3.186-5-3.186zm15-3.185l5 3.185-5 3.186-5-3.186 5-3.185zm-10 7.432l5-3.185 5 3.185-5 3.186-5-3.186z",
fill: "#FFF",
fillRule: "nonzero"
})));
this.provider = new Provider(uppy, {
companionUrl: this.opts.companionUrl,
companionHeaders: this.opts.companionHeaders,
companionKeysParams: this.opts.companionKeysParams,
companionCookiesRule: this.opts.companionCookiesRule,
provider: 'dropbox',
pluginId: this.id
});
this.defaultLocale = locale;
this.i18nInit();
this.title = this.i18n('pluginNameDropbox');
this.onFirstRender = this.onFirstRender.bind(this);
this.render = this.render.bind(this);
}
install() {
this.view = new ProviderViews(this, {
provider: this.provider
});
const {
target
} = this.opts;
if (target) {
this.mount(target, this);
}
}
uninstall() {
this.view.tearDown();
this.unmount();
}
onFirstRender() {
return Promise.all([this.provider.fetchPreAuthToken(), this.view.getFolder()]);
}
render(state) {
return this.view.render(state);
}
}, _class.VERSION = "2.0.5", _temp);
module.exports = require("./Dropbox.js");
{
"name": "@uppy/dropbox",
"description": "Import files from Dropbox, into Uppy.",
"version": "2.0.5",
"version": "2.0.6",
"license": "MIT",
"main": "lib/index.js",
"type": "module",
"types": "types/index.d.ts",

@@ -23,10 +24,10 @@ "keywords": [

"dependencies": {
"@uppy/companion-client": "^2.0.4",
"@uppy/provider-views": "^2.0.6",
"@uppy/utils": "^4.0.4",
"@uppy/companion-client": "^2.0.6",
"@uppy/provider-views": "^2.0.8",
"@uppy/utils": "^4.0.7",
"preact": "^10.5.13"
},
"peerDependencies": {
"@uppy/core": "^2.1.3"
"@uppy/core": "^2.1.9"
}
}

@@ -1,69 +0,1 @@

const { UIPlugin } = require('@uppy/core')
const { Provider } = require('@uppy/companion-client')
const { ProviderViews } = require('@uppy/provider-views')
const { h } = require('preact')
const locale = require('./locale')
module.exports = class Dropbox extends UIPlugin {
static VERSION = require('../package.json').version
constructor (uppy, opts) {
super(uppy, opts)
this.id = this.opts.id || 'Dropbox'
Provider.initPlugin(this, opts)
this.title = this.opts.title || 'Dropbox'
this.icon = () => (
<svg aria-hidden="true" focusable="false" width="32" height="32" viewBox="0 0 32 32">
<g fill="none" fillRule="evenodd">
<rect className="uppy-ProviderIconBg" fill="#0D2481" width="32" height="32" rx="16" />
<path d="M11 8l5 3.185-5 3.186-5-3.186L11 8zm10 0l5 3.185-5 3.186-5-3.186L21 8zM6 17.556l5-3.185 5 3.185-5 3.186-5-3.186zm15-3.185l5 3.185-5 3.186-5-3.186 5-3.185zm-10 7.432l5-3.185 5 3.185-5 3.186-5-3.186z" fill="#FFF" fillRule="nonzero" />
</g>
</svg>
)
this.provider = new Provider(uppy, {
companionUrl: this.opts.companionUrl,
companionHeaders: this.opts.companionHeaders,
companionKeysParams: this.opts.companionKeysParams,
companionCookiesRule: this.opts.companionCookiesRule,
provider: 'dropbox',
pluginId: this.id,
})
this.defaultLocale = locale
this.i18nInit()
this.title = this.i18n('pluginNameDropbox')
this.onFirstRender = this.onFirstRender.bind(this)
this.render = this.render.bind(this)
}
install () {
this.view = new ProviderViews(this, {
provider: this.provider,
})
const { target } = this.opts
if (target) {
this.mount(target, this)
}
}
uninstall () {
this.view.tearDown()
this.unmount()
}
onFirstRender () {
return Promise.all([
this.provider.fetchPreAuthToken(),
this.view.getFolder(),
])
}
render (state) {
return this.view.render(state)
}
}
export { default } from './Dropbox.jsx'

@@ -1,2 +0,2 @@

module.exports = {
export default {
strings: {

@@ -3,0 +3,0 @@ pluginNameDropbox: 'Dropbox',

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