@sb1/ffe-file-upload-react 9.0.1 → 9.0.3
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/FileItem.js +8 -3
- package/es/FileUpload.js +1 -1
- package/lib/FileItem.js +8 -3
- package/lib/FileUpload.js +1 -1
- package/package.json +4 -4
package/es/FileItem.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { func, shape, object, string as stringType } from 'prop-types';
|
|
3
|
+
import UtropstegnIkon from "@sb1/ffe-icons-react/es/utropstegn-ikon";
|
|
3
4
|
var FileItem = function FileItem(_ref) {
|
|
4
5
|
var file = _ref.file,
|
|
5
6
|
onFileDeleted = _ref.onFileDeleted,
|
|
@@ -40,10 +41,14 @@ var FileItem = function FileItem(_ref) {
|
|
|
40
41
|
}, file.name)),
|
|
41
42
|
// File has error
|
|
42
43
|
file.error && /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: "ffe-file-upload__file-item-error"
|
|
44
|
+
className: "ffe-file-upload__file-item-error",
|
|
45
|
+
role: "alert"
|
|
44
46
|
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
className: "ffe-file-upload__file-item-error-icon
|
|
46
|
-
}
|
|
47
|
+
className: "ffe-file-upload__file-item-error-icon"
|
|
48
|
+
}, /*#__PURE__*/React.createElement(UtropstegnIkon, {
|
|
49
|
+
role: "img",
|
|
50
|
+
title: "utropstegn-ikon"
|
|
51
|
+
})), /*#__PURE__*/React.createElement("button", {
|
|
47
52
|
type: "button",
|
|
48
53
|
id: file.name,
|
|
49
54
|
className: "ffe-file-upload__file-item-delete-button",
|
package/es/FileUpload.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
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; }
|
package/lib/FileItem.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
|
+
var _utropstegnIkon = _interopRequireDefault(require("@sb1/ffe-icons-react/lib/utropstegn-ikon"));
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
var FileItem = function FileItem(_ref) {
|
|
11
12
|
var file = _ref.file,
|
|
@@ -47,10 +48,14 @@ var FileItem = function FileItem(_ref) {
|
|
|
47
48
|
}, file.name)),
|
|
48
49
|
// File has error
|
|
49
50
|
file.error && /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
-
className: "ffe-file-upload__file-item-error"
|
|
51
|
+
className: "ffe-file-upload__file-item-error",
|
|
52
|
+
role: "alert"
|
|
51
53
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
-
className: "ffe-file-upload__file-item-error-icon
|
|
53
|
-
}
|
|
54
|
+
className: "ffe-file-upload__file-item-error-icon"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_utropstegnIkon.default, {
|
|
56
|
+
role: "img",
|
|
57
|
+
title: "utropstegn-ikon"
|
|
58
|
+
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
54
59
|
type: "button",
|
|
55
60
|
id: file.name,
|
|
56
61
|
className: "ffe-file-upload__file-item-delete-button",
|
package/lib/FileUpload.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-file-upload-react",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "Upload file button with validation and list of uploaded files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"test:watch": "ffe-buildtool jest --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sb1/ffe-buttons-react": "^18.0.
|
|
32
|
-
"@sb1/ffe-file-upload": "^9.0.
|
|
31
|
+
"@sb1/ffe-buttons-react": "^18.0.4",
|
|
32
|
+
"@sb1/ffe-file-upload": "^9.0.2",
|
|
33
33
|
"@sb1/ffe-form": "^24.0.1",
|
|
34
34
|
"@sb1/ffe-icons-react": "^7.3.5",
|
|
35
35
|
"classnames": "^2.3.1"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"depencencies": {
|
|
49
49
|
"prop-types": "^15.6.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "921f9feb983a19162c9ee54ad6ad4008b2369dca"
|
|
52
52
|
}
|