@effect-app/vue-components 4.0.0-beta.280 → 4.0.0-beta.282
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.
|
@@ -13,23 +13,26 @@ var _ = /*@__PURE__*/ o({
|
|
|
13
13
|
inputClass: {}
|
|
14
14
|
},
|
|
15
15
|
setup(o) {
|
|
16
|
-
let _ = o, v = n(() =>
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
let _ = o, v = n(() => ({
|
|
17
|
+
label: _.label,
|
|
18
|
+
validators: _.validators
|
|
19
|
+
})), y = n(() => _.name), b = h(), x = n(() => {
|
|
20
|
+
if (_.inputClass !== null) return _.inputClass === void 0 ? b.class : _.inputClass;
|
|
21
|
+
}), S = c("getMetaFromArray", null), C = n(() => S?.value && S.value(_.name) ? S.value(y.value) : _.form.meta[y.value]), w = e(_.form);
|
|
19
22
|
return (e, n) => (d(), r(p(o.form.Field), {
|
|
20
23
|
name: o.name,
|
|
21
24
|
validators: o.validators
|
|
22
25
|
}, {
|
|
23
|
-
default: g(({ field: n }) => [
|
|
26
|
+
default: g(({ field: n }) => [C.value ? (d(), r(t, l({ key: 0 }, {
|
|
24
27
|
...e.$attrs,
|
|
25
|
-
...
|
|
26
|
-
inputClass:
|
|
28
|
+
...v.value,
|
|
29
|
+
inputClass: x.value
|
|
27
30
|
}, {
|
|
28
31
|
field: n,
|
|
29
32
|
state: n.state,
|
|
30
33
|
register: o.form.registerField,
|
|
31
|
-
label: o.label ?? m(
|
|
32
|
-
meta:
|
|
34
|
+
label: o.label ?? m(w)(y.value),
|
|
35
|
+
meta: C.value
|
|
33
36
|
}), a({
|
|
34
37
|
default: g((t) => [f(e.$slots, "default", u(s(t)))]),
|
|
35
38
|
_: 2
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.282",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
|
-
"effect": "^4.0.0-beta.
|
|
6
|
+
"effect": "^4.0.0-beta.88",
|
|
7
7
|
"intl-messageformat": "^11.2.7",
|
|
8
8
|
"mdi-js": "^1.0.1",
|
|
9
9
|
"primeflex": "^4.0.0",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"highlight.js": "^11.11.1",
|
|
57
57
|
"mitt": "^3.0.1",
|
|
58
58
|
"vue3-highlightjs": "^1.0.5",
|
|
59
|
-
"@effect-app/vue": "4.0.0-beta.
|
|
60
|
-
"effect-app": "4.0.0-beta.
|
|
59
|
+
"@effect-app/vue": "4.0.0-beta.282",
|
|
60
|
+
"effect-app": "4.0.0-beta.282"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"check": "vue-tsc",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<template #default="{ field }">
|
|
14
14
|
<OmegaInternalInput
|
|
15
15
|
v-if="meta"
|
|
16
|
-
v-bind="{ ...$attrs,
|
|
16
|
+
v-bind="{ ...$attrs, ...internalInputProps, inputClass: computedClass }"
|
|
17
17
|
:field="field as any"
|
|
18
18
|
:state="field.state"
|
|
19
19
|
:register="form.registerField"
|
|
@@ -51,6 +51,10 @@ import OmegaInternalInput from "./OmegaInternalInput.vue"
|
|
|
51
51
|
import { type OmegaInputPropsBase } from "./types"
|
|
52
52
|
|
|
53
53
|
const props = defineProps<OmegaInputPropsBase<From, To, Name>>()
|
|
54
|
+
const internalInputProps = computed(() => ({
|
|
55
|
+
label: props.label,
|
|
56
|
+
validators: props.validators
|
|
57
|
+
}))
|
|
54
58
|
|
|
55
59
|
// downgrade to *as* DeepKeys<From> to avoid useless and possible infinite recursion in TS
|
|
56
60
|
const propsName = computed(() => props.name as DeepKeys<From>)
|
|
@@ -109,7 +109,7 @@ export const defaultsValueFromSchema = (
|
|
|
109
109
|
continue
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const propSchema = S.make(propType)
|
|
112
|
+
const propSchema = S.make<any>(propType)
|
|
113
113
|
const propValue = defaultsValueFromSchema(propSchema, record[key] || {})
|
|
114
114
|
|
|
115
115
|
if (propValue !== undefined) {
|