vue3-schema-forms 0.0.26 → 0.0.28

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 (77) hide show
  1. package/README.md +31 -16
  2. package/package.json +31 -27
  3. package/dist/components/main.d.ts +0 -1
  4. package/dist/main.cjs.js +0 -86
  5. package/dist/main.d.ts +0 -24
  6. package/dist/main.es.js +0 -12377
  7. package/dist/main.umd.js +0 -87
  8. package/dist/src/components/controls/Autocomplete.vue.d.ts +0 -4
  9. package/dist/src/components/controls/Autocomplete.vue.d.ts.map +0 -1
  10. package/dist/src/components/controls/CheckboxButton.vue.d.ts +0 -4
  11. package/dist/src/components/controls/CheckboxButton.vue.d.ts.map +0 -1
  12. package/dist/src/components/controls/RadioButton.vue.d.ts +0 -5
  13. package/dist/src/components/controls/RadioButton.vue.d.ts.map +0 -1
  14. package/dist/src/components/controls/Select.vue.d.ts +0 -4
  15. package/dist/src/components/controls/Select.vue.d.ts.map +0 -1
  16. package/dist/src/components/controls/StaticContent.vue.d.ts +0 -4
  17. package/dist/src/components/controls/StaticContent.vue.d.ts.map +0 -1
  18. package/dist/src/components/controls/TextArea.vue.d.ts +0 -4
  19. package/dist/src/components/controls/TextArea.vue.d.ts.map +0 -1
  20. package/dist/src/components/controls/TextField.vue.d.ts +0 -4
  21. package/dist/src/components/controls/TextField.vue.d.ts.map +0 -1
  22. package/dist/src/components/controls/base/BaseAutocomplete.vue.d.ts +0 -4
  23. package/dist/src/components/controls/base/BaseAutocomplete.vue.d.ts.map +0 -1
  24. package/dist/src/components/controls/base/Pagination.d.ts +0 -19
  25. package/dist/src/components/controls/base/SliceResponse.d.ts +0 -9
  26. package/dist/src/components/controls/duplicated-section/DraggableContextMenu.vue.d.ts +0 -5
  27. package/dist/src/components/controls/duplicated-section/DraggableContextMenu.vue.d.ts.map +0 -1
  28. package/dist/src/components/controls/duplicated-section/DraggableIcon.vue.d.ts +0 -5
  29. package/dist/src/components/controls/duplicated-section/DraggableIcon.vue.d.ts.map +0 -1
  30. package/dist/src/components/controls/duplicated-section/DuplicatedSection.vue.d.ts +0 -5
  31. package/dist/src/components/controls/duplicated-section/DuplicatedSection.vue.d.ts.map +0 -1
  32. package/dist/src/components/controls/duplicated-section/DuplicatedSectionItem.vue.d.ts +0 -4
  33. package/dist/src/components/controls/duplicated-section/DuplicatedSectionItem.vue.d.ts.map +0 -1
  34. package/dist/src/components/controls/editable-section/EditableSection.vue.d.ts +0 -5
  35. package/dist/src/components/controls/editable-section/EditableSection.vue.d.ts.map +0 -1
  36. package/dist/src/components/engine/FormNode.vue.d.ts +0 -4
  37. package/dist/src/components/engine/FormNode.vue.d.ts.map +0 -1
  38. package/dist/src/components/engine/FormRoot.vue.d.ts +0 -4
  39. package/dist/src/components/engine/FormRoot.vue.d.ts.map +0 -1
  40. package/dist/src/components/engine/VueSchemaForms.vue.d.ts +0 -5
  41. package/dist/src/components/engine/VueSchemaForms.vue.d.ts.map +0 -1
  42. package/dist/src/components/index.d.ts +0 -1
  43. package/dist/src/core/composables/useCalculation.d.ts +0 -2
  44. package/dist/src/core/composables/useConditionalRendering.d.ts +0 -2
  45. package/dist/src/core/composables/useDictionarySource.d.ts +0 -30
  46. package/dist/src/core/composables/usePerformanceAPI.d.ts +0 -3
  47. package/dist/src/core/composables/useProps.d.ts +0 -3
  48. package/dist/src/core/composables/useResolveDependency.d.ts +0 -1
  49. package/dist/src/core/composables/useResolveVariables.d.ts +0 -4
  50. package/dist/src/core/composables/useRules.d.ts +0 -2
  51. package/dist/src/core/composables/useSource.d.ts +0 -9
  52. package/dist/src/core/engine/evalExprParser.d.ts +0 -3
  53. package/dist/src/core/engine/jsonSchemaResolver.d.ts +0 -3
  54. package/dist/src/core/engine/utils.d.ts +0 -10
  55. package/dist/src/main.d.ts +0 -9
  56. package/dist/src/stories/controls/Checkbox.stories.d.ts +0 -78
  57. package/dist/src/stories/controls/DuplicatedSection.stories.d.ts +0 -79
  58. package/dist/src/stories/controls/RadioButton.stories.d.ts +0 -78
  59. package/dist/src/stories/controls/Select.stories.d.ts +0 -78
  60. package/dist/src/stories/controls/StaticContent.stories.d.ts +0 -66
  61. package/dist/src/stories/controls/TextArea.stories.d.ts +0 -85
  62. package/dist/src/stories/controls/TextField.stories.d.ts +0 -78
  63. package/dist/src/stories/development.stories.d.ts +0 -44
  64. package/dist/src/stories/features/Calculation.stories.d.ts +0 -90
  65. package/dist/src/stories/features/ConditionalRendering.stories.d.ts +0 -71
  66. package/dist/src/stories/features/Layouts.stories.d.ts +0 -73
  67. package/dist/src/stories/features/Translations.stories.d.ts +0 -72
  68. package/dist/src/stories/features/Validation.stories.d.ts +0 -69
  69. package/dist/src/stories/schemas.d.ts +0 -10
  70. package/dist/src/stories/templates/story-template.d.ts +0 -6
  71. package/dist/src/tests/render.test.d.ts +0 -1
  72. package/dist/src/tests/test-schemas.d.ts +0 -5
  73. package/dist/src/vocabulary/engine/controls.d.ts +0 -20
  74. package/dist/src/vocabulary/engine/index.d.ts +0 -26
  75. package/dist/src/vocabulary/schema/elements.d.ts +0 -68
  76. package/dist/src/vocabulary/schema/index.d.ts +0 -13
  77. package/dist/style.css +0 -1
