vue3-schema-forms 0.0.16 → 0.0.18
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 +67 -1
- package/dist/components/main.d.ts +1 -0
- package/dist/main.cjs.js +95 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.es.js +16385 -0
- package/dist/main.umd.js +96 -0
- package/dist/src/components/controls/StaticContent.vue.d.ts +4 -0
- package/dist/src/components/controls/StaticContent.vue.d.ts.map +1 -0
- package/dist/src/components/controls/TextField.vue.d.ts +4 -0
- package/dist/src/components/controls/TextField.vue.d.ts.map +1 -0
- package/dist/src/components/controls/duplicated-section/DraggableContextMenu.vue.d.ts +5 -0
- package/dist/src/components/controls/duplicated-section/DraggableContextMenu.vue.d.ts.map +1 -0
- package/dist/src/components/controls/duplicated-section/DraggableIcon.vue.d.ts +5 -0
- package/dist/src/components/controls/duplicated-section/DraggableIcon.vue.d.ts.map +1 -0
- package/dist/src/components/controls/duplicated-section/DuplicatedSection.vue.d.ts +5 -0
- package/dist/src/components/controls/duplicated-section/DuplicatedSection.vue.d.ts.map +1 -0
- package/dist/src/components/controls/duplicated-section/HoverWrapper.vue.d.ts +4 -0
- package/dist/src/components/controls/duplicated-section/HoverWrapper.vue.d.ts.map +1 -0
- package/dist/src/components/engine/FormNode.vue.d.ts +4 -0
- package/dist/src/components/engine/FormNode.vue.d.ts.map +1 -0
- package/dist/src/components/engine/FormRoot.vue.d.ts +4 -0
- package/dist/src/components/engine/FormRoot.vue.d.ts.map +1 -0
- package/dist/src/components/engine/VueSchemaForms.vue.d.ts +5 -0
- package/dist/src/components/engine/VueSchemaForms.vue.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/core/composables/useCalculation.d.ts +2 -0
- package/dist/src/core/composables/useConditionalRendering.d.ts +2 -0
- package/dist/{core → src/core}/composables/usePerformanceAPI.d.ts +0 -1
- package/dist/src/core/composables/useResolveDependency.d.ts +1 -0
- package/dist/{core → src/core}/engine/evalExprParser.d.ts +0 -1
- package/dist/{core → src/core}/engine/jsonSchemaResolver.d.ts +0 -1
- package/dist/src/core/engine/utils.d.ts +12 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/stories/controls/DuplicatedSection.stories.d.ts +69 -0
- package/dist/src/stories/controls/StaticContent.stories.d.ts +66 -0
- package/dist/src/stories/controls/TextField.stories.d.ts +74 -0
- package/dist/src/stories/development.stories.d.ts +44 -0
- package/dist/src/stories/features/Calculation.stories.d.ts +90 -0
- package/dist/src/stories/features/ConditionalRendering.stories.d.ts +71 -0
- package/dist/src/stories/features/Layouts.stories.d.ts +73 -0
- package/dist/src/stories/features/Translations.stories.d.ts +72 -0
- package/dist/src/stories/features/Validation.stories.d.ts +69 -0
- package/dist/src/stories/schemas.d.ts +10 -0
- package/dist/src/stories/templates/story-template.d.ts +6 -0
- package/dist/src/tests/render.test.d.ts +1 -0
- package/dist/src/tests/test-schemas.d.ts +5 -0
- package/dist/{vocabulary → src/vocabulary}/engine/controls.d.ts +4 -2
- package/dist/{vocabulary → src/vocabulary}/engine/index.d.ts +4 -2
- package/dist/{vocabulary → src/vocabulary}/schema/elements.d.ts +15 -3
- package/dist/{vocabulary → src/vocabulary}/schema/index.d.ts +4 -2
- package/dist/style.css +1 -0
- package/package.json +24 -30
- package/dist/VueSchemaForms.css +0 -1
- package/dist/VueSchemaForms.d.ts +0 -5
- package/dist/VueSchemaForms.d.ts.map +0 -1
- package/dist/components/controls/duplicated-section.vue.d.ts +0 -11
- package/dist/components/controls/duplicated-section.vue.d.ts.map +0 -1
- package/dist/components/controls/text-field.vue.d.ts +0 -11
- package/dist/components/controls/text-field.vue.d.ts.map +0 -1
- package/dist/components/engine/form-node.vue.d.ts +0 -11
- package/dist/components/engine/form-node.vue.d.ts.map +0 -1
- package/dist/components/engine/form-root.vue.d.ts +0 -15
- package/dist/components/engine/form-root.vue.d.ts.map +0 -1
- package/dist/components/engine/vue-schema-forms.vue.d.ts +0 -15
- package/dist/components/engine/vue-schema-forms.vue.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.d.ts.map +0 -1
- package/dist/core/composables/useCalculation.d.ts +0 -2
- package/dist/core/composables/useCalculation.d.ts.map +0 -1
- package/dist/core/composables/useConditionalRendering.d.ts +0 -2
- package/dist/core/composables/useConditionalRendering.d.ts.map +0 -1
- package/dist/core/composables/usePerformanceAPI.d.ts.map +0 -1
- package/dist/core/engine/evalExprParser.d.ts.map +0 -1
- package/dist/core/engine/jsonSchemaResolver.d.ts.map +0 -1
- package/dist/core/engine/utils.d.ts +0 -7
- package/dist/core/engine/utils.d.ts.map +0 -1
- package/dist/index.cjs +0 -111
- package/dist/index.js +0 -16507
- package/dist/lib_main.d.ts +0 -11
- package/dist/plugins/i18n.d.ts +0 -8
- package/dist/plugins/i18n.d.ts.map +0 -1
- package/dist/plugins/vuetify.d.ts +0 -29
- package/dist/plugins/vuetify.d.ts.map +0 -1
- package/dist/stories/controls/TextField.stories.d.ts +0 -43
- package/dist/stories/controls/TextField.stories.d.ts.map +0 -1
- package/dist/stories/development.stories.d.ts +0 -23
- package/dist/stories/development.stories.d.ts.map +0 -1
- package/dist/stories/schemas.d.ts +0 -8
- package/dist/stories/schemas.d.ts.map +0 -1
- package/dist/stories/templates/story-template.d.ts +0 -5
- package/dist/stories/templates/story-template.d.ts.map +0 -1
- package/dist/tests/render.test.d.ts +0 -2
- package/dist/tests/render.test.d.ts.map +0 -1
- package/dist/vocabulary/engine/controls.d.ts.map +0 -1
- package/dist/vocabulary/engine/index.d.ts.map +0 -1
- package/dist/vocabulary/schema/elements.d.ts.map +0 -1
- package/dist/vocabulary/schema/index.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
## Vue3 Json Schema Form powered by Vuetify
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Create dynamic and user-friendly forms effortlessly with the Vue3 and Vuetify.
|
|
3
4
|
This library is designed to simplify form creation by leveraging the JSON Schema format.
|
|
4
5
|
|
|
5
6
|
Inspired by https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
You can install `vue3-schema-forms` using npm:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install vue3-schema-forms
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Basic Usage
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
// index.ts
|
|
21
|
+
import { createVueSchemaForms } from 'vue3-schema-forms';
|
|
22
|
+
|
|
23
|
+
const schemaForms = createVueSchemaForms({});
|
|
24
|
+
|
|
25
|
+
createApp(App)
|
|
26
|
+
.use(schemaForms)
|
|
27
|
+
.mount('#app');
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Po zaimportowaniu pluginu możemy wywołać komponent generujący formularze i przekazać odpowiednie props'y
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
// someComponent.vue
|
|
34
|
+
<vue-schema-forms
|
|
35
|
+
v-model="model"
|
|
36
|
+
:schema="schema"
|
|
37
|
+
:options="formOptions"
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
const formOptions = ref({})
|
|
41
|
+
const model = ref({})
|
|
42
|
+
const schema = ref({
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
field1: {
|
|
46
|
+
label: "Field 1",
|
|
47
|
+
layout: {
|
|
48
|
+
component: "text-field",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
```
|
|
53
|
+
## Documentation
|
|
54
|
+
The documentation and some of the testing was based on the Storybook application [click here](https://maciejdybowski.github.io/vue3-schema-forms/)
|
|
55
|
+
|
|
56
|
+
## Tests
|
|
57
|
+
1. ```cd``` to the project directory
|
|
58
|
+
2. Install development dependencies: ```npm install```
|
|
59
|
+
3. Run the tests: ```npm test```
|
|
60
|
+
4. Run the storybook: ```npm run storybook```
|
|
61
|
+
5. Run storybook tests: ``npm run test-storybook``
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## ToDo List
|
|
65
|
+
- [ ] Create many basics fields like data/radio/checkbox/combo etc.
|
|
66
|
+
- [ ] Create editable sections
|
|
67
|
+
- [ ] Use resolveDepsComposable for deps on fields
|
|
68
|
+
|
|
69
|
+
In progress:
|
|
70
|
+
- [ ] Editable duplicated section, fix width when one field < 12 cols
|
|
71
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../src/main'
|