@uppy/onedrive
Advanced tools
Comparing version 2.0.6 to 2.1.0
# @uppy/onedrive | ||
## 2.1.0 | ||
Released: 2022-05-14 | ||
Included in: Uppy v2.10.0 | ||
- @uppy/onedrive: refactor to ESM (Antoine du Hamel / #3694) | ||
## 2.0.6 | ||
@@ -4,0 +11,0 @@ |
@@ -1,92 +0,3 @@ | ||
var _class, _temp; | ||
"use strict"; | ||
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 OneDrive extends UIPlugin { | ||
constructor(uppy, opts) { | ||
super(uppy, opts); | ||
this.id = this.opts.id || 'OneDrive'; | ||
Provider.initPlugin(this, opts); | ||
this.title = this.opts.title || 'OneDrive'; | ||
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", | ||
width: "32", | ||
height: "32", | ||
rx: "16", | ||
fill: "#0262C0" | ||
}), h("g", { | ||
fill: "#FFF", | ||
fillRule: "nonzero" | ||
}, h("path", { | ||
d: "M24.157 22s1.492-.205 1.79-1.655a2.624 2.624 0 0 0 .03-.878c-.22-1.64-1.988-2.01-1.988-2.01s.307-1.765-1.312-2.69c-1.62-.925-3.1 0-3.1 0S18.711 13 16.366 13c-3.016 0-3.519 3.448-3.519 3.448S10 16.618 10 19.14c0 2.523 2.597 2.86 2.597 2.86h11.56z" | ||
}), h("path", { | ||
d: "M9.421 19.246c0-2.197 1.606-3.159 2.871-3.472.44-1.477 1.654-3.439 4.135-3.439H16.445c1.721 0 2.79.823 3.368 1.476a3.99 3.99 0 0 1 1.147-.171h.01l.03.002C21.017 13.5 20.691 10 16.757 10c-2.69 0-3.639 2.345-3.639 2.345s-1.95-1.482-3.955.567c-1.028 1.052-.79 2.669-.79 2.669S6 15.824 6 18.412C6 20.757 8.452 21 8.452 21h1.372a3.77 3.77 0 0 1-.403-1.754z" | ||
})))); | ||
this.provider = new Provider(uppy, { | ||
companionUrl: this.opts.companionUrl, | ||
companionHeaders: this.opts.companionHeaders, | ||
companionCookiesRule: this.opts.companionCookiesRule, | ||
provider: 'onedrive', | ||
pluginId: this.id | ||
}); | ||
this.defaultLocale = locale; | ||
this.i18nInit(); | ||
this.title = this.i18n('pluginNameOneDrive'); | ||
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.6", _temp); | ||
module.exports = require("./OneDrive.js"); |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
module.exports = { | ||
@@ -2,0 +4,0 @@ strings: { |
{ | ||
"name": "@uppy/onedrive", | ||
"description": "Import files from OneDrive, into Uppy.", | ||
"version": "2.0.6", | ||
"version": "2.1.0", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"types": "types/index.d.ts", | ||
"type": "module", | ||
"keywords": [ | ||
@@ -23,10 +24,10 @@ "file uploader", | ||
"dependencies": { | ||
"@uppy/companion-client": "^2.0.5", | ||
"@uppy/provider-views": "^2.0.7", | ||
"@uppy/utils": "^4.0.5", | ||
"@uppy/companion-client": "^2.1.0", | ||
"@uppy/provider-views": "^2.1.0", | ||
"@uppy/utils": "^4.0.7", | ||
"preact": "^10.5.13" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^2.1.5" | ||
"@uppy/core": "^2.2.0" | ||
} | ||
} |
@@ -1,71 +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 OneDrive extends UIPlugin { | ||
static VERSION = require('../package.json').version | ||
constructor (uppy, opts) { | ||
super(uppy, opts) | ||
this.id = this.opts.id || 'OneDrive' | ||
Provider.initPlugin(this, opts) | ||
this.title = this.opts.title || 'OneDrive' | ||
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" width="32" height="32" rx="16" fill="#0262C0" /> | ||
<g fill="#FFF" fillRule="nonzero"> | ||
<path d="M24.157 22s1.492-.205 1.79-1.655a2.624 2.624 0 0 0 .03-.878c-.22-1.64-1.988-2.01-1.988-2.01s.307-1.765-1.312-2.69c-1.62-.925-3.1 0-3.1 0S18.711 13 16.366 13c-3.016 0-3.519 3.448-3.519 3.448S10 16.618 10 19.14c0 2.523 2.597 2.86 2.597 2.86h11.56z" /> | ||
<path d="M9.421 19.246c0-2.197 1.606-3.159 2.871-3.472.44-1.477 1.654-3.439 4.135-3.439H16.445c1.721 0 2.79.823 3.368 1.476a3.99 3.99 0 0 1 1.147-.171h.01l.03.002C21.017 13.5 20.691 10 16.757 10c-2.69 0-3.639 2.345-3.639 2.345s-1.95-1.482-3.955.567c-1.028 1.052-.79 2.669-.79 2.669S6 15.824 6 18.412C6 20.757 8.452 21 8.452 21h1.372a3.77 3.77 0 0 1-.403-1.754z" /> | ||
</g> | ||
</g> | ||
</svg> | ||
) | ||
this.provider = new Provider(uppy, { | ||
companionUrl: this.opts.companionUrl, | ||
companionHeaders: this.opts.companionHeaders, | ||
companionCookiesRule: this.opts.companionCookiesRule, | ||
provider: 'onedrive', | ||
pluginId: this.id, | ||
}) | ||
this.defaultLocale = locale | ||
this.i18nInit() | ||
this.title = this.i18n('pluginNameOneDrive') | ||
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 './OneDrive.jsx' |
@@ -1,2 +0,2 @@ | ||
module.exports = { | ||
export default { | ||
strings: { | ||
@@ -3,0 +3,0 @@ pluginNameOneDrive: 'OneDrive', |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
15851
17
173
Yes
1
Updated@uppy/provider-views@^2.1.0
Updated@uppy/utils@^4.0.7