oa-componentbook 1.0.1-stage.55 → 1.0.1-stage.56

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.
@@ -61,11 +61,11 @@ function GenericUpload(_ref) {
61
61
  }
62
62
  return true;
63
63
  };
64
- const handleUpload = async (file, docTypeId) => {
64
+ const handleUpload = async (file, docTypeId, documentId) => {
65
65
  if (!validateFile(file, docTypeId)) {
66
66
  return null;
67
67
  }
68
- return uploadHandler(file, docTypeId);
68
+ return uploadHandler(file, docTypeId, documentId);
69
69
  };
70
70
  return /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
71
71
  title: config.title,
@@ -97,7 +97,7 @@ function GenericUpload(_ref) {
97
97
  typography: "type-b2-500",
98
98
  color: "primary-content"
99
99
  }, item === null || item === void 0 ? void 0 : item.docName)), /*#__PURE__*/_react.default.createElement(_CustomUpload.default, {
100
- handleCustomOnChange: (file, status) => handleUpload(file, item.docTypeId),
100
+ handleCustomOnChange: (file, status) => handleUpload(file, item.docTypeId, item.documentId),
101
101
  formName: item.docTypeId,
102
102
  uploadedDocuments: uploadedDocuments && uploadedDocuments[item.docTypeId] ? [uploadedDocuments[item.docTypeId]] : [],
103
103
  deleteHandler: selectedFile => _deleteHandler(item.docTypeId),
@@ -106,7 +106,8 @@ function GenericUpload(_ref) {
106
106
  showDelete: showDelete,
107
107
  showPreview: showPreview,
108
108
  accept: validationConfig.allowedTypes.join(', '),
109
- docName: item.docName
109
+ docName: item.docName,
110
+ isMandatory: false
110
111
  })))));
111
112
  }
112
113
  GenericUpload.propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.55",
3
+ "version": "1.0.1-stage.56",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",