@uppy/provider-views
Advanced tools
Comparing version 1.4.0 to 1.5.0
var _require = require('preact'), | ||
h = _require.h; // TODO use Fragment when upgrading to preact X | ||
/* eslint-disable react/jsx-key */ | ||
var Breadcrumb = function Breadcrumb(props) { | ||
return [h("button", { | ||
return h("span", null, h("button", { | ||
type: "button", | ||
class: "uppy-u-reset", | ||
onclick: props.getFolder | ||
}, props.title), !props.isLast ? ' / ' : '']; | ||
}, props.title), !props.isLast ? ' / ' : ''); | ||
}; | ||
/* eslint-enable react/jsx-key */ | ||
module.exports = function (props) { | ||
@@ -18,0 +14,0 @@ return h("div", { |
@@ -710,3 +710,7 @@ var _class, _temp; | ||
_proto2.render = function render(state) { | ||
_proto2.render = function render(state, viewOptions) { | ||
if (viewOptions === void 0) { | ||
viewOptions = {}; | ||
} | ||
var _this$plugin$getPlugi6 = this.plugin.getPluginState(), | ||
@@ -742,2 +746,4 @@ authenticated = _this$plugin$getPlugi6.authenticated, | ||
var targetViewOptions = _extends({}, this.opts, {}, viewOptions); | ||
var browserProps = _extends({}, this.plugin.getPluginState(), { | ||
@@ -761,6 +767,6 @@ username: this.username, | ||
title: this.plugin.title, | ||
viewType: this.opts.viewType, | ||
showTitles: this.opts.showTitles, | ||
showFilter: this.opts.showFilter, | ||
showBreadcrumbs: this.opts.showBreadcrumbs, | ||
viewType: targetViewOptions.viewType, | ||
showTitles: targetViewOptions.showTitles, | ||
showFilter: targetViewOptions.showFilter, | ||
showBreadcrumbs: targetViewOptions.showBreadcrumbs, | ||
pluginIcon: this.plugin.icon, | ||
@@ -776,2 +782,2 @@ i18n: this.plugin.uppy.i18n | ||
return ProviderView; | ||
}(), _class.VERSION = "1.4.0", _temp); | ||
}(), _class.VERSION = "1.5.0", _temp); |
{ | ||
"name": "@uppy/provider-views", | ||
"description": "View library for Uppy remote provider plugins.", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^2.0.0", | ||
"@uppy/utils": "^2.1.0", | ||
"classnames": "^2.2.6", | ||
@@ -30,3 +30,3 @@ "preact": "8.2.9" | ||
}, | ||
"gitHead": "4e32e61d7c7821ca5d8641a3df741487ea27f0bb" | ||
"gitHead": "c370dba0b6d48770995d0c764bb54f0b05309781" | ||
} |
const { h } = require('preact') | ||
// TODO use Fragment when upgrading to preact X | ||
/* eslint-disable react/jsx-key */ | ||
const Breadcrumb = (props) => [ | ||
<button | ||
type="button" | ||
class="uppy-u-reset" | ||
onclick={props.getFolder} | ||
> | ||
{props.title} | ||
</button>, | ||
!props.isLast ? ' / ' : '' | ||
] | ||
/* eslint-enable react/jsx-key */ | ||
const Breadcrumb = (props) => { | ||
return ( | ||
<span> | ||
<button | ||
type="button" | ||
class="uppy-u-reset" | ||
onclick={props.getFolder} | ||
> | ||
{props.title} | ||
</button> | ||
{!props.isLast ? ' / ' : ''} | ||
</span> | ||
) | ||
} | ||
@@ -17,0 +19,0 @@ module.exports = (props) => { |
@@ -566,3 +566,3 @@ const { h, Component } = require('preact') | ||
render (state) { | ||
render (state, viewOptions = {}) { | ||
const { authenticated, didFirstRender } = this.plugin.getPluginState() | ||
@@ -597,2 +597,3 @@ if (!didFirstRender) { | ||
const targetViewOptions = { ...this.opts, ...viewOptions } | ||
const browserProps = Object.assign({}, this.plugin.getPluginState(), { | ||
@@ -616,6 +617,6 @@ username: this.username, | ||
title: this.plugin.title, | ||
viewType: this.opts.viewType, | ||
showTitles: this.opts.showTitles, | ||
showFilter: this.opts.showFilter, | ||
showBreadcrumbs: this.opts.showBreadcrumbs, | ||
viewType: targetViewOptions.viewType, | ||
showTitles: targetViewOptions.showTitles, | ||
showFilter: targetViewOptions.showFilter, | ||
showBreadcrumbs: targetViewOptions.showBreadcrumbs, | ||
pluginIcon: this.plugin.icon, | ||
@@ -622,0 +623,0 @@ i18n: this.plugin.uppy.i18n |
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
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
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
103953
2345
Updated@uppy/utils@^2.1.0