@maif/react-forms 1.0.31 → 1.0.32
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 +4 -4
- package/lib/esm/index.js +30260 -0
- package/lib/index.js +30281 -39
- package/package.json +28 -35
- package/rollup.config.js +53 -0
- package/dist/react-form.js +0 -2
- package/dist/react-form.js.LICENSE.txt +0 -103
- package/lib/Option.d.ts +0 -39
- package/lib/Option.js +0 -66
- package/lib/constraints.d.ts +0 -90
- package/lib/constraints.js +0 -371
- package/lib/form.d.ts +0 -2
- package/lib/form.js +0 -1359
- package/lib/format.d.ts +0 -13
- package/lib/format.js +0 -20
- package/lib/index.d.ts +0 -4
- package/lib/inputs/ArrayInput.d.ts +0 -1
- package/lib/inputs/ArrayInput.js +0 -141
- package/lib/inputs/BooleanInput.d.ts +0 -5
- package/lib/inputs/BooleanInput.js +0 -49
- package/lib/inputs/CodeInput.d.ts +0 -9
- package/lib/inputs/CodeInput.js +0 -89
- package/lib/inputs/Collapse.d.ts +0 -1
- package/lib/inputs/Collapse.js +0 -73
- package/lib/inputs/MarkdownInput.d.ts +0 -1
- package/lib/inputs/MarkdownInput.js +0 -433
- package/lib/inputs/SelectInput.d.ts +0 -1
- package/lib/inputs/SelectInput.js +0 -238
- package/lib/inputs/SingleLineCode.d.ts +0 -9
- package/lib/inputs/SingleLineCode.js +0 -88
- package/lib/inputs/index.d.ts +0 -8
- package/lib/inputs/index.js +0 -109
- package/lib/inputs/objectInput.d.ts +0 -1
- package/lib/inputs/objectInput.js +0 -115
- package/lib/resolvers/index.d.ts +0 -2
- package/lib/resolvers/index.js +0 -19
- package/lib/resolvers/utils.d.ts +0 -5
- package/lib/resolvers/utils.js +0 -133
- package/lib/style.d.ts +0 -234
- package/lib/style.js +0 -181
- package/lib/styleContext.d.ts +0 -1
- package/lib/styleContext.js +0 -29
- package/lib/type.d.ts +0 -8
- package/lib/type.js +0 -15
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +0 -37
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**@maif/react-forms** use [yup](https://github.com/jquense/yup) and [react-hook-form](https://react-hook-form.com/) to build its forms
|
|
6
6
|
|
|
7
7
|
# Playground
|
|
8
|
-
If you think that an example will explain it better, you can go
|
|
8
|
+
If you think that an example will explain it better, you can go right now to our [react-forms playground](https://maif.github.io/react-forms/) to discover a couple of examples with an inline editor.
|
|
9
9
|
|
|
10
10
|
# Install
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ You must define a form flow (this is just a javascript array which that represen
|
|
|
23
23
|
## example
|
|
24
24
|
|
|
25
25
|
```javascript
|
|
26
|
-
import { Form, type, format, constraints } from 'react-
|
|
26
|
+
import { Form, type, format, constraints } from 'react-forms'
|
|
27
27
|
|
|
28
28
|
export const Example = () => {
|
|
29
29
|
const schema = {
|
|
@@ -84,7 +84,7 @@ export const Example = () => {
|
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
- **isMulti**: if `select` format is choosen, `isMulti` property is to render a multiselect component
|
|
87
|
-
- **defaultKeyValue**: if
|
|
87
|
+
- **defaultKeyValue**: if `object` format is choosen, this default key/value is set for all added entries
|
|
88
88
|
- **visible**: a boolean option to hide/display form field. It can be an object with `ref` property to get a value by reference an a key `test` as a function to test it. if there is no `test` key, it's base just on boolean value of the reference.
|
|
89
89
|
- **disabled**: A boolean option to enable/disable form field
|
|
90
90
|
- **label**: The label of form field (you can pass `null` to not render a label)
|
|
@@ -403,4 +403,4 @@ Whitelist a set of unsupported format for the provided file and display an error
|
|
|
403
403
|
Set the maximun value allowed for the file size and display an error if the size of provided file is bigger.
|
|
404
404
|
```javascript
|
|
405
405
|
{type: 'maxSize', message: 'file size too big'}
|
|
406
|
-
```
|
|
406
|
+
```
|