@react-form-builder/components-rsuite 3.5.0 → 4.0.0
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/LICENSE +21 -0
- package/README.md +93 -2
- package/dist/css/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/css/rsuite-no-reset.min.css +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +359 -359
- package/dist/index.js.map +1 -1
- package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js +5 -0
- package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js.map +1 -0
- package/dist/rsuite-no-reset.min-12eea714.js +5 -0
- package/dist/rsuite-no-reset.min-12eea714.js.map +1 -0
- package/package.json +9 -6
- package/dist/rsuite-no-reset-rtl.min-a25850c9.js +0 -5
- package/dist/rsuite-no-reset-rtl.min-a25850c9.js.map +0 -1
- package/dist/rsuite-no-reset.min-c2ac3ca5.js +0 -5
- package/dist/rsuite-no-reset.min-c2ac3ca5.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Optimajet Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,6 +5,97 @@ This library is part of the [React Form Builder](https://formengine.io/) project
|
|
|
5
5
|
This package contains visual components based on [React Suite](https://rsuitejs.com/). To learn how to use the package, see
|
|
6
6
|
our [documentation](https://formengine.io/documentation/).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Key Features
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- **UI-Agnostic Components:** Works seamlessly with any UI
|
|
11
|
+
library ([MUI](https://mui.com/), [Ant Design](https://ant.design/), [shadcn/ui](https://ui.shadcn.com/)
|
|
12
|
+
and [others](https://formengine.io/documentation/custom-components))
|
|
13
|
+
- **Pre-Built React Suite Integration:** Includes a ready-to-use component
|
|
14
|
+
library – [@react-form-builder/components-rsuite](https://www.npmjs.com/package/@react-form-builder/components-rsuite).
|
|
15
|
+
- Framework Support:
|
|
16
|
+
- **Next.js Integration**: Seamlessly works with [Next.js](https://formengine.io/documentation/usage-with-nextjs).
|
|
17
|
+
- **Remix Compatibility**: Fully supports [Remix](https://formengine.io/documentation/usage-with-remix).
|
|
18
|
+
- **Framework-Agnostic**: Can also be used [without any framework](https://formengine.io/documentation/installation#cdn) via CDN.
|
|
19
|
+
- **Multi-Database Support:** Compatible with MySQL, PostgreSQL, MongoDB, SQLite, and more.
|
|
20
|
+
- **Built-in Validation with Zod:** Includes pre-configured validation rules powered by [Zod](https://github.com/colinhacks/zod).
|
|
21
|
+
- **Extensible Validation Support:** Works
|
|
22
|
+
with [Yup](https://github.com/jquense/yup), [AJV](https://github.com/ajv-validator/ajv), [Zod](https://github.com/colinhacks/zod),
|
|
23
|
+
[Superstruct](https://github.com/ianstormtaylor/superstruct),
|
|
24
|
+
[Joi](https://github.com/hapijs/joi), and other custom validation libraries.
|
|
25
|
+
- **Responsive Layouts**: Build forms that automatically [adapt](https://formengine.io/documentation/adaptive-layout) to all screen sizes.
|
|
26
|
+
- **Custom Actions**: Enhance forms with interactive logic through [custom JavaScript code](https://formengine.io/documentation/actions).
|
|
27
|
+
- **Dynamic Properties**: Implement real-time component changes with [MobX](https://github.com/mobxjs/mobx)-powered reactive properties.
|
|
28
|
+
- **Flexible Storage Options**:
|
|
29
|
+
- Store complete form definitions as JSON.
|
|
30
|
+
- Programmatically generate forms [via code](https://formengine.io/documentation/building-forms-via-code).
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @optimajet/react-form-builder-core @react-form-builder/components-rsuite
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
```typescript jsx
|
|
41
|
+
import {viewWithCss} from '@react-form-builder/components-rsuite'
|
|
42
|
+
import {buildForm, FormViewer} from '@react-form-builder/core'
|
|
43
|
+
|
|
44
|
+
const simpleForm = buildForm({errorType: 'RsErrorMessage'})
|
|
45
|
+
.component('container', 'RsContainer')
|
|
46
|
+
.style({flexDirection: 'row'})
|
|
47
|
+
.children((builder) =>
|
|
48
|
+
builder
|
|
49
|
+
.component('firstName', 'RsInput')
|
|
50
|
+
.prop('placeholder', 'Enter your first name')
|
|
51
|
+
.prop('label', 'First Name')
|
|
52
|
+
.validation('required')
|
|
53
|
+
|
|
54
|
+
.component('lastName', 'RsInput')
|
|
55
|
+
.prop('placeholder', 'Enter your last name')
|
|
56
|
+
.prop('label', 'Last Name')
|
|
57
|
+
.validation('required')
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
.component('birthDate', 'RsDatePicker')
|
|
61
|
+
.prop('label', 'Birth Date')
|
|
62
|
+
.prop('oneTap', true)
|
|
63
|
+
.validation('min').args({value: '1900-01-07T12:25:37.000Z'})
|
|
64
|
+
|
|
65
|
+
.component('submit', 'RsButton')
|
|
66
|
+
.prop('children', 'Submit')
|
|
67
|
+
.prop('color', 'blue')
|
|
68
|
+
.prop('appearance', 'primary')
|
|
69
|
+
.event('onClick')
|
|
70
|
+
.commonAction('validate').args({failOnError: true})
|
|
71
|
+
.customAction('onSubmit')
|
|
72
|
+
.json()
|
|
73
|
+
|
|
74
|
+
export const App = () => {
|
|
75
|
+
return <FormViewer
|
|
76
|
+
view={viewWithCss}
|
|
77
|
+
getForm={() => simpleForm}
|
|
78
|
+
actions={{
|
|
79
|
+
onSubmit: (e) => {
|
|
80
|
+
// submit the form to the backend
|
|
81
|
+
alert('Form data: ' + JSON.stringify(e.data))
|
|
82
|
+
},
|
|
83
|
+
}}
|
|
84
|
+
/>
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Resources
|
|
89
|
+
|
|
90
|
+
- [Website](https://formengine.io/)
|
|
91
|
+
- [Documentation](https://formengine.io/documentation)
|
|
92
|
+
- [Demo](https://demo.formengine.io/)
|
|
93
|
+
|
|
94
|
+
## Licensing
|
|
95
|
+
|
|
96
|
+
This library is distributed under the MIT license.
|
|
97
|
+
|
|
98
|
+
Important: Some features and modules (e.g., Form Designer) are only available under a commercial license.
|
|
99
|
+
|
|
100
|
+
If you are interested in using the full version of the product, please [contact us](mailto:sales@optimajet.com) or visit
|
|
101
|
+
the [product website](https://formengine.io/pricing) for licensing information.
|