package/README.md CHANGED
@@ -5,6 +5,12 @@ This library is designed to simplify form creation by leveraging the JSON Schema
5
5
 
6
6
  Inspired by https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
7
7
 
8
+ ## Documentation
9
+
10
+ The documentation and some of the testing was based on the Storybook
11
+ application [click here](https://maciejdybowski.github.io/vue3-schema-forms/)
12
+
13
+ Check the changelog here => [latest](https://maciejdybowski.github.io/vue3-schema-forms/?path=/docs/changelog--docs)
8
14
 
9
15
  ## Installation
10
16
 
@@ -31,11 +37,12 @@ After importing the plugin, we can invoke the form-generating component and pass
31
37
 
32
38
  ```javascript
33
39
  // someComponent.vue
34
- <vue-schema-forms
40
+ <vue-schema-forms
35
41
  v-model="model"
36
- :schema="schema"
37
- :options="formOptions"
38
- />
42
+ :schema = "schema"
43
+ :
44
+ options = "formOptions"
45
+ / >
39
46
 
40
47
  const formOptions = ref({})
41
48
  const model = ref({})
@@ -50,10 +57,25 @@ const schema = ref({
50
57
  },
51
58
  },
52
59
  ```
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/)
60
+
61
+ #### Props description
62
+
63
+ | Name | Default | Type | Description |
64
+ |---------------------|----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
65
+ | model | - | object | json object in which the values collected by the form will be stored |
66
+ | schema | - | Schema | JSON object conforming to the defined Schema interface, is responsible for the appearance, layout and type of fields generated by the form component |
67
+ | options | - | object | JSON object in which the user can define options common to multiple form fields |
68
+ | defaultFormActions | false | boolean | flag, which is responsible for the visibility of the default form buttons in the #formActions slot |
69
+ | validationBehaviour | "scroll" | ValidationBehaviour | A flag that defines the validation behavior after a failed attempt to validate the form. Available options "scroll" / "messages" |
70
+
71
+ #### Component slots
72
+
73
+ | Name | Description |
74
+ |-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
75
+ | formActions | The slot contains predefined default actions for the form: validation, reset validation and reset form. The user is free to override this slot and write his own buttons using exposed functions from the component. Just give "ref" and enjoy a ready-made validation function that takes 3 options: no parameter / scroll / messages [example](https://maciejdybowski.github.io/vue3-schema-forms/?path=/story/forms-features-validations--add-custom-submit-with-built-in-validation) |
55
76
 
56
77
  ## Tests
78
+
57
79
  1. ```cd``` to the project directory
58
80
  2. Install development dependencies: ```npm install```
59
81
  3. Run the tests: ```npm test```
@@ -61,26 +83,19 @@ The documentation and some of the testing was based on the Storybook application
61
83
  5. Run storybook tests: ```npm run test-storybook```
62
84
 
63
85
  ## Contributing
86
+
64
87
  1. Fork it!
65
88
  2. Create your feature branch: ```git checkout -b my-new-feature```
66
89
  3. Commit your changes: ```git commit -am 'Add some feature'```
67
90
  4. Push to the branch: ```git push origin my-new-feature```
68
91
  5. Submit a pull request
69
92
 
70
-
71
93
  ## ToDo List
72
- - [ ] Create many basics fields like data/radio/checkbox/combo etc.
94
+ - [ ] Signal for form is ready (for autosave but after initial model changes)
95
+ - [ ] Create date/datetime field
73
96
  - [ ] Use resolveDepsComposable for deps on fields
74
97
  - [ ] Create editable sections
75
98
  - [ ] Change to use Engine props (decomposition)
76
99
  - [ ] i18n [warnings] how to resolve message -> test on library
77
100
 
78
101
  In progress:
79
- - [ ] section
80
- - [ ] hide fields
81
-
82
-
83
- Przypadki testowe
84
- 1. reset formularza - czy domyślne zostają
85
- 2. reset formularza = null tam gdzie trzeba
86
-
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "vue3-schema-forms",
4
- "version": "0.0.26",
4
+ "version": "0.0.28",
5
5
  "description": "Vue3 Schema Forms powered by Vuetify",
6
6
  "main": "dist/main.umd.js",
7
7
  "module": "dist/main.es.js",
@@ -15,7 +15,7 @@
15
15
  "format": "prettier --write src/",
16
16
  "preview": "vite preview",
17
17
  "storybook": "storybook dev -p 6006",
18
- "test-storybook": "test-storybook",
18
+ "test-storybook": "test-storybook --verbose",
19
19
  "build-storybook": "storybook build -o dist-storybook",
20
20
  "test": "vitest"
21
21
  },
@@ -33,54 +33,58 @@
33
33
  },
