Socket
Socket
Sign inDemoInstall

@uppy/provider-views

Package Overview
Dependencies
Maintainers
8
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 2.1.1 to 3.0.0-beta

16

lib/Breadcrumbs.js

@@ -1,5 +0,3 @@

"use strict";
import { h, Fragment } from 'preact';
var _preact = require("preact");
const Breadcrumb = props => {

@@ -11,3 +9,3 @@ const {

} = props;
return (0, _preact.h)(_preact.Fragment, null, (0, _preact.h)("button", {
return h(Fragment, null, h("button", {
type: "button",

@@ -19,3 +17,3 @@ className: "uppy-u-reset",

module.exports = props => {
export default (props => {
const {

@@ -27,7 +25,7 @@ getFolder,

} = props;
return (0, _preact.h)("div", {
return h("div", {
className: "uppy-Provider-breadcrumbs"
}, (0, _preact.h)("div", {
}, h("div", {
className: "uppy-Provider-breadcrumbsIcon"
}, breadcrumbsIcon), directories.map((directory, i) => (0, _preact.h)(Breadcrumb, {
}, breadcrumbsIcon), directories.map((directory, i) => h(Breadcrumb, {
key: directory.id,

@@ -38,2 +36,2 @@ getFolder: () => getFolder(directory.id),

})));
};
});

@@ -1,15 +0,7 @@

"use strict";
var _preact = require("preact");
const classNames = require("classnames");
const remoteFileObjToLocal = require("@uppy/utils/lib/remoteFileObjToLocal");
const Filter = require("./Filter.js");
const FooterActions = require("./FooterActions.js");
const Item = require("./Item/index.js");
import { h } from 'preact';
import classNames from 'classnames';
import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal';
import Filter from "./Filter.js";
import FooterActions from "./FooterActions.js";
import Item from "./Item/index.js";
const VIRTUAL_SHARED_DIR = 'shared-with-me';

@@ -42,9 +34,9 @@

const selected = currentSelection.length;
return (0, _preact.h)("div", {
return h("div", {
className: classNames('uppy-ProviderBrowser', `uppy-ProviderBrowser-viewType--${viewType}`)
}, (0, _preact.h)("div", {
}, h("div", {
className: "uppy-ProviderBrowser-header"
}, (0, _preact.h)("div", {
}, h("div", {
className: classNames('uppy-ProviderBrowser-headerBar', !showBreadcrumbs && 'uppy-ProviderBrowser-headerBar--simple')
}, headerComponent)), showFilter && (0, _preact.h)(Filter, {
}, headerComponent)), showFilter && h(Filter, {
i18n: i18n,

@@ -55,3 +47,3 @@ filterQuery: filterQuery,

if (!folders.length && !files.length) {
return (0, _preact.h)("div", {
return h("div", {
className: "uppy-Provider-empty"

@@ -61,5 +53,5 @@ }, i18n('noFilesFound'));

return (0, _preact.h)("div", {
return h("div", {
className: "uppy-ProviderBrowser-body"
}, (0, _preact.h)("ul", {
}, h("ul", {
className: "uppy-ProviderBrowser-list",

@@ -108,3 +100,3 @@ onScroll: handleScroll,

})));
})(), selected > 0 && (0, _preact.h)(FooterActions, {
})(), selected > 0 && h(FooterActions, {
selected: selected,

@@ -117,2 +109,2 @@ done: done,

module.exports = Browser;
export default Browser;

@@ -1,6 +0,3 @@

"use strict";
var _preact = require("preact");
class CloseWrapper extends _preact.Component {
import { Component, toChildArray } from 'preact';
export default class CloseWrapper extends Component {
componentWillUnmount() {

@@ -17,7 +14,5 @@ const {

} = this.props;
return (0, _preact.toChildArray)(children)[0];
return toChildArray(children)[0];
}
}
module.exports = CloseWrapper;
}

@@ -1,6 +0,3 @@

"use strict";
var _preact = require("preact");
class Filter extends _preact.Component {
import { h, Component } from 'preact';
export default class Filter extends Component {
constructor(props) {

@@ -25,5 +22,5 @@ super(props);

} = this.props;
return (0, _preact.h)("div", {
return h("div", {
className: "uppy-ProviderBrowser-filter"
}, (0, _preact.h)("input", {
}, h("input", {
className: "uppy-u-reset uppy-ProviderBrowser-filterInput",

@@ -38,3 +35,3 @@ type: "text",

value: filterInput
}), (0, _preact.h)("svg", {
}), h("svg", {
"aria-hidden": "true",

@@ -46,5 +43,5 @@ focusable: "false",

viewBox: "0 0 12 12"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"
})), filterInput && (0, _preact.h)("button", {
})), filterInput && h("button", {
className: "uppy-u-reset uppy-ProviderBrowser-filterClose",

@@ -55,3 +52,3 @@ type: "button",

onClick: filterQuery
}, (0, _preact.h)("svg", {
}, h("svg", {
"aria-hidden": "true",

@@ -61,3 +58,3 @@ focusable: "false",

viewBox: "0 0 19 19"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"

@@ -67,4 +64,2 @@ }))));

}
module.exports = Filter;
}

@@ -1,6 +0,3 @@

"use strict";
var _preact = require("preact");
module.exports = _ref => {
import { h } from 'preact';
export default (_ref => {
let {

@@ -12,5 +9,5 @@ cancel,

} = _ref;
return (0, _preact.h)("div", {
return h("div", {
className: "uppy-ProviderBrowser-footer"
}, (0, _preact.h)("button", {
}, h("button", {
className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary",

@@ -21,3 +18,3 @@ onClick: done,

smart_count: selected
})), (0, _preact.h)("button", {
})), h("button", {
className: "uppy-u-reset uppy-c-btn uppy-c-btn-link",

@@ -27,2 +24,2 @@ onClick: cancel,

}, i18n('cancel')));
};
});

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

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SearchProviderViews = exports.ProviderViews = void 0;
const _0 = require("./ProviderView/index.js");
exports.ProviderViews = _0;
const _1 = require("./SearchProviderView/index.js");
exports.SearchProviderViews = _1;
export { default as ProviderViews } from './ProviderView/index.js';
export { default as SearchProviderViews } from './SearchProviderView/index.js';

@@ -1,5 +0,3 @@

"use strict";
import { h } from 'preact';
var _preact = require("preact");
function GridListItem(props) {

@@ -19,6 +17,6 @@ const {

} = props;
return (0, _preact.h)("li", {
return h("li", {
className: className,
title: isDisabled ? restrictionReason : null
}, (0, _preact.h)("input", {
}, h("input", {
type: "checkbox",

@@ -33,7 +31,7 @@ className: `uppy-u-reset uppy-ProviderBrowserItem-checkbox ${isChecked ? 'uppy-ProviderBrowserItem-checkbox--is-checked' : ''} uppy-ProviderBrowserItem-checkbox--grid`,

"data-uppy-super-focusable": true
}), (0, _preact.h)("label", {
}), h("label", {
htmlFor: id,
"aria-label": title,
className: "uppy-u-reset uppy-ProviderBrowserItem-inner"
}, (0, _preact.h)("span", {
}, h("span", {
className: "uppy-ProviderBrowserItem-inner-relative"

@@ -43,2 +41,2 @@ }, itemIconEl, showTitles && title, children)));

module.exports = GridListItem;
export default GridListItem;

@@ -1,7 +0,5 @@

"use strict";
import { h } from 'preact';
var _preact = require("preact");
function FileIcon() {
return (0, _preact.h)("svg", {
return h("svg", {
"aria-hidden": "true",

@@ -13,3 +11,3 @@ focusable: "false",

viewBox: "0 0 44 58"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"

@@ -20,3 +18,3 @@ }));

function FolderIcon() {
return (0, _preact.h)("svg", {
return h("svg", {
"aria-hidden": "true",

@@ -30,3 +28,3 @@ focusable: "false",

viewBox: "0 0 276.157 276.157"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"

@@ -37,3 +35,3 @@ }));

function VideoIcon() {
return (0, _preact.h)("svg", {
return h("svg", {
"aria-hidden": "true",

@@ -46,5 +44,5 @@ focusable: "false",

viewBox: "0 0 58 58"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"

@@ -54,3 +52,3 @@ }));

module.exports = props => {
export default (props => {
const {

@@ -63,9 +61,9 @@ itemIconString

case 'file':
return (0, _preact.h)(FileIcon, null);
return h(FileIcon, null);
case 'folder':
return (0, _preact.h)(FolderIcon, null);
return h(FolderIcon, null);
case 'video':
return (0, _preact.h)(VideoIcon, null);
return h(VideoIcon, null);

@@ -77,3 +75,3 @@ default:

} = props;
return (0, _preact.h)("img", {
return h("img", {
src: itemIconString,

@@ -84,2 +82,2 @@ alt: alt

}
};
});

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

"use strict";
var _preact = require("preact");
// if folder:
import { h } from 'preact'; // if folder:
// + checkbox (selects all files from folder)

@@ -11,2 +7,3 @@ // + folder name (opens folder)

// + file name (selects file)
function ListItem(props) {

@@ -29,6 +26,6 @@ const {

} = props;
return (0, _preact.h)("li", {
return h("li", {
className: className,
title: isDisabled ? restrictionReason : null
}, !isCheckboxDisabled ? (0, _preact.h)("input", {
}, !isCheckboxDisabled ? h("input", {
type: "checkbox",

@@ -48,9 +45,9 @@ className: `uppy-u-reset uppy-ProviderBrowserItem-checkbox ${isChecked ? 'uppy-ProviderBrowserItem-checkbox--is-checked' : ''}`,

}) : null, type === 'file' ? // label for a checkbox
(0, _preact.h)("label", {
h("label", {
htmlFor: id,
className: "uppy-u-reset uppy-ProviderBrowserItem-inner"
}, (0, _preact.h)("div", {
}, h("div", {
className: "uppy-ProviderBrowserItem-iconWrap"
}, itemIconEl), showTitles && title) : // button to open a folder
(0, _preact.h)("button", {
h("button", {
type: "button",

@@ -62,7 +59,7 @@ className: "uppy-u-reset uppy-ProviderBrowserItem-inner",

})
}, (0, _preact.h)("div", {
}, h("div", {
className: "uppy-ProviderBrowserItem-iconWrap"
}, itemIconEl), showTitles && (0, _preact.h)("span", null, title)));
}, itemIconEl), showTitles && h("span", null, title)));
}
module.exports = ListItem;
export default ListItem;

@@ -1,16 +0,9 @@

"use strict";
var _preact = require("preact");
function _extends() { _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; }; return _extends.apply(this, arguments); }
const classNames = require("classnames");
const ItemIcon = require("./components/ItemIcon.js");
const GridListItem = require("./components/GridLi.js");
const ListItem = require("./components/ListLi.js");
module.exports = props => {
import { h } from 'preact';
import classNames from 'classnames';
import ItemIcon from "./components/ItemIcon.js";
import GridListItem from "./components/GridLi.js";
import ListItem from "./components/ListLi.js";
export default (props => {
const {

@@ -31,3 +24,3 @@ author,

});
const itemIconEl = (0, _preact.h)(ItemIcon, {
const itemIconEl = h(ItemIcon, {
itemIconString: itemIconString

@@ -38,3 +31,3 @@ });

case 'grid':
return (0, _preact.h)(GridListItem // eslint-disable-next-line react/jsx-props-no-spreading
return h(GridListItem // eslint-disable-next-line react/jsx-props-no-spreading
, _extends({}, props, {

@@ -47,3 +40,3 @@ className: className,

return (// eslint-disable-next-line react/jsx-props-no-spreading
(0, _preact.h)(ListItem, _extends({}, props, {
h(ListItem, _extends({}, props, {
className: className,

@@ -56,6 +49,6 @@ itemIconEl: itemIconEl

return (// eslint-disable-next-line react/jsx-props-no-spreading
(0, _preact.h)(GridListItem, _extends({}, props, {
h(GridListItem, _extends({}, props, {
className: className,
itemIconEl: itemIconEl
}), (0, _preact.h)("a", {
}), h("a", {
href: `${author.url}?utm_source=Companion&utm_medium=referral`,

@@ -71,2 +64,2 @@ target: "_blank",

}
};
});

@@ -1,12 +0,9 @@

"use strict";
var _preact = require("preact");
module.exports = _ref => {
import { h } from 'preact';
export default (_ref => {
let {
i18n
} = _ref;
return (0, _preact.h)("div", {
return h("div", {
className: "uppy-Provider-loading"
}, (0, _preact.h)("span", null, i18n('loading')));
};
}, h("span", null, i18n('loading')));
});

@@ -1,7 +0,5 @@

"use strict";
import { h } from 'preact';
var _preact = require("preact");
function GoogleIcon() {
return (0, _preact.h)("svg", {
return h("svg", {
width: "26",

@@ -11,6 +9,6 @@ height: "26",

xmlns: "http://www.w3.org/2000/svg"
}, (0, _preact.h)("g", {
}, h("g", {
fill: "none",
"fill-rule": "evenodd"
}, (0, _preact.h)("circle", {
}, h("circle", {
fill: "#FFF",

@@ -20,19 +18,19 @@ cx: "13",

r: "13"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",
fill: "#4285F4",
"fill-rule": "nonzero"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",
fill: "#34A853",
"fill-rule": "nonzero"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",
fill: "#FBBC05",
"fill-rule": "nonzero"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",
fill: "#EA4335",
"fill-rule": "nonzero"
}), (0, _preact.h)("path", {
}), h("path", {
d: "M4 4h18v18H4z"

@@ -52,14 +50,14 @@ })));

const isGoogleDrive = pluginName === 'Google Drive';
const pluginNameComponent = (0, _preact.h)("span", {
const pluginNameComponent = h("span", {
className: "uppy-Provider-authTitleName"
}, pluginName, (0, _preact.h)("br", null));
return (0, _preact.h)("div", {
}, pluginName, h("br", null));
return h("div", {
className: "uppy-Provider-auth"
}, (0, _preact.h)("div", {
}, h("div", {
className: "uppy-Provider-authIcon"
}, pluginIcon()), (0, _preact.h)("div", {
}, pluginIcon()), h("div", {
className: "uppy-Provider-authTitle"
}, i18nArray('authenticateWithTitle', {
pluginName: pluginNameComponent
})), isGoogleDrive ? (0, _preact.h)("button", {
})), isGoogleDrive ? h("button", {
type: "button",

@@ -69,3 +67,3 @@ className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google",

"data-uppy-super-focusable": true
}, (0, _preact.h)(GoogleIcon, null), i18nArray('signInWithGoogle')) : (0, _preact.h)("button", {
}, h(GoogleIcon, null), i18nArray('signInWithGoogle')) : h("button", {
type: "button",

@@ -80,2 +78,2 @@ className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn",

module.exports = AuthView;
export default AuthView;

@@ -1,8 +0,4 @@

"use strict";
const User = require("./User.js");
const Breadcrumbs = require("../Breadcrumbs.js");
module.exports = props => {
import User from "./User.js";
import Breadcrumbs from "../Breadcrumbs.js";
export default (props => {
const components = [];

@@ -25,2 +21,2 @@

return components;
};
});

@@ -1,3 +0,1 @@

"use strict";
module.exports = require("./ProviderView.js");
export { default } from "./ProviderView.js";

@@ -1,5 +0,1 @@

"use strict";
var _preact = require("preact");
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }

@@ -11,16 +7,11 @@

const AuthView = require("./AuthView.js");
const Header = require("./Header.js");
const Browser = require("../Browser.js");
const LoaderView = require("../Loader.js");
const CloseWrapper = require("../CloseWrapper.js");
const View = require("../View.js");
import { h } from 'preact';
import AuthView from "./AuthView.js";
import Header from "./Header.js";
import Browser from "../Browser.js";
import LoaderView from "../Loader.js";
import CloseWrapper from '../CloseWrapper.js';
import View from '../View.js';
const packageJson = {
"version": "2.1.1"
"version": "3.0.0-beta"
};

@@ -56,3 +47,3 @@

class ProviderView extends View {
export default class ProviderView extends View {
/**

@@ -445,5 +436,5 @@ * @param {object} plugin instance of the plugin

if (loading) {
return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(LoaderView, {
}, h(LoaderView, {
i18n: this.plugin.uppy.i18n

@@ -454,5 +445,5 @@ }));

if (!authenticated) {
return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(AuthView, {
}, h(AuthView, {
pluginName: this.plugin.title,

@@ -466,5 +457,5 @@ pluginIcon: this.plugin.icon,

return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(Browser, browserProps));
}, h(Browser, browserProps));
}

@@ -489,3 +480,2 @@

ProviderView.VERSION = packageJson.version;
module.exports = ProviderView;
ProviderView.VERSION = packageJson.version;

@@ -1,6 +0,3 @@

"use strict";
var _preact = require("preact");
module.exports = _ref => {
import { h } from 'preact';
export default (_ref => {
let {

@@ -11,6 +8,6 @@ i18n,

} = _ref;
return [(0, _preact.h)("span", {
return [h("span", {
className: "uppy-ProviderBrowser-user",
key: "username"
}, username), (0, _preact.h)("button", {
}, username), h("button", {
type: "button",

@@ -21,2 +18,2 @@ onClick: logout,

}, i18n('logOut'))];
};
});

@@ -1,8 +0,4 @@

"use strict";
var _preact = require("preact");
import { h } from 'preact';
const SUBMIT_KEY = 13;
module.exports = props => {
export default (props => {
const {

@@ -22,5 +18,5 @@ searchTerm,

return (0, _preact.h)("div", {
return h("div", {
class: "uppy-ProviderBrowser-search"
}, (0, _preact.h)("input", {
}, h("input", {
class: "uppy-u-reset uppy-ProviderBrowser-searchInput",

@@ -33,3 +29,3 @@ type: "text",

"data-uppy-super-focusable": true
}), (0, _preact.h)("svg", {
}), h("svg", {
"aria-hidden": "true",

@@ -41,5 +37,5 @@ focusable: "false",

viewBox: "0 0 12 12"
}, (0, _preact.h)("path", {
}, h("path", {
d: "M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"
})));
};
});

@@ -1,3 +0,1 @@

"use strict";
module.exports = require("./SearchProviderView.js");
export { default } from "./SearchProviderView.js";

@@ -1,6 +0,3 @@

"use strict";
var _preact = require("preact");
module.exports = _ref => {
import { h } from 'preact';
export default (_ref => {
let {

@@ -24,5 +21,5 @@ i18n,

return (0, _preact.h)("div", {
return h("div", {
className: "uppy-SearchProvider"
}, (0, _preact.h)("input", {
}, h("input", {
className: "uppy-u-reset uppy-c-textInput uppy-SearchProvider-input",

@@ -37,3 +34,3 @@ type: "search",

"data-uppy-super-focusable": true
}), (0, _preact.h)("button", {
}), h("button", {
className: "uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-SearchProvider-searchButton",

@@ -43,2 +40,2 @@ type: "button",

}, i18n('searchImages')));
};
});

@@ -1,5 +0,1 @@

"use strict";
var _preact = require("preact");
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }

@@ -11,16 +7,11 @@

const SearchInput = require("./InputView.js");
const Browser = require("../Browser.js");
const LoaderView = require("../Loader.js");
const Header = require("./Header.js");
const CloseWrapper = require("../CloseWrapper.js");
const View = require("../View.js");
import { h } from 'preact';
import SearchInput from "./InputView.js";
import Browser from "../Browser.js";
import LoaderView from "../Loader.js";
import Header from "./Header.js";
import CloseWrapper from '../CloseWrapper.js';
import View from '../View.js';
const packageJson = {
"version": "2.1.1"
"version": "3.0.0-beta"
};

@@ -33,3 +24,3 @@ /**

class SearchProviderView extends View {
export default class SearchProviderView extends View {
/**

@@ -202,5 +193,5 @@ * @param {object} plugin instance of the plugin

if (loading) {
return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(LoaderView, {
}, h(LoaderView, {
i18n: this.plugin.uppy.i18n

@@ -211,5 +202,5 @@ }));

if (isInputMode) {
return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(SearchInput, {
}, h(SearchInput, {
search: this.search,

@@ -220,5 +211,5 @@ i18n: this.plugin.uppy.i18n

return (0, _preact.h)(CloseWrapper, {
return h(CloseWrapper, {
onUnmount: this.clearSelection
}, (0, _preact.h)(Browser, browserProps));
}, h(Browser, browserProps));
}

@@ -240,3 +231,2 @@

SearchProviderView.VERSION = packageJson.version;
module.exports = SearchProviderView;
SearchProviderView.VERSION = packageJson.version;

@@ -1,6 +0,3 @@

"use strict";
const remoteFileObjToLocal = require("@uppy/utils/lib/remoteFileObjToLocal");
class SharedHandler {
import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal';
export default class SharedHandler {
constructor(plugin) {

@@ -120,4 +117,2 @@ this.plugin = plugin;

}
module.exports = SharedHandler;
}

@@ -1,14 +0,8 @@

"use strict";
const getFileType = require("@uppy/utils/lib/getFileType");
const isPreviewSupported = require("@uppy/utils/lib/isPreviewSupported");
const generateFileID = require("@uppy/utils/lib/generateFileID"); // TODO: now that we have a shared `View` class,
import getFileType from '@uppy/utils/lib/getFileType';
import isPreviewSupported from '@uppy/utils/lib/isPreviewSupported';
import generateFileID from '@uppy/utils/lib/generateFileID'; // TODO: now that we have a shared `View` class,
// `SharedHandler` could be cleaned up and moved into here
const SharedHandler = require("./SharedHandler.js");
class View {
import SharedHandler from './SharedHandler.js';
export default class View {
constructor(plugin, opts) {

@@ -132,4 +126,2 @@ this.plugin = plugin;

}
module.exports = View;
}
{
"name": "@uppy/provider-views",
"description": "View library for Uppy remote provider plugins.",
"version": "2.1.1",
"version": "3.0.0-beta",
"license": "MIT",

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

"dependencies": {
"@uppy/utils": "^4.1.0",
"@uppy/utils": "^5.0.0-beta",
"classnames": "^2.2.6",

@@ -29,4 +29,5 @@ "preact": "^10.5.13"

"peerDependencies": {
"@uppy/core": "^2.3.0"
}
"@uppy/core": "^3.0.0-beta"
},
"stableVersion": "2.1.1"
}

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

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

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

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

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

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