1 | 'use strict';
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports.default = undefined;
|
5 |
|
6 | var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
7 |
|
8 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
9 |
|
10 | var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
11 |
|
12 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
13 |
|
14 | var _inherits2 = require('babel-runtime/helpers/inherits');
|
15 |
|
16 | var _inherits3 = _interopRequireDefault(_inherits2);
|
17 |
|
18 | var _react = require('react');
|
19 |
|
20 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21 |
|
22 | var Base = function (_Component) {
|
23 | (0, _inherits3.default)(Base, _Component);
|
24 |
|
25 | function Base() {
|
26 | var _temp, _this, _ret;
|
27 |
|
28 | (0, _classCallCheck3.default)(this, Base);
|
29 |
|
30 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
31 | args[_key] = arguments[_key];
|
32 | }
|
33 |
|
34 | return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.saveUploaderRef = function (ref) {
|
35 |
|
36 | if (ref && typeof ref.getInstance === 'function') {
|
37 | _this.uploaderRef = ref.getInstance();
|
38 | } else {
|
39 | _this.uploaderRef = ref;
|
40 | }
|
41 | }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
|
42 | }
|
43 |
|
44 |
|
45 | Base.prototype.abort = function abort(file) {
|
46 |
|
47 | this.uploaderRef.abort(file);
|
48 | };
|
49 |
|
50 |
|
51 |
|
52 | Base.prototype.startUpload = function startUpload() {
|
53 |
|
54 | this.uploaderRef.startUpload();
|
55 | };
|
56 |
|
57 |
|
58 | Base.prototype.isUploading = function isUploading() {
|
59 |
|
60 | return this.uploaderRef.isUploading();
|
61 | };
|
62 |
|
63 | return Base;
|
64 | }(_react.Component);
|
65 |
|
66 | Base.displayName = 'Base';
|
67 | exports.default = Base;
|
68 | module.exports = exports['default']; |
\ | No newline at end of file |