@uppy/react
Advanced tools
Comparing version 1.11.10 to 1.12.0
@@ -13,2 +13,4 @@ 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); } | ||
var getHTMLProps = require('./getHTMLProps'); | ||
var h = React.createElement; | ||
@@ -23,4 +25,8 @@ /** | ||
function Dashboard() { | ||
return _React$Component.apply(this, arguments) || this; | ||
function Dashboard(props) { | ||
var _this; | ||
_this = _React$Component.call(this, props) || this; | ||
_this.validProps = getHTMLProps(props); | ||
return _this; | ||
} | ||
@@ -64,3 +70,4 @@ | ||
var uppy = props.uppy; | ||
var _props = props, | ||
uppy = _props.uppy; | ||
uppy.removePlugin(this.plugin); | ||
@@ -70,9 +77,9 @@ }; | ||
_proto.render = function render() { | ||
var _this = this; | ||
var _this2 = this; | ||
return h('div', { | ||
return h('div', _extends({ | ||
ref: function ref(container) { | ||
_this.container = container; | ||
_this2.container = container; | ||
} | ||
}); | ||
}, this.validProps)); | ||
}; | ||
@@ -79,0 +86,0 @@ |
@@ -15,2 +15,4 @@ 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); } | ||
var getHTMLProps = require('./getHTMLProps'); | ||
var h = React.createElement; | ||
@@ -25,4 +27,8 @@ /** | ||
function DashboardModal() { | ||
return _React$Component.apply(this, arguments) || this; | ||
function DashboardModal(props) { | ||
var _this; | ||
_this = _React$Component.call(this, props) || this; | ||
_this.validProps = getHTMLProps(props); | ||
return _this; | ||
} | ||
@@ -80,3 +86,4 @@ | ||
var uppy = props.uppy; | ||
var _props = props, | ||
uppy = _props.uppy; | ||
uppy.removePlugin(this.plugin); | ||
@@ -86,9 +93,9 @@ }; | ||
_proto.render = function render() { | ||
var _this = this; | ||
var _this2 = this; | ||
return h('div', { | ||
return h('div', _extends({ | ||
ref: function ref(container) { | ||
_this.container = container; | ||
_this2.container = container; | ||
} | ||
}); | ||
}, this.validProps)); | ||
}; | ||
@@ -95,0 +102,0 @@ |
@@ -13,2 +13,4 @@ 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); } | ||
var getHTMLProps = require('./getHTMLProps'); | ||
var h = React.createElement; | ||
@@ -23,4 +25,8 @@ /** | ||
function DragDrop() { | ||
return _React$Component.apply(this, arguments) || this; | ||
function DragDrop(props) { | ||
var _this; | ||
_this = _React$Component.call(this, props) || this; | ||
_this.validProps = getHTMLProps(props); | ||
return _this; | ||
} | ||
@@ -64,3 +70,4 @@ | ||
var uppy = props.uppy; | ||
var _props = props, | ||
uppy = _props.uppy; | ||
uppy.removePlugin(this.plugin); | ||
@@ -70,9 +77,9 @@ }; | ||
_proto.render = function render() { | ||
var _this = this; | ||
var _this2 = this; | ||
return h('div', { | ||
return h('div', _extends({ | ||
ref: function ref(container) { | ||
_this.container = container; | ||
_this2.container = container; | ||
} | ||
}); | ||
}, this.validProps)); | ||
}; | ||
@@ -79,0 +86,0 @@ |
@@ -15,2 +15,4 @@ 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); } | ||
var getHTMLProps = require('./getHTMLProps'); | ||
var h = React.createElement; | ||
@@ -24,4 +26,8 @@ /** | ||
function ProgressBar() { | ||
return _React$Component.apply(this, arguments) || this; | ||
function ProgressBar(props) { | ||
var _this; | ||
_this = _React$Component.call(this, props) || this; | ||
_this.validProps = getHTMLProps(props); | ||
return _this; | ||
} | ||
@@ -65,3 +71,4 @@ | ||
var uppy = props.uppy; | ||
var _props = props, | ||
uppy = _props.uppy; | ||
uppy.removePlugin(this.plugin); | ||
@@ -71,9 +78,9 @@ }; | ||
_proto.render = function render() { | ||
var _this = this; | ||
var _this2 = this; | ||
return h('div', { | ||
return h('div', _extends({ | ||
ref: function ref(container) { | ||
_this.container = container; | ||
_this2.container = container; | ||
} | ||
}); | ||
}, this.validProps)); | ||
}; | ||
@@ -80,0 +87,0 @@ |
@@ -15,2 +15,4 @@ 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); } | ||
var getHTMLProps = require('./getHTMLProps'); | ||
var h = React.createElement; | ||
@@ -25,4 +27,8 @@ /** | ||
function StatusBar() { | ||
return _React$Component.apply(this, arguments) || this; | ||
function StatusBar(props) { | ||
var _this; | ||
_this = _React$Component.call(this, props) || this; | ||
_this.validProps = getHTMLProps(props); | ||
return _this; | ||
} | ||
@@ -66,3 +72,4 @@ | ||
var uppy = props.uppy; | ||
var _props = props, | ||
uppy = _props.uppy; | ||
uppy.removePlugin(this.plugin); | ||
@@ -72,9 +79,9 @@ }; | ||
_proto.render = function render() { | ||
var _this = this; | ||
var _this2 = this; | ||
return h('div', { | ||
return h('div', _extends({ | ||
ref: function ref(container) { | ||
_this.container = container; | ||
_this2.container = container; | ||
} | ||
}); | ||
}, this.validProps)); | ||
}; | ||
@@ -81,0 +88,0 @@ |
{ | ||
"name": "@uppy/react", | ||
"description": "React component wrappers around Uppy's official UI plugins.", | ||
"version": "1.11.10", | ||
"version": "1.12.0", | ||
"license": "MIT", | ||
@@ -25,8 +25,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"@uppy/dashboard": "^1.20.1", | ||
"@uppy/drag-drop": "^1.4.29", | ||
"@uppy/file-input": "^1.5.1", | ||
"@uppy/progress-bar": "^1.3.29", | ||
"@uppy/status-bar": "^1.9.5", | ||
"@uppy/utils": "^3.6.1", | ||
"@uppy/dashboard": "^1.20.2", | ||
"@uppy/drag-drop": "^1.4.30", | ||
"@uppy/file-input": "^1.5.2", | ||
"@uppy/progress-bar": "^1.3.30", | ||
"@uppy/status-bar": "^1.9.6", | ||
"@uppy/utils": "^3.6.2", | ||
"prop-types": "^15.6.1" | ||
@@ -42,3 +42,3 @@ }, | ||
}, | ||
"gitHead": "23e4a537a6ab8e5062529de36ad3a91c8257de19" | ||
"gitHead": "4b782ffbbb443672843d7b4096956bed3b11d612" | ||
} |
@@ -9,3 +9,3 @@ import { Omit, ToUppyProps } from './CommonTypes' | ||
'animateOpenClose' | 'browserBackButtonClose' | 'inline' | 'onRequestCloseModal' | 'trigger' | ||
> | ||
> & React.BaseHTMLAttributes<HTMLDivElement> | ||
@@ -12,0 +12,0 @@ export type DashboardProps = { |
const React = require('react') | ||
const DashboardPlugin = require('@uppy/dashboard') | ||
const basePropTypes = require('./propTypes').dashboard | ||
const getHTMLProps = require('./getHTMLProps') | ||
@@ -13,2 +14,7 @@ const h = React.createElement | ||
class Dashboard extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.validProps = getHTMLProps(props) | ||
} | ||
componentDidMount () { | ||
@@ -30,3 +36,3 @@ this.installPlugin() | ||
installPlugin () { | ||
const uppy = this.props.uppy | ||
const { uppy } = this.props | ||
const options = { | ||
@@ -44,3 +50,3 @@ id: 'react:Dashboard', | ||
uninstallPlugin (props = this.props) { | ||
const uppy = props.uppy | ||
const { uppy } = props | ||
@@ -55,2 +61,3 @@ uppy.removePlugin(this.plugin) | ||
}, | ||
...this.validProps, | ||
}) | ||
@@ -57,0 +64,0 @@ } |
@@ -12,3 +12,3 @@ import { Omit, ToUppyProps } from './CommonTypes' | ||
'inline' | 'onRequestCloseModal' | ||
> | ||
> & React.BaseHTMLAttributes<HTMLDivElement> | ||
@@ -15,0 +15,0 @@ export type DashboardModalProps = { |
@@ -5,2 +5,3 @@ const React = require('react') | ||
const basePropTypes = require('./propTypes').dashboard | ||
const getHTMLProps = require('./getHTMLProps') | ||
@@ -15,2 +16,7 @@ const h = React.createElement | ||
class DashboardModal extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.validProps = getHTMLProps(props) | ||
} | ||
componentDidMount () { | ||
@@ -37,3 +43,3 @@ this.installPlugin() | ||
installPlugin () { | ||
const uppy = this.props.uppy | ||
const { uppy } = this.props | ||
const options = { | ||
@@ -59,3 +65,3 @@ id: 'react:DashboardModal', | ||
uninstallPlugin (props = this.props) { | ||
const uppy = props.uppy | ||
const { uppy } = props | ||
@@ -70,2 +76,3 @@ uppy.removePlugin(this.plugin) | ||
}, | ||
...this.validProps, | ||
}) | ||
@@ -72,0 +79,0 @@ } |
import { ToUppyProps } from './CommonTypes' | ||
import DragDrop = require('@uppy/drag-drop') | ||
export type DragDropProps = ToUppyProps<DragDrop.DragDropOptions> | ||
export type DragDropProps = ToUppyProps<DragDrop.DragDropOptions> & React.BaseHTMLAttributes<HTMLDivElement> | ||
@@ -6,0 +6,0 @@ /** |
const React = require('react') | ||
const DragDropPlugin = require('@uppy/drag-drop') | ||
const propTypes = require('./propTypes') | ||
const getHTMLProps = require('./getHTMLProps') | ||
@@ -13,2 +14,7 @@ const h = React.createElement | ||
class DragDrop extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.validProps = getHTMLProps(props) | ||
} | ||
componentDidMount () { | ||
@@ -30,3 +36,3 @@ this.installPlugin() | ||
installPlugin () { | ||
const uppy = this.props.uppy | ||
const { uppy } = this.props | ||
const options = { | ||
@@ -45,3 +51,3 @@ id: 'react:DragDrop', | ||
uninstallPlugin (props = this.props) { | ||
const uppy = props.uppy | ||
const { uppy } = props | ||
@@ -56,2 +62,3 @@ uppy.removePlugin(this.plugin) | ||
}, | ||
...this.validProps, | ||
}) | ||
@@ -58,0 +65,0 @@ } |
import { ToUppyProps } from './CommonTypes' | ||
import ProgressBar = require('@uppy/progress-bar') | ||
export type ProgressBarProps = ToUppyProps<ProgressBar.ProgressBarOptions> | ||
export type ProgressBarProps = ToUppyProps<ProgressBar.ProgressBarOptions> & React.BaseHTMLAttributes<HTMLDivElement> | ||
@@ -6,0 +6,0 @@ /** |
@@ -5,2 +5,3 @@ const React = require('react') | ||
const uppyPropType = require('./propTypes').uppy | ||
const getHTMLProps = require('./getHTMLProps') | ||
@@ -14,2 +15,7 @@ const h = React.createElement | ||
class ProgressBar extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.validProps = getHTMLProps(props) | ||
} | ||
componentDidMount () { | ||
@@ -31,3 +37,3 @@ this.installPlugin() | ||
installPlugin () { | ||
const uppy = this.props.uppy | ||
const { uppy } = this.props | ||
const options = { | ||
@@ -46,3 +52,3 @@ id: 'react:ProgressBar', | ||
uninstallPlugin (props = this.props) { | ||
const uppy = props.uppy | ||
const { uppy } = props | ||
@@ -57,2 +63,3 @@ uppy.removePlugin(this.plugin) | ||
}, | ||
...this.validProps, | ||
}) | ||
@@ -59,0 +66,0 @@ } |
import { ToUppyProps } from './CommonTypes' | ||
import StatusBar = require('@uppy/status-bar') | ||
export type StatusBarProps = ToUppyProps<StatusBar.StatusBarOptions> | ||
export type StatusBarProps = ToUppyProps<StatusBar.StatusBarOptions> & React.BaseHTMLAttributes<HTMLDivElement> | ||
@@ -6,0 +6,0 @@ /** |
@@ -5,2 +5,3 @@ const React = require('react') | ||
const uppyPropType = require('./propTypes').uppy | ||
const getHTMLProps = require('./getHTMLProps') | ||
@@ -15,2 +16,7 @@ const h = React.createElement | ||
class StatusBar extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.validProps = getHTMLProps(props) | ||
} | ||
componentDidMount () { | ||
@@ -32,3 +38,3 @@ this.installPlugin() | ||
installPlugin () { | ||
const uppy = this.props.uppy | ||
const { uppy } = this.props | ||
const options = { | ||
@@ -47,3 +53,3 @@ id: 'react:StatusBar', | ||
uninstallPlugin (props = this.props) { | ||
const uppy = props.uppy | ||
const { uppy } = props | ||
@@ -58,2 +64,3 @@ uppy.removePlugin(this.plugin) | ||
}, | ||
...this.validProps, | ||
}) | ||
@@ -60,0 +67,0 @@ } |
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
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
95590
57
1683
Updated@uppy/dashboard@^1.20.2
Updated@uppy/drag-drop@^1.4.30
Updated@uppy/file-input@^1.5.2
Updated@uppy/progress-bar@^1.3.30
Updated@uppy/status-bar@^1.9.6
Updated@uppy/utils@^3.6.2