rc-upload
Advanced tools
Comparing version 4.3.5 to 4.3.6
@@ -52,9 +52,8 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
} | ||
var _this$props2 = _this.props, | ||
children = _this$props2.children, | ||
onClick = _this$props2.onClick; | ||
if (children && children.type === 'button') { | ||
var target = e.target; | ||
var onClick = _this.props.onClick; | ||
if (target && target.tagName === 'BUTTON') { | ||
var parent = el.parentNode; | ||
parent.focus(); | ||
parent.querySelector('button').blur(); | ||
target.blur(); | ||
} | ||
@@ -241,9 +240,9 @@ el.click(); | ||
} | ||
var _this$props3 = this.props, | ||
onStart = _this$props3.onStart, | ||
customRequest = _this$props3.customRequest, | ||
name = _this$props3.name, | ||
headers = _this$props3.headers, | ||
withCredentials = _this$props3.withCredentials, | ||
method = _this$props3.method; | ||
var _this$props2 = this.props, | ||
onStart = _this$props2.onStart, | ||
customRequest = _this$props2.customRequest, | ||
name = _this$props2.name, | ||
headers = _this$props2.headers, | ||
withCredentials = _this$props2.withCredentials, | ||
method = _this$props2.method; | ||
var uid = origin.uid; | ||
@@ -306,20 +305,19 @@ var request = customRequest || defaultRequest; | ||
value: function render() { | ||
var _classNames; | ||
var _this$props4 = this.props, | ||
Tag = _this$props4.component, | ||
prefixCls = _this$props4.prefixCls, | ||
className = _this$props4.className, | ||
disabled = _this$props4.disabled, | ||
id = _this$props4.id, | ||
style = _this$props4.style, | ||
multiple = _this$props4.multiple, | ||
accept = _this$props4.accept, | ||
capture = _this$props4.capture, | ||
children = _this$props4.children, | ||
directory = _this$props4.directory, | ||
openFileDialogOnClick = _this$props4.openFileDialogOnClick, | ||
onMouseEnter = _this$props4.onMouseEnter, | ||
onMouseLeave = _this$props4.onMouseLeave, | ||
otherProps = _objectWithoutProperties(_this$props4, _excluded); | ||
var cls = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, className, className), _classNames)); | ||
var _this$props3 = this.props, | ||
Tag = _this$props3.component, | ||
prefixCls = _this$props3.prefixCls, | ||
className = _this$props3.className, | ||
disabled = _this$props3.disabled, | ||
id = _this$props3.id, | ||
style = _this$props3.style, | ||
multiple = _this$props3.multiple, | ||
accept = _this$props3.accept, | ||
capture = _this$props3.capture, | ||
children = _this$props3.children, | ||
directory = _this$props3.directory, | ||
openFileDialogOnClick = _this$props3.openFileDialogOnClick, | ||
onMouseEnter = _this$props3.onMouseEnter, | ||
onMouseLeave = _this$props3.onMouseLeave, | ||
otherProps = _objectWithoutProperties(_this$props3, _excluded); | ||
var cls = classNames(_defineProperty(_defineProperty(_defineProperty({}, prefixCls, true), "".concat(prefixCls, "-disabled"), disabled), className, className)); | ||
// because input don't have directory/webkitdirectory type declaration | ||
@@ -326,0 +324,0 @@ var dirProps = directory ? { |
@@ -60,9 +60,8 @@ "use strict"; | ||
} | ||
var _this$props2 = _this.props, | ||
children = _this$props2.children, | ||
onClick = _this$props2.onClick; | ||
if (children && children.type === 'button') { | ||
var target = e.target; | ||
var onClick = _this.props.onClick; | ||
if (target && target.tagName === 'BUTTON') { | ||
var parent = el.parentNode; | ||
parent.focus(); | ||
parent.querySelector('button').blur(); | ||
target.blur(); | ||
} | ||
@@ -249,9 +248,9 @@ el.click(); | ||
} | ||
var _this$props3 = this.props, | ||
onStart = _this$props3.onStart, | ||
customRequest = _this$props3.customRequest, | ||
name = _this$props3.name, | ||
headers = _this$props3.headers, | ||
withCredentials = _this$props3.withCredentials, | ||
method = _this$props3.method; | ||
var _this$props2 = this.props, | ||
onStart = _this$props2.onStart, | ||
customRequest = _this$props2.customRequest, | ||
name = _this$props2.name, | ||
headers = _this$props2.headers, | ||
withCredentials = _this$props2.withCredentials, | ||
method = _this$props2.method; | ||
var uid = origin.uid; | ||
@@ -314,20 +313,19 @@ var request = customRequest || _request.default; | ||
value: function render() { | ||
var _classNames; | ||
var _this$props4 = this.props, | ||
Tag = _this$props4.component, | ||
prefixCls = _this$props4.prefixCls, | ||
className = _this$props4.className, | ||
disabled = _this$props4.disabled, | ||
id = _this$props4.id, | ||
style = _this$props4.style, | ||
multiple = _this$props4.multiple, | ||
accept = _this$props4.accept, | ||
capture = _this$props4.capture, | ||
children = _this$props4.children, | ||
directory = _this$props4.directory, | ||
openFileDialogOnClick = _this$props4.openFileDialogOnClick, | ||
onMouseEnter = _this$props4.onMouseEnter, | ||
onMouseLeave = _this$props4.onMouseLeave, | ||
otherProps = (0, _objectWithoutProperties2.default)(_this$props4, _excluded); | ||
var cls = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, prefixCls, true), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, className, className), _classNames)); | ||
var _this$props3 = this.props, | ||
Tag = _this$props3.component, | ||
prefixCls = _this$props3.prefixCls, | ||
className = _this$props3.className, | ||
disabled = _this$props3.disabled, | ||
id = _this$props3.id, | ||
style = _this$props3.style, | ||
multiple = _this$props3.multiple, | ||
accept = _this$props3.accept, | ||
capture = _this$props3.capture, | ||
children = _this$props3.children, | ||
directory = _this$props3.directory, | ||
openFileDialogOnClick = _this$props3.openFileDialogOnClick, | ||
onMouseEnter = _this$props3.onMouseEnter, | ||
onMouseLeave = _this$props3.onMouseLeave, | ||
otherProps = (0, _objectWithoutProperties2.default)(_this$props3, _excluded); | ||
var cls = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixCls, true), "".concat(prefixCls, "-disabled"), disabled), className, className)); | ||
// because input don't have directory/webkitdirectory type declaration | ||
@@ -378,3 +376,2 @@ var dirProps = directory ? { | ||
}(_react.Component); | ||
var _default = AjaxUploader; | ||
exports.default = _default; | ||
var _default = exports.default = AjaxUploader; |
@@ -9,3 +9,3 @@ "use strict"; | ||
var _warning = _interopRequireDefault(require("rc-util/lib/warning")); | ||
var _default = function _default(file, acceptedFiles) { | ||
var _default = exports.default = function _default(file, acceptedFiles) { | ||
if (file && acceptedFiles) { | ||
@@ -51,3 +51,2 @@ var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(','); | ||
return true; | ||
}; | ||
exports.default = _default; | ||
}; |
@@ -9,3 +9,2 @@ "use strict"; | ||
var _Upload = _interopRequireDefault(require("./Upload")); | ||
var _default = _Upload.default; | ||
exports.default = _default; | ||
var _default = exports.default = _Upload.default; |
@@ -66,3 +66,2 @@ "use strict"; | ||
}; | ||
var _default = traverseFileTree; | ||
exports.default = _default; | ||
var _default = exports.default = traverseFileTree; |
@@ -66,3 +66,2 @@ "use strict"; | ||
}; | ||
var _default = Upload; | ||
exports.default = _default; | ||
var _default = exports.default = Upload; |
{ | ||
"name": "rc-upload", | ||
"version": "4.3.5", | ||
"version": "4.3.6", | ||
"description": "upload ui component for react", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"compile": "father build", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish --any-branch", | ||
"postpublish": "npm run docs:deploy", | ||
@@ -34,0 +34,0 @@ "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
63036
1560
1