rc-upload
Advanced tools
Comparing version 4.3.1 to 4.3.2
@@ -12,2 +12,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _createSuper from "@babel/runtime/helpers/esm/createSuper"; | ||
var _excluded = ["component", "prefixCls", "className", "disabled", "id", "style", "multiple", "accept", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "capture"]; | ||
import React, { Component } from 'react'; | ||
@@ -31,3 +32,7 @@ import classNames from 'classnames'; | ||
_this = _super.apply(this, arguments); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_this.state = { | ||
@@ -37,2 +42,4 @@ uid: getUid() | ||
_this.reqs = {}; | ||
_this.fileInput = void 0; | ||
_this._isMounted = void 0; | ||
@@ -135,7 +142,3 @@ _this.onChange = function (e) { | ||
}; | ||
/** | ||
* Process file before upload. When all the file is ready, we start upload. | ||
*/ | ||
_this.processFile = /*#__PURE__*/function () { | ||
@@ -376,3 +379,3 @@ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file, fileList) { | ||
capture = _this$props4.capture, | ||
otherProps = _objectWithoutProperties(_this$props4, ["component", "prefixCls", "className", "disabled", "id", "style", "multiple", "accept", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "capture"]); | ||
otherProps = _objectWithoutProperties(_this$props4, _excluded); | ||
@@ -379,0 +382,0 @@ var cls = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, className, className), _classNames)); // because input don't have directory/webkitdirectory type declaration |
@@ -22,3 +22,3 @@ import warning from "rc-util/es/warning"; | ||
if (lowerType === '.jpg' || lowerType === '.jpeg') { | ||
affixList = ['.jpg', 'jpeg']; | ||
affixList = ['.jpg', '.jpeg']; | ||
} | ||
@@ -25,0 +25,0 @@ |
@@ -48,3 +48,3 @@ import type * as React from 'react'; | ||
onError?: (event: UploadRequestError | ProgressEvent, body?: T) => void; | ||
onSuccess?: (body: T, xhr: XMLHttpRequest) => void; | ||
onSuccess?: (body: T, xhr?: XMLHttpRequest) => void; | ||
data?: object; | ||
@@ -51,0 +51,0 @@ filename?: string; |
@@ -23,4 +23,9 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
_this = _super.apply(this, arguments); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_this.uploader = void 0; | ||
_this.saveUploader = function (node) { | ||
@@ -27,0 +32,0 @@ _this.uploader = node; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -48,2 +48,4 @@ value: true | ||
var _excluded = ["component", "prefixCls", "className", "disabled", "id", "style", "multiple", "accept", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "capture"]; | ||
var AjaxUploader = /*#__PURE__*/function (_Component) { | ||
@@ -58,3 +60,8 @@ (0, _inherits2.default)(AjaxUploader, _Component); | ||
(0, _classCallCheck2.default)(this, AjaxUploader); | ||
_this = _super.apply(this, arguments); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_this.state = { | ||
@@ -64,2 +71,4 @@ uid: (0, _uid.default)() | ||
_this.reqs = {}; | ||
_this.fileInput = void 0; | ||
_this._isMounted = void 0; | ||
@@ -160,7 +169,3 @@ _this.onChange = function (e) { | ||
}; | ||
/** | ||
* Process file before upload. When all the file is ready, we start upload. | ||
*/ | ||
_this.processFile = /*#__PURE__*/function () { | ||
@@ -401,3 +406,3 @@ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(file, fileList) { | ||
capture = _this$props4.capture, | ||
otherProps = (0, _objectWithoutProperties2.default)(_this$props4, ["component", "prefixCls", "className", "disabled", "id", "style", "multiple", "accept", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "capture"]); | ||
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)); // because input don't have directory/webkitdirectory type declaration | ||
@@ -404,0 +409,0 @@ |
@@ -32,3 +32,3 @@ "use strict"; | ||
if (lowerType === '.jpg' || lowerType === '.jpeg') { | ||
affixList = ['.jpg', 'jpeg']; | ||
affixList = ['.jpg', '.jpeg']; | ||
} | ||
@@ -35,0 +35,0 @@ |
@@ -48,3 +48,3 @@ import type * as React from 'react'; | ||
onError?: (event: UploadRequestError | ProgressEvent, body?: T) => void; | ||
onSuccess?: (body: T, xhr: XMLHttpRequest) => void; | ||
onSuccess?: (body: T, xhr?: XMLHttpRequest) => void; | ||
data?: object; | ||
@@ -51,0 +51,0 @@ filename?: string; |
@@ -38,4 +38,10 @@ "use strict"; | ||
(0, _classCallCheck2.default)(this, Upload); | ||
_this = _super.apply(this, arguments); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_this.uploader = void 0; | ||
_this.saveUploader = function (node) { | ||
@@ -42,0 +48,0 @@ _this.uploader = node; |
{ | ||
"name": "rc-upload", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "upload ui component for react", | ||
@@ -42,4 +42,4 @@ "keywords": [ | ||
"@types/jest": "^26.0.20", | ||
"@types/react": "^16.9.2", | ||
"@types/react-dom": "^16.9.0", | ||
"@types/react": "^17.0.15", | ||
"@types/react-dom": "^17.0.9", | ||
"@umijs/fabric": "^2.0.0", | ||
@@ -46,0 +46,0 @@ "axios": "^0.20.0", |
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
63314
1531