oa-componentbook 0.18.57 → 0.18.59
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.
|
@@ -15,7 +15,7 @@ var _MaterialIcon = _interopRequireDefault(require("../../components/oa-componen
|
|
|
15
15
|
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
16
16
|
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
17
17
|
var _utils = require("../../utils");
|
|
18
|
-
const _excluded = ["className", "formName", "onUpload", "multiple", "uploadedDocuments", "data-test"];
|
|
18
|
+
const _excluded = ["className", "formName", "onUpload", "multiple", "uploadedDocuments", "data-test", "disabled"];
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
21
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -27,7 +27,8 @@ function UploadDownloadWidget(_ref) {
|
|
|
27
27
|
onUpload,
|
|
28
28
|
multiple,
|
|
29
29
|
uploadedDocuments,
|
|
30
|
-
'data-test': dataTest
|
|
30
|
+
'data-test': dataTest,
|
|
31
|
+
disabled
|
|
31
32
|
} = _ref,
|
|
32
33
|
antDesignProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
// This callback will run for each selected file.
|
|
@@ -65,7 +66,8 @@ function UploadDownloadWidget(_ref) {
|
|
|
65
66
|
onClick: () => {},
|
|
66
67
|
label: "Choose File",
|
|
67
68
|
size: "small",
|
|
68
|
-
type: "secondary"
|
|
69
|
+
type: "secondary",
|
|
70
|
+
disabled: disabled
|
|
69
71
|
}))) :
|
|
70
72
|
/*#__PURE__*/
|
|
71
73
|
// This version has no validation.
|
|
@@ -83,7 +85,8 @@ function UploadDownloadWidget(_ref) {
|
|
|
83
85
|
label: "Choose File",
|
|
84
86
|
onClick: () => {},
|
|
85
87
|
size: "small",
|
|
86
|
-
type: "secondary"
|
|
88
|
+
type: "secondary",
|
|
89
|
+
disabled: disabled
|
|
87
90
|
}))), (uploadedDocuments === null || uploadedDocuments === void 0 ? void 0 : uploadedDocuments.length) > 0 && uploadedDocuments.map((uploadedDocument, index) => {
|
|
88
91
|
var _uploadedDocument$onD, _uploadedDocument$sho, _uploadedDocument$onD2;
|
|
89
92
|
return /*#__PURE__*/_react.default.createElement(_styles.StyledSection, {
|
|
@@ -132,6 +135,7 @@ UploadDownloadWidget.propTypes = {
|
|
|
132
135
|
formName: _propTypes.default.string,
|
|
133
136
|
multiple: _propTypes.default.bool,
|
|
134
137
|
onUpload: _propTypes.default.func,
|
|
138
|
+
disabled: _propTypes.default.bool,
|
|
135
139
|
uploadedDocuments: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
136
140
|
name: _propTypes.default.string,
|
|
137
141
|
onDelete: _propTypes.default.func,
|
|
@@ -145,6 +149,7 @@ UploadDownloadWidget.defaultProps = {
|
|
|
145
149
|
formName: null,
|
|
146
150
|
multiple: false,
|
|
147
151
|
onUpload: null,
|
|
148
|
-
uploadedDocuments: []
|
|
152
|
+
uploadedDocuments: [],
|
|
153
|
+
disabled: false
|
|
149
154
|
};
|
|
150
155
|
var _default = exports.default = UploadDownloadWidget;
|
|
@@ -35,23 +35,22 @@ const columns = [{
|
|
|
35
35
|
typography: "type-b2-400"
|
|
36
36
|
}, text),
|
|
37
37
|
width: '25%'
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}];
|
|
38
|
+
}
|
|
39
|
+
// {
|
|
40
|
+
// title: 'Description',
|
|
41
|
+
// dataIndex: 'description',
|
|
42
|
+
// key: 'description',
|
|
43
|
+
// width: '25%',
|
|
44
|
+
// render: (text) => <Typography typography="type-b2-400">{text}</Typography>,
|
|
45
|
+
// },
|
|
46
|
+
// {
|
|
47
|
+
// title: 'Rejected By',
|
|
48
|
+
// dataIndex: 'rejectedBy',
|
|
49
|
+
// key: 'rejectedBy',
|
|
50
|
+
// width: '25%',
|
|
51
|
+
// render: (text) => <Typography typography="type-b2-400">{text}</Typography>,
|
|
52
|
+
// },
|
|
53
|
+
];
|
|
55
54
|
function ViewHistoryWidget(_ref) {
|
|
56
55
|
var _currentDocument$docD, _currentDocument$docD2;
|
|
57
56
|
let {
|