@volverjs/form-vue 1.0.0-beta.7 → 1.0.0-beta.8
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/dist/index.es.js +129 -132
- package/dist/index.umd.js +1 -1
- package/dist/src/VvForm.d.ts +83 -124
- package/dist/src/VvFormField.d.ts +1 -1
- package/dist/src/VvFormTemplate.d.ts +22 -54
- package/dist/src/VvFormWrapper.d.ts +45 -80
- package/dist/src/index.d.ts +491 -815
- package/package.json +21 -21
- package/src/VvFormField.ts +5 -6
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/volverjs/form-vue/issues"
|
|
21
21
|
},
|
|
22
|
-
"version": "1.0.0-beta.
|
|
22
|
+
"version": "1.0.0-beta.8",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">= 16.x"
|
|
25
25
|
},
|
|
@@ -35,35 +35,35 @@
|
|
|
35
35
|
"*.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@volverjs/ui-vue": "
|
|
39
|
-
"@vueuse/core": "^10.
|
|
38
|
+
"@volverjs/ui-vue": "0.0.10-beta.27",
|
|
39
|
+
"@vueuse/core": "^10.7.2",
|
|
40
40
|
"ts-dot-prop": "^2.1.3",
|
|
41
|
-
"vue": "^3.
|
|
41
|
+
"vue": "^3.4.15",
|
|
42
42
|
"zod": "^3.22.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@playwright/experimental-ct-vue": "1.
|
|
45
|
+
"@playwright/experimental-ct-vue": "1.41.1",
|
|
46
46
|
"@testing-library/vue": "^8.0.1",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
48
|
-
"@vitejs/plugin-vue": "^
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
|
48
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
49
49
|
"@volverjs/style": "^0.1.11",
|
|
50
|
-
"@vue/compiler-sfc": "^3.
|
|
50
|
+
"@vue/compiler-sfc": "^3.4.15",
|
|
51
51
|
"@vue/eslint-config-typescript": "^12.0.0",
|
|
52
|
-
"@vue/runtime-core": "^3.
|
|
53
|
-
"@vue/test-utils": "^2.4.
|
|
52
|
+
"@vue/runtime-core": "^3.4.15",
|
|
53
|
+
"@vue/test-utils": "^2.4.4",
|
|
54
54
|
"copy": "^0.3.2",
|
|
55
|
-
"eslint": "^8.
|
|
56
|
-
"eslint-config-prettier": "^9.
|
|
57
|
-
"eslint-plugin-prettier": "^5.
|
|
58
|
-
"eslint-plugin-vue": "^9.
|
|
59
|
-
"happy-dom": "^
|
|
60
|
-
"prettier": "^3.
|
|
61
|
-
"typescript": "^5.3.
|
|
62
|
-
"vite": "^5.0.
|
|
63
|
-
"vite-plugin-dts": "^3.
|
|
55
|
+
"eslint": "^8.56.0",
|
|
56
|
+
"eslint-config-prettier": "^9.1.0",
|
|
57
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
58
|
+
"eslint-plugin-vue": "^9.21.0",
|
|
59
|
+
"happy-dom": "^13.3.5",
|
|
60
|
+
"prettier": "^3.2.4",
|
|
61
|
+
"typescript": "^5.3.3",
|
|
62
|
+
"vite": "^5.0.12",
|
|
63
|
+
"vite-plugin-dts": "^3.7.2",
|
|
64
64
|
"vite-plugin-eslint": "^1.8.1",
|
|
65
|
-
"vite-plugin-externalize-deps": "^0.
|
|
66
|
-
"vitest": "^
|
|
65
|
+
"vite-plugin-externalize-deps": "^0.8.0",
|
|
66
|
+
"vitest": "^1.2.2"
|
|
67
67
|
},
|
|
68
68
|
"typesVersions": {
|
|
69
69
|
"*": {
|
package/src/VvFormField.ts
CHANGED
|
@@ -191,14 +191,11 @@ export const defineFormField = <Schema extends FormSchema>(
|
|
|
191
191
|
)
|
|
192
192
|
})
|
|
193
193
|
const isReadonly = computed(() => {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if (fieldReadonly === undefined) {
|
|
197
|
-
return injectedFormData?.readonly.value
|
|
194
|
+
if (injectedFormData?.readonly.value) {
|
|
195
|
+
return true
|
|
198
196
|
}
|
|
199
|
-
return
|
|
197
|
+
return hasFieldProps.value.readonly ?? props.readonly
|
|
200
198
|
})
|
|
201
|
-
|
|
202
199
|
const hasProps = computed(() => ({
|
|
203
200
|
...hasFieldProps.value,
|
|
204
201
|
name: hasFieldProps.value.name ?? props.name,
|
|
@@ -234,11 +231,13 @@ export const defineFormField = <Schema extends FormSchema>(
|
|
|
234
231
|
'onUpdate:modelValue': onUpdate,
|
|
235
232
|
}))
|
|
236
233
|
|
|
234
|
+
// provide data to children
|
|
237
235
|
provide(formFieldInjectionKey, {
|
|
238
236
|
name: readonly(fieldName as Ref<string>),
|
|
239
237
|
errors: readonly(errors),
|
|
240
238
|
})
|
|
241
239
|
|
|
240
|
+
// load component
|
|
242
241
|
const component = computed(() => {
|
|
243
242
|
if (props.type === FormFieldType.custom) {
|
|
244
243
|
return {
|