34
34
  "homepage": "https://maciejdybowski.github.io/vue3-schema-forms/",
35
35
  "dependencies": {
36
- "@mdi/font": "^7.3.67",
36
+ "@mdi/font": "^7.4.47",
37
37
  "@stoplight/json-ref-resolver": "3.1.6",
38
+ "@vueuse/core": "^10.7.1",
38
39
  "expr-eval": "^2.0.2",
39
40
  "lodash": "^4.17.21",
41
+ "maska": "^2.1.10",
40
42
  "uuid": "^9.0.1",
41
- "vue-json-pretty": "^2.2.4"
43
+ "vue-json-pretty": "^2.3.0"
42
44
  },
43
45
  "peerDependencies": {
44
46
  "axios": "^1.6.2",
45
- "vue": "^3.3.4",
47
+ "dayjs": "^1.11.10",
48
+ "pinia": "2.1.7",
49
+ "vue": "^3.4.3",
46
50
  "vue-i18n": "^9.6.4",
47
51
  "vuedraggable": "^4.1.0",
48
- "vuetify": "^3.4.2"
52
+ "vuetify": "^3.4.9"
49
53
  },
50
54
  "devDependencies": {
51
55
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
52
- "@intlify/unplugin-vue-i18n": "^0.10.1",
53
- "@storybook/addon-essentials": "^7.6.5",
54
- "@storybook/addon-interactions": "^7.6.5",
55
- "@storybook/addon-links": "^7.6.5",
56
- "@storybook/addon-mdx-gfm": "^7.6.5",
57
- "@storybook/blocks": "^7.6.5",
56
+ "@intlify/unplugin-vue-i18n": "2.0.0",
57
+ "@storybook/addon-essentials": "^7.6.7",
58
+ "@storybook/addon-interactions": "^7.6.7",
59
+ "@storybook/addon-links": "^7.6.7",
60
+ "@storybook/addon-mdx-gfm": "^7.6.7",
61
+ "@storybook/blocks": "^7.6.7",
58
62
  "@storybook/jest": "^0.2.3",
59
- "@storybook/manager-api": "^7.6.5",
63
+ "@storybook/manager-api": "^7.6.7",
60
64
  "@storybook/test-runner": "^0.16.0",
61
65
  "@storybook/testing-library": "^0.2.2",
62
- "@storybook/theming": "^7.6.5",
63
- "@storybook/vue3": "^7.6.5",
64
- "@storybook/vue3-vite": "^7.6.5",
66
+ "@storybook/theming": "^7.6.7",
67
+ "@storybook/vue3": "^7.6.7",
68
+ "@storybook/vue3-vite": "^7.6.7",
65
69
  "@types/uuid": "^9.0.7",
66
70
  "@vitejs/plugin-vue": "^4.4.0",
67
- "@vue/test-utils": "^2.4.1",
68
- "eslint": "^8.51.0",
71
+ "@vue/test-utils": "^2.4.3",
72
+ "eslint": "^8.56.0",
69
73
  "eslint-plugin-storybook": "^0.6.15",
70
- "jsdom": "^22.1.0",
71
- "prettier": "2.8.7",
74
+ "jsdom": "^23.0.1",
75
+ "prettier": "3.1.1",
72
76
  "react": "^18.2.0",
73
77
  "react-dom": "^18.2.0",
74
- "remark-gfm": "^3.0.1",
78
+ "remark-gfm": "^4.0.0",
75
79
  "rollup-plugin-typescript2": "^0.36.0",
76
- "storybook": "^7.6.5",
80
+ "sass": "^1.69.6",
81
+ "storybook": "^7.6.7",
77
82
  "storybook-addon-mock": "^4.3.0",
78
- "typescript": "^5.2.2",
83
+ "typescript": "^5.3.3",
79
84
  "vite": "^4.4.11",
80
- "vite-plugin-dts": "^3.6.3",
81
- "vite-plugin-vue-devtools": "^1.0.0-rc.5",
85
+ "vite-plugin-dts": "^3.7.0",
82
86
  "vite-plugin-vuetify": "^1.0.2",
83
- "vitest": "^0.34.6",
84
- "vue-tsc": "^1.8.19"
87
+ "vitest": "^1.1.1",
88
+ "vue-tsc": "^1.8.27"
85
89
  }
86
90
  }
@@ -1 +0,0 @@
1
- export * from '../src/main'