@sb1/ffe-file-upload-react 10.0.31 → 10.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/FileUpload.js +9 -10
- package/lib/FileUpload.js +9 -10
- package/package.json +6 -6
package/es/FileUpload.js
CHANGED
|
@@ -2,13 +2,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
9
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
11
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
12
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
13
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
14
|
import React from 'react';
|
|
@@ -18,22 +18,22 @@ import classNames from 'classnames';
|
|
|
18
18
|
import { SecondaryButton } from '@sb1/ffe-buttons-react';
|
|
19
19
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
20
20
|
var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
21
|
-
_inherits(FileUpload, _React$Component);
|
|
22
21
|
function FileUpload(props) {
|
|
23
22
|
var _this;
|
|
24
23
|
_classCallCheck(this, FileUpload);
|
|
25
24
|
_this = _callSuper(this, FileUpload, [props]);
|
|
26
|
-
_this.onFilesSelected = _this.onFilesSelected.bind(
|
|
27
|
-
_this.onFilesDropped = _this.onFilesDropped.bind(
|
|
28
|
-
_this.onFileDeleted = _this.onFileDeleted.bind(
|
|
29
|
-
_this.setFileInputElement = _this.setFileInputElement.bind(
|
|
30
|
-
_this.triggerUploadFileNativeHandler = _this.triggerUploadFileNativeHandler.bind(
|
|
25
|
+
_this.onFilesSelected = _this.onFilesSelected.bind(_this);
|
|
26
|
+
_this.onFilesDropped = _this.onFilesDropped.bind(_this);
|
|
27
|
+
_this.onFileDeleted = _this.onFileDeleted.bind(_this);
|
|
28
|
+
_this.setFileInputElement = _this.setFileInputElement.bind(_this);
|
|
29
|
+
_this.triggerUploadFileNativeHandler = _this.triggerUploadFileNativeHandler.bind(_this);
|
|
31
30
|
_this.state = {
|
|
32
31
|
hover: false
|
|
33
32
|
};
|
|
34
33
|
return _this;
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
_inherits(FileUpload, _React$Component);
|
|
36
|
+
return _createClass(FileUpload, [{
|
|
37
37
|
key: "setFileInputElement",
|
|
38
38
|
value: function setFileInputElement(element) {
|
|
39
39
|
this.fileInputElement = element;
|
|
@@ -150,7 +150,6 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
150
150
|
}));
|
|
151
151
|
}
|
|
152
152
|
}]);
|
|
153
|
-
return FileUpload;
|
|
154
153
|
}(React.Component);
|
|
155
154
|
FileUpload.propTypes = {
|
|
156
155
|
/** ID for the input field. The ID is used as a base for the label ID as well. */
|
package/lib/FileUpload.js
CHANGED
|
@@ -15,32 +15,32 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
16
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
21
21
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
22
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
25
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
26
26
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
27
|
var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(FileUpload, _React$Component);
|
|
29
28
|
function FileUpload(props) {
|
|
30
29
|
var _this;
|
|
31
30
|
_classCallCheck(this, FileUpload);
|
|
32
31
|
_this = _callSuper(this, FileUpload, [props]);
|
|
33
|
-
_this.onFilesSelected = _this.onFilesSelected.bind(
|
|
34
|
-
_this.onFilesDropped = _this.onFilesDropped.bind(
|
|
35
|
-
_this.onFileDeleted = _this.onFileDeleted.bind(
|
|
36
|
-
_this.setFileInputElement = _this.setFileInputElement.bind(
|
|
37
|
-
_this.triggerUploadFileNativeHandler = _this.triggerUploadFileNativeHandler.bind(
|
|
32
|
+
_this.onFilesSelected = _this.onFilesSelected.bind(_this);
|
|
33
|
+
_this.onFilesDropped = _this.onFilesDropped.bind(_this);
|
|
34
|
+
_this.onFileDeleted = _this.onFileDeleted.bind(_this);
|
|
35
|
+
_this.setFileInputElement = _this.setFileInputElement.bind(_this);
|
|
36
|
+
_this.triggerUploadFileNativeHandler = _this.triggerUploadFileNativeHandler.bind(_this);
|
|
38
37
|
_this.state = {
|
|
39
38
|
hover: false
|
|
40
39
|
};
|
|
41
40
|
return _this;
|
|
42
41
|
}
|
|
43
|
-
|
|
42
|
+
_inherits(FileUpload, _React$Component);
|
|
43
|
+
return _createClass(FileUpload, [{
|
|
44
44
|
key: "setFileInputElement",
|
|
45
45
|
value: function setFileInputElement(element) {
|
|
46
46
|
this.fileInputElement = element;
|
|
@@ -157,7 +157,6 @@ var FileUpload = /*#__PURE__*/function (_React$Component) {
|
|
|
157
157
|
}));
|
|
158
158
|
}
|
|
159
159
|
}]);
|
|
160
|
-
return FileUpload;
|
|
161
160
|
}(_react.default.Component);
|
|
162
161
|
FileUpload.propTypes = {
|
|
163
162
|
/** ID for the input field. The ID is used as a base for the label ID as well. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-file-upload-react",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.35",
|
|
4
4
|
"description": "Upload file button with validation and list of uploaded files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"test:watch": "ffe-buildtool jest --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sb1/ffe-buttons-react": "^21.0.
|
|
32
|
-
"@sb1/ffe-file-upload": "^10.0.
|
|
33
|
-
"@sb1/ffe-form": "^28.0.
|
|
34
|
-
"@sb1/ffe-icons-react": "^9.0.
|
|
31
|
+
"@sb1/ffe-buttons-react": "^21.0.12",
|
|
32
|
+
"@sb1/ffe-file-upload": "^10.0.25",
|
|
33
|
+
"@sb1/ffe-form": "^28.0.13",
|
|
34
|
+
"@sb1/ffe-icons-react": "^9.0.5",
|
|
35
35
|
"classnames": "^2.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"depencencies": {
|
|
49
49
|
"prop-types": "^15.6.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "e95afe684bd3052e4e642be889153b82e431d137"
|
|
52
52
|
}
|