From 3f5bf7a7108f3e3368b1b663ed1bb68d4fe7a93c Mon Sep 17 00:00:00 2001
From: Mihail Hagiu <mihail.hagiu@thinslices.com>
Date: Tue, 6 Nov 2018 17:37:57 +0200
Subject: [PATCH] docs(SubmitRevision): WIP withSubmitRevision HOC
 documentation

---
 .../src/submitRevision/README.md              | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 packages/component-manuscript/src/submitRevision/README.md

diff --git a/packages/component-manuscript/src/submitRevision/README.md b/packages/component-manuscript/src/submitRevision/README.md
new file mode 100644
index 000000000..1768825b9
--- /dev/null
+++ b/packages/component-manuscript/src/submitRevision/README.md
@@ -0,0 +1,48 @@
+## Hindawi Submit Revision HOC.
+
+The `withSubmitRevision` HOC contains the logic for submitting a manuscript version. It contains the following utility HOCs:
+
+* `withFetching`
+* `withFilePreview`
+* `withFileDownload`
+* `withModal`
+
+..as well as other `recompose` HOCs.
+
+### withSubmitRevision props
+
+`submitRevision` namespace contains the following fields:
+Name|Type|Description
+---|---|---
+initialValues|`{...fragment}`| Object containing the initial state of the fragment
+addFile|`({ file: object, type: string, fragment: object }) => any`|Uploads the file to the server
+journal|`function`|Des Cri Pti On!
+history|`object`|Added by `react-router` to allow navigation
+fragment|`function`|Des Cri Pti On!
+canSubmit|`function`|Des Cri Pti On!
+addAuthor|`function`|Des Cri Pti On!
+showModal|`function`|Des Cri Pti On!
+changeForm|`function`|Des Cri Pti On!
+collection|`function`|Des Cri Pti On!
+isFetching|`function`|Des Cri Pti On!
+deleteFile|`function`|Des Cri Pti On!
+currentUser|`function`|Des Cri Pti On!
+setFetching|`function`|Des Cri Pti On!
+previewFile|`function`|Des Cri Pti On!
+downloadFile|`function`|Des Cri Pti On!
+onAuthorEdit|`function`|Des Cri Pti On!
+deleteAuthor|`function`|Des Cri Pti On!
+getSignedUrl|`function`|Des Cri Pti On!
+hasFormError|`function`|Des Cri Pti On!
+formErrors|`function`|Des Cri Pti On!
+fetchingError|`string`|Value representing a server request error
+addResponseFile|`file => any`|Uploads the file and adds it on the form
+deleteResponseFile|`file => any`|Deletes the file from the server and removes it from the form
+isEditingAuthor|`bool`|Value representing if the current user is the editing author
+onChange|`(reduxFormValues, dispatch, { collection, fragment }) => any`|Used to autosave new fragment when fields change
+onSubmit|`(reduxFormValues, dispatch, { history, fragment, collection, showModal, setFetching, canSubmit })`|Handles the submission of a new manuscript version
+validate|`({ editAuthors, files, responseToReviewers }) => errors: object`|Checks the form for required fields and returns the errors
+responseFile|`file`|Value containing the revision's file for the reviewer's response
+
+```javascript
+```
-- 
GitLab