@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/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.7",
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": "^0.0.9",
39
- "@vueuse/core": "^10.6.1",
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.3.8",
41
+ "vue": "^3.4.15",
42
42
  "zod": "^3.22.4"
43
43
  },
44
44
  "devDependencies": {
45
- "@playwright/experimental-ct-vue": "1.40.0",
45
+ "@playwright/experimental-ct-vue": "1.41.1",
46
46
  "@testing-library/vue": "^8.0.1",
47
- "@typescript-eslint/eslint-plugin": "^6.12.0",
48
- "@vitejs/plugin-vue": "^4.5.0",
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.3.8",
50
+ "@vue/compiler-sfc": "^3.4.15",
51
51
  "@vue/eslint-config-typescript": "^12.0.0",
52
- "@vue/runtime-core": "^3.3.8",
53
- "@vue/test-utils": "^2.4.2",
52
+ "@vue/runtime-core": "^3.4.15",
53
+ "@vue/test-utils": "^2.4.4",
54
54
  "copy": "^0.3.2",
55
- "eslint": "^8.54.0",
56
- "eslint-config-prettier": "^9.0.0",
57
- "eslint-plugin-prettier": "^5.0.1",
58
- "eslint-plugin-vue": "^9.18.1",
59
- "happy-dom": "^12.10.3",
60
- "prettier": "^3.1.0",
61
- "typescript": "^5.3.2",
62
- "vite": "^5.0.2",
63
- "vite-plugin-dts": "^3.6.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.7.0",
66
- "vitest": "^0.34.6"
65
+ "vite-plugin-externalize-deps": "^0.8.0",
66
+ "vitest": "^1.2.2"
67
67
  },
68
68
  "typesVersions": {
69
69
  "*": {
@@ -191,14 +191,11 @@ export const defineFormField = <Schema extends FormSchema>(
191
191
  )
192
192
  })
193
193
  const isReadonly = computed(() => {
194
- const fieldReadonly =
195
- hasFieldProps.value.readonly ?? props.readonly
196
- if (fieldReadonly === undefined) {
197
- return injectedFormData?.readonly.value
194
+ if (injectedFormData?.readonly.value) {
195
+ return true
198
196
  }
199
- return fieldReadonly
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 {