rc-upload
Advanced tools
Comparing version 3.0.0 to 3.0.1
import _extends from 'babel-runtime/helpers/extends'; | ||
import _defineProperty from 'babel-runtime/helpers/defineProperty'; | ||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; | ||
import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; | ||
@@ -15,2 +16,11 @@ import _createClass from 'babel-runtime/helpers/createClass'; | ||
var dataOrAriaAttributeProps = function dataOrAriaAttributeProps(props) { | ||
return Object.keys(props).reduce(function (acc, key) { | ||
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { | ||
acc[key] = props[key]; | ||
} | ||
return acc; | ||
}, {}); | ||
}; | ||
var AjaxUploader = function (_Component) { | ||
@@ -239,3 +249,4 @@ _inherits(AjaxUploader, _Component); | ||
directory = _props.directory, | ||
openFileDialogOnClick = _props.openFileDialogOnClick; | ||
openFileDialogOnClick = _props.openFileDialogOnClick, | ||
otherProps = _objectWithoutProperties(_props, ['component', 'prefixCls', 'className', 'disabled', 'id', 'style', 'multiple', 'accept', 'children', 'directory', 'openFileDialogOnClick']); | ||
@@ -257,3 +268,3 @@ var cls = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, prefixCls + '-disabled', disabled), _defineProperty(_classNames, className, className), _classNames)); | ||
}), | ||
React.createElement('input', { | ||
React.createElement('input', _extends({}, dataOrAriaAttributeProps(otherProps), { | ||
id: id, | ||
@@ -272,3 +283,3 @@ type: 'file', | ||
onChange: this.onChange | ||
}), | ||
})), | ||
children | ||
@@ -275,0 +286,0 @@ ); |
@@ -15,2 +15,6 @@ 'use strict'; | ||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
@@ -59,2 +63,11 @@ | ||
/* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */ | ||
var dataOrAriaAttributeProps = function dataOrAriaAttributeProps(props) { | ||
return Object.keys(props).reduce(function (acc, key) { | ||
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { | ||
acc[key] = props[key]; | ||
} | ||
return acc; | ||
}, {}); | ||
}; | ||
var AjaxUploader = function (_Component) { | ||
@@ -283,3 +296,4 @@ (0, _inherits3['default'])(AjaxUploader, _Component); | ||
directory = _props.directory, | ||
openFileDialogOnClick = _props.openFileDialogOnClick; | ||
openFileDialogOnClick = _props.openFileDialogOnClick, | ||
otherProps = (0, _objectWithoutProperties3['default'])(_props, ['component', 'prefixCls', 'className', 'disabled', 'id', 'style', 'multiple', 'accept', 'children', 'directory', 'openFileDialogOnClick']); | ||
@@ -301,3 +315,3 @@ var cls = (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls, true), (0, _defineProperty3['default'])(_classNames, prefixCls + '-disabled', disabled), (0, _defineProperty3['default'])(_classNames, className, className), _classNames)); | ||
}), | ||
_react2['default'].createElement('input', { | ||
_react2['default'].createElement('input', (0, _extends3['default'])({}, dataOrAriaAttributeProps(otherProps), { | ||
id: id, | ||
@@ -316,3 +330,3 @@ type: 'file', | ||
onChange: this.onChange | ||
}), | ||
})), | ||
children | ||
@@ -319,0 +333,0 @@ ); |
{ | ||
"name": "rc-upload", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "upload ui component for react", | ||
@@ -44,3 +44,3 @@ "keywords": [ | ||
"expect.js": "0.3.x", | ||
"fs-extra": "^8.1.0", | ||
"fs-extra": "^9.0.0", | ||
"gh-pages": "^2.2.0", | ||
@@ -47,0 +47,0 @@ "jest": "^20.0.1", |
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
46262
1070