@maif/react-forms 1.0.29 → 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.
Files changed (44) hide show
  1. package/README.md +5 -4
  2. package/lib/esm/index.js +30260 -0
  3. package/lib/index.js +30281 -39
  4. package/package.json +29 -36
  5. package/rollup.config.js +53 -0
  6. package/dist/react-form.js +0 -2
  7. package/dist/react-form.js.LICENSE.txt +0 -103
  8. package/lib/Option.d.ts +0 -39
  9. package/lib/Option.js +0 -66
  10. package/lib/constraints.d.ts +0 -90
  11. package/lib/constraints.js +0 -371
  12. package/lib/form.d.ts +0 -2
  13. package/lib/form.js +0 -1361
  14. package/lib/format.d.ts +0 -12
  15. package/lib/format.js +0 -19
  16. package/lib/index.d.ts +0 -4
  17. package/lib/inputs/ArrayInput.d.ts +0 -1
  18. package/lib/inputs/ArrayInput.js +0 -141
  19. package/lib/inputs/BooleanInput.d.ts +0 -4
  20. package/lib/inputs/BooleanInput.js +0 -35
  21. package/lib/inputs/CodeInput.d.ts +0 -9
  22. package/lib/inputs/CodeInput.js +0 -89
  23. package/lib/inputs/Collapse.d.ts +0 -1
  24. package/lib/inputs/Collapse.js +0 -73
  25. package/lib/inputs/MarkdownInput.d.ts +0 -1
  26. package/lib/inputs/MarkdownInput.js +0 -433
  27. package/lib/inputs/SelectInput.d.ts +0 -1
  28. package/lib/inputs/SelectInput.js +0 -236
  29. package/lib/inputs/index.d.ts +0 -7
  30. package/lib/inputs/index.js +0 -96
  31. package/lib/inputs/objectInput.d.ts +0 -1
  32. package/lib/inputs/objectInput.js +0 -115
  33. package/lib/resolvers/index.d.ts +0 -2
  34. package/lib/resolvers/index.js +0 -19
  35. package/lib/resolvers/utils.d.ts +0 -5
  36. package/lib/resolvers/utils.js +0 -133
  37. package/lib/style.d.ts +0 -230
  38. package/lib/style.js +0 -178
  39. package/lib/styleContext.d.ts +0 -1
  40. package/lib/styleContext.js +0 -29
  41. package/lib/type.d.ts +0 -8
  42. package/lib/type.js +0 -15
  43. package/lib/utils.d.ts +0 -2
  44. 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 roght now to our [react-forms playground](https://maif.github.io/react-forms/) to discover a couple of examples with an inline editor.
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-form'
26
+ import { Form, type, format, constraints } from 'react-forms'
27
27
 
28
28
  export const Example = () => {
29
29
  const schema = {
@@ -68,6 +68,7 @@ export const Example = () => {
68
68
  - `select`: display a [react-select](https://react-select.com/home) field with provided options
69
69
  - `buttonsSelect`: display a buttons group, drawn with the same options than the format `select`
70
70
  - `code`: if the type is `string`, display a code input (draw with [react-ace](https://github.com/securingsincity/react-ace)) (add a props.setRef to get ace editor ref)
71
+ - `singleLineCode`: renders text input with syntax highlighting (draw with [react-ace](https://github.com/securingsincity/react-ace)) (add a props.setRef to get ace editor ref)
71
72
  - `markdown`: if the type is `string`, display a markdown input
72
73
  - `text`: if the type is `string`, display a textarea
73
74
  - `email`: if the type is `string`, display an email input
@@ -83,7 +84,7 @@ export const Example = () => {
83
84
  }
84
85
  ```
85
86
  - **isMulti**: if `select` format is choosen, `isMulti` property is to render a multiselect component
86
- - **defaultKeyValue**: if the format is setup to object, this default key/value is set for all added entries
87
+ - **defaultKeyValue**: if `object` format is choosen, this default key/value is set for all added entries
87
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.
88
89
  - **disabled**: A boolean option to enable/disable form field
89
90
  - **label**: The label of form field (you can pass `null` to not render a label)
@@ -402,4 +403,4 @@ Whitelist a set of unsupported format for the provided file and display an error
402
403
  Set the maximun value allowed for the file size and display an error if the size of provided file is bigger.
403
404
  ```javascript
404
405
  {type: 'maxSize', message: 'file size too big'}
405
- ```
406
+ ```