@bigbinary/neeto-form-frontend 1.0.41 → 1.0.43
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/README.md +27 -27
- package/dist/index.cjs.js +617 -552
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +617 -552
- package/dist/index.js.map +1 -1
- package/index.d.ts +4 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -88,33 +88,33 @@ import { BuildForm } from "@bigbinary/neeto-form-frontend";
|
|
|
88
88
|
import { ExternalForm } from "@bigbinary/neeto-form-frontend";
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
| prop | type
|
|
92
|
-
| --------------------- |
|
|
93
|
-
| `formId` | `string`
|
|
94
|
-
| `customSubmitHandler` | `function`
|
|
95
|
-
| `onBeforeSubmit` | `
|
|
96
|
-
| `onCreateSuccess` | `function`
|
|
97
|
-
| `showTitle` | `boolean`
|
|
98
|
-
| `submitRequestArgs` | `object`
|
|
99
|
-
| `footer` | `React.Component`
|
|
100
|
-
| `submitButtonProps` | `object`
|
|
101
|
-
| `cancelButtonProps` | `object`
|
|
102
|
-
| `resetButtonProps` | `object`
|
|
103
|
-
| `showPrefixIcons` | `boolean`
|
|
104
|
-
| `displayThankYou` | `boolean`
|
|
105
|
-
| `className` | `string`
|
|
106
|
-
| `submissionId` | `string`
|
|
107
|
-
| `preview` | `boolean`
|
|
108
|
-
| `preserveValues` | `boolean`
|
|
109
|
-
| `formTitle` | `string`
|
|
110
|
-
| `titleProps` | `object`
|
|
111
|
-
| `clearValuesOnSubmit` | `boolean`
|
|
112
|
-
| `clearValuesOnReset` | `boolean`
|
|
113
|
-
| `formDomProps` | `object`
|
|
114
|
-
| `initialValues` | `object`
|
|
115
|
-
| `editorProps` | `object`
|
|
116
|
-
| `onChange` | `function`
|
|
117
|
-
| `customValidator` | `(question) => Yup.Schema or null`
|
|
91
|
+
| prop | type | description |
|
|
92
|
+
| --------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
93
|
+
| `formId` | `string` | Form id |
|
|
94
|
+
| `customSubmitHandler` | `function` | Custom submit handler to be called instead of internal submit handlers |
|
|
95
|
+
| `onBeforeSubmit` | `(responses, formikValues) => updatedResponses` | Callback for before form submit, if the form responses needs to be updated, return the updated responses from this callback. The updated responses will be sent to the server. If the callback doesn't return anythong or returns a falsy value, the form will submit with the original responses. |
|
|
96
|
+
| `onCreateSuccess` | `function` | Callback for form creation success |
|
|
97
|
+
| `showTitle` | `boolean` | To show form title |
|
|
98
|
+
| `submitRequestArgs` | `object` | Arguments for form submit request payload |
|
|
99
|
+
| `footer` | `React.Component` | To render a Footer Component |
|
|
100
|
+
| `submitButtonProps` | `object` | Props for submit button |
|
|
101
|
+
| `cancelButtonProps` | `object` | Props for cancel button |
|
|
102
|
+
| `resetButtonProps` | `object` | Props for reset button |
|
|
103
|
+
| `showPrefixIcons` | `boolean` | To show prefix icons in input fields |
|
|
104
|
+
| `displayThankYou` | `boolean` | To show thank you message after form submit |
|
|
105
|
+
| `className` | `string` | To apply custom class to the form wrapper |
|
|
106
|
+
| `submissionId` | `string` | To set submission id for updating the form |
|
|
107
|
+
| `preview` | `boolean` | To show form in preview mode |
|
|
108
|
+
| `preserveValues` | `boolean` | To preserve form values in localStorage |
|
|
109
|
+
| `formTitle` | `string` | To set form title |
|
|
110
|
+
| `titleProps` | `object` | To set props for form title |
|
|
111
|
+
| `clearValuesOnSubmit` | `boolean` | To clear local storage values on submit |
|
|
112
|
+
| `clearValuesOnReset` | `boolean` | To clear local storage values on reset |
|
|
113
|
+
| `formDomProps` | `object` | To set props for form element |
|
|
114
|
+
| `initialValues` | `object` | To set initial values for form |
|
|
115
|
+
| `editorProps` | `object` | To set neetoEditor props for `rich_text` input field |
|
|
116
|
+
| `onChange` | `function` | Callback for form field values change |
|
|
117
|
+
| `customValidator` | `(question) => Yup.Schema or null` | Custom validator for form fields, it should return an yup validation schema based on the question proeprties. To make use of the default validation for a question type, return `null` |
|
|
118
118
|
|
|
119
119
|
`Submission` component is used to render a form result.
|
|
120
120
|
|