Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit a39a582

Browse files
authored
Merge pull request #94 from alvarosaburido/feature/update-deps-and-readme
feat(deps): updated dependencies Vue 3 and Readme
2 parents 06d572f + 3dc3531 commit a39a582

File tree

3 files changed

+999
-1791
lines changed

3 files changed

+999
-1791
lines changed

README.md

+29-35
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
![Library Banner](https://res.cloudinary.com/alvarosaburido/image/upload/v1589993773/portfolio/web/vue-dynamic-forms/open-graph-preview_kv4glm.png)
22

3-
# Vue Dynamic Forms
3+
# Vue `3.x.x` Dynamic Forms
44

55
<p align="center">
66
<a href="https://www.npmjs.com/package/@asigloo/vue-dynamic-forms">
7-
<img src="https://badgen.net/npm/v/@asigloo/vue-dynamic-forms" alt="Current npm version">
7+
<img src="https://badgen.net/npm/v/@asigloo/vue-dynamic-forms/next" alt="Current npm version">
88
</a>
9-
<a href="https://bundlephobia.com/result?p=@asigloo/vue-dynamic-forms@0.2.0">
10-
<img src="https://flat.badgen.net/bundlephobia/min/@asigloo/vue-dynamic-forms" alt="Minified size">
9+
<a href="https://bundlephobia.com/result?p=@asigloo/vue-dynamic-forms@next">
10+
<img src="https://flat.badgen.net/bundlephobia/min/@asigloo/vue-dynamic-forms@next" alt="Minified size">
1111
</a>
1212
<a href="https://vuejs.org">
13-
<img src="https://flat.badgen.net/badge/vue.js/2.6.x/4fc08d?icon=github" alt="Vue.js version">
13+
<img src="https://flat.badgen.net/badge/vue.js/3.x.x/4fc08d?icon=github" alt="Vue.js version">
1414
</a>
1515
</p>
1616

@@ -23,55 +23,49 @@ Especially if you need to create a very large form, in which the inputs are simi
2323

2424
So, wouldn't it be more economical to create the forms dynamically? Based on metadata that describes the business object model?
2525

26-
That's Vue Dynamic Forms.
26+
That's **Vue Dynamic Forms**.
27+
28+
## Status: Beta
29+
30+
This is the Vue `3.x.x` compatible version. The focus right now is out of the box `Typescript` support, three shakeable, improve accesiility and be lighter in size. For Vue `2.x.x` please use the library tags [0.x](https://github.com/alvarosaburido/vue-dynamic-forms/tree/0.x).
2731

2832
## Documentation
2933

3034
Complete documentation and examples available at
3135

3236
- **[Documentation](https://vue-dynamic-forms.netlify.app)**
3337
- **[Sandbox Demo](https://codesandbox.io/s/vue-dynamic-forms-ftzes)**
38+
- **Migration Guide** (soon)
3439

3540
## Installation
3641

3742
```bash
38-
$ npm install @asigloo/vue-dynamic-forms
43+
$ npm install @asigloo/vue-dynamic-forms@next
3944
```
4045

4146
or if you prefer yarn
4247

4348
```bash
44-
$ yarn add @asigloo/vue-dynamic-forms
49+
$ yarn add @asigloo/vue-dynamic-forms@next
4550
```
4651

4752
## Usage
4853

49-
### Global
54+
The installation and usage has change to align with new Vue 3 initialization process.
5055

51-
Register the component globally in your `main.js`:
56+
To create a new `Dynamic Form` instance, use the `createDynamicForms` function;
5257

5358
```js
54-
import Vue from 'vue';
55-
import VueDynamicForms from '@asigloo/vue-dynamic-forms';
56-
57-
Vue.use(VueDynamicForms);
58-
```
59-
60-
### Local
61-
62-
You can include the dynamic form directly to your component.
59+
import { createApp } from 'vue';
60+
import { createDynamicForms } from '@asigloo/vue-dynamic-forms';
6361

64-
```js
65-
import Vue from 'vue';
66-
import { DynamicForm } from '@asigloo/vue-dynamic-forms';
62+
const VueDynamicForms = createDynamicForms({
63+
theme: 'material',
64+
});
6765

68-
const components = { DynamicForm };
66+
export const app = createApp(App);
6967

70-
export {
71-
...
72-
components,
73-
...
74-
}
68+
app.use(VueDynamicForms);
7569
```
7670

7771
## Development
@@ -94,6 +88,12 @@ yarn run serve
9488
yarn run build
9589
```
9690

91+
### Generate types
92+
93+
```
94+
yarn run build:dts
95+
```
96+
9797
### Run your tests
9898

9999
```
@@ -118,13 +118,7 @@ If you find this library useful and you want to help improve it, maintain it or
118118

119119
## Todolist
120120

121-
This are the features I have planned for next versions of this library
122-
123-
- [x] Material theme
124-
- [ ] Form Mixins for fields manipulation (for example, change values of a field depending of other)
125-
- [ ] More complex input types.
126-
- [x] Nuxt plugin istall
127-
- [x] Better docs & online examples
121+
- [] Update docs
128122

129123
## License
130124

0 commit comments

Comments
 (0)