@effect-app/vue-components 0.8.0 → 0.8.2
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/vue-components.es24.js +26 -26
- package/dist/vue-components.es27.js +1 -1
- package/dist/vue-components.es7.js +19 -26
- package/dist/vue-components.es9.js +88 -60
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaErrorsContext.ts +2 -6
- package/src/components/OmegaForm/OmegaFormStuff.ts +39 -4
- package/src/components/OmegaForm/OmegaInputVuetify.vue +5 -1
- package/src/components/OmegaForm/OmegaInternalInput.vue +2 -2
|
@@ -16,41 +16,41 @@ const re = /* @__PURE__ */ q({
|
|
|
16
16
|
validators: {}
|
|
17
17
|
},
|
|
18
18
|
setup(C) {
|
|
19
|
-
const t = C, o = L(), N = o == null ? void 0 : o.appContext.components.VTextField, s = P(), u = t.field, a = J(u.store, (e) => e),
|
|
19
|
+
const t = C, o = L(), N = o == null ? void 0 : o.appContext.components.VTextField, s = P(), u = t.field, a = J(u.store, (e) => e), f = l(() => {
|
|
20
20
|
var e, r;
|
|
21
21
|
return t.type ? t.type : ((e = t.meta) == null ? void 0 : e.type) === "string" ? t.meta.format === "email" ? "email" : "string" : ((r = t.meta) == null ? void 0 : r.type) || "unknown";
|
|
22
|
-
}),
|
|
22
|
+
}), n = l(() => a.value.value), $ = l(
|
|
23
23
|
() => (
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
25
|
a.value.meta.errors.map((e) => e == null ? void 0 : e.message).filter(Boolean)
|
|
26
26
|
)
|
|
27
27
|
), k = (e) => e == null || e === !1 || e === "" || Number.isNaN(e);
|
|
28
28
|
w(
|
|
29
|
-
() => !!
|
|
30
|
-
(
|
|
31
|
-
var
|
|
32
|
-
k(
|
|
33
|
-
var
|
|
29
|
+
() => !!n.value,
|
|
30
|
+
() => {
|
|
31
|
+
var e;
|
|
32
|
+
k(n.value) && ((e = t.meta) == null ? void 0 : e.type) !== "boolean" && F(() => {
|
|
33
|
+
var r;
|
|
34
34
|
u.setValue(
|
|
35
|
-
((
|
|
35
|
+
((r = t.meta) == null ? void 0 : r.nullableOrUndefined) === "undefined" ? void 0 : null
|
|
36
36
|
);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
), x(() => {
|
|
40
40
|
var e, r;
|
|
41
|
-
!
|
|
41
|
+
!n.value && !((e = t.meta) != null && e.required) && ((r = t.meta) == null ? void 0 : r.nullableOrUndefined) === "null" && u.setValue(null);
|
|
42
42
|
});
|
|
43
|
-
const { addError: B, removeError: I, showErrors: O, showErrorsOn: _ } = K(),
|
|
43
|
+
const { addError: B, removeError: I, showErrors: O, showErrorsOn: _ } = K(), i = S(!1);
|
|
44
44
|
T(() => {
|
|
45
|
-
(O.value || _ === "onChange") && (
|
|
45
|
+
(O.value || _ === "onChange") && (i.value = !0);
|
|
46
46
|
});
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const m = () => {
|
|
48
|
+
i.value = !0;
|
|
49
49
|
};
|
|
50
50
|
x(() => {
|
|
51
|
-
|
|
51
|
+
n.value && m();
|
|
52
52
|
});
|
|
53
|
-
const
|
|
53
|
+
const d = l(() => !i.value && f.value !== "select" ? [] : $.value);
|
|
54
54
|
w(
|
|
55
55
|
() => a.value.meta.errors,
|
|
56
56
|
() => {
|
|
@@ -61,36 +61,36 @@ const re = /* @__PURE__ */ q({
|
|
|
61
61
|
}) : I(s);
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const
|
|
65
|
-
var e, r,
|
|
64
|
+
const p = l(() => {
|
|
65
|
+
var e, r, c, v, g, y, h, b, E, V;
|
|
66
66
|
return {
|
|
67
67
|
id: s,
|
|
68
68
|
required: (e = t.meta) == null ? void 0 : e.required,
|
|
69
|
-
minLength: ((r = t.meta) == null ? void 0 : r.type) === "string" && ((
|
|
69
|
+
minLength: ((r = t.meta) == null ? void 0 : r.type) === "string" && ((c = t.meta) == null ? void 0 : c.minLength),
|
|
70
70
|
maxLength: ((v = t.meta) == null ? void 0 : v.type) === "string" && ((g = t.meta) == null ? void 0 : g.maxLength),
|
|
71
71
|
max: ((y = t.meta) == null ? void 0 : y.type) === "number" && ((h = t.meta) == null ? void 0 : h.maximum),
|
|
72
72
|
min: ((b = t.meta) == null ? void 0 : b.type) === "number" && ((E = t.meta) == null ? void 0 : E.minimum),
|
|
73
73
|
name: t.field.name,
|
|
74
74
|
modelValue: t.field.state.value,
|
|
75
|
-
errorMessages:
|
|
76
|
-
error: !!
|
|
75
|
+
errorMessages: d.value,
|
|
76
|
+
error: !!d.value.length,
|
|
77
77
|
field: t.field,
|
|
78
|
-
setRealDirty:
|
|
79
|
-
type:
|
|
78
|
+
setRealDirty: m,
|
|
79
|
+
type: f.value,
|
|
80
80
|
label: `${t.label}${(V = t.meta) != null && V.required ? " *" : ""}`,
|
|
81
81
|
options: t.options
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
return (e, r) => z(e.$slots, "default", A(D(
|
|
84
|
+
return (e, r) => z(e.$slots, "default", A(D(p.value)), () => [
|
|
85
85
|
M("div", {
|
|
86
86
|
class: R(e.$attrs.class),
|
|
87
|
-
onFocusout:
|
|
87
|
+
onFocusout: m
|
|
88
88
|
}, [
|
|
89
89
|
j(N) ? (G(), U(Q, H({
|
|
90
90
|
key: 0,
|
|
91
|
-
"input-props":
|
|
91
|
+
"input-props": p.value
|
|
92
92
|
}, e.$attrs, {
|
|
93
|
-
"vuetify-value":
|
|
93
|
+
"vuetify-value": p.value.field.state.value
|
|
94
94
|
}), null, 16, ["input-props", "vuetify-value"])) : Z("", !0)
|
|
95
95
|
], 34)
|
|
96
96
|
]);
|
|
@@ -71,7 +71,7 @@ const b = /* @__PURE__ */ P({
|
|
|
71
71
|
}, e.$attrs, {
|
|
72
72
|
"model-value": e.vuetifyValue,
|
|
73
73
|
"onUpdate:modelValue": r[1] || (r[1] = (p) => {
|
|
74
|
-
e.inputProps.field.handleChange(Number(p));
|
|
74
|
+
p || p === 0 ? e.inputProps.field.handleChange(Number(p)) : e.inputProps.field.handleChange(void 0);
|
|
75
75
|
})
|
|
76
76
|
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
77
77
|
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(m, i({
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
import { ref as l, computed as p, readonly as v, provide as E, inject as f } from "vue";
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const r = l([]), n = (
|
|
5
|
-
r.value = r.value.filter((d) => d.inputId !==
|
|
6
|
-
}, c = (
|
|
7
|
-
n(
|
|
8
|
-
},
|
|
2
|
+
const s = Symbol();
|
|
3
|
+
function g(o, i, t = "onSubmit") {
|
|
4
|
+
const r = l([]), n = (e) => {
|
|
5
|
+
r.value = r.value.filter((d) => d.inputId !== e);
|
|
6
|
+
}, c = (e) => {
|
|
7
|
+
n(e.inputId), r.value.push(e);
|
|
8
|
+
}, m = () => {
|
|
9
9
|
r.value = [];
|
|
10
|
-
},
|
|
11
|
-
switch (t) {
|
|
12
|
-
case "onChange":
|
|
13
|
-
return !0;
|
|
14
|
-
default:
|
|
15
|
-
return e.value > 0;
|
|
16
|
-
}
|
|
17
|
-
}), s = {
|
|
10
|
+
}, a = p(() => t === "onSubmit" ? o.value > 0 : !0), u = {
|
|
18
11
|
errors: v(r),
|
|
19
12
|
addError: c,
|
|
20
13
|
removeError: n,
|
|
21
|
-
clearErrors:
|
|
22
|
-
showErrors:
|
|
23
|
-
generalErrors:
|
|
14
|
+
clearErrors: m,
|
|
15
|
+
showErrors: a,
|
|
16
|
+
generalErrors: i,
|
|
24
17
|
showErrorsOn: t ?? "onSubmit"
|
|
25
18
|
};
|
|
26
|
-
return E(
|
|
19
|
+
return E(s, u), u;
|
|
27
20
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
21
|
+
function O() {
|
|
22
|
+
const o = f(s);
|
|
23
|
+
if (!o)
|
|
31
24
|
throw new Error("useOmegaErrors must be used within an OmegaForm provider");
|
|
32
|
-
return
|
|
25
|
+
return o;
|
|
33
26
|
}
|
|
34
27
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
s as OmegaErrorsKey,
|
|
29
|
+
g as provideOmegaErrors,
|
|
30
|
+
O as useOmegaErrors
|
|
38
31
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as i, Option as
|
|
2
|
-
import { useIntl as
|
|
3
|
-
const
|
|
1
|
+
import { S as i, Option as g, pipe as y } from "effect-app";
|
|
2
|
+
import { useIntl as v } from "./vue-components.es3.js";
|
|
3
|
+
const x = i.NonEmptyArray(i.String), T = (e) => i.AST.isUnion(e) && e.types.find((t) => t._tag === "UndefinedKeyword" || t === i.Null.ast), h = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((t) => t._tag === "UndefinedKeyword") ? "undefined" : e.types.find((t) => t === i.Null.ast) ? "null" : !1, m = ({ meta: e = {}, parent: t = "", property: n, propertySignatures: r }, u = {}) => {
|
|
4
4
|
if (n && n._tag === "Transformation")
|
|
5
5
|
return m({
|
|
6
6
|
parent: t,
|
|
@@ -12,52 +12,80 @@ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find
|
|
|
12
12
|
meta: e,
|
|
13
13
|
propertySignatures: n.propertySignatures
|
|
14
14
|
});
|
|
15
|
-
if (
|
|
16
|
-
for (const s of
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
if (r) {
|
|
16
|
+
for (const s of r) {
|
|
17
|
+
const o = t ? `${t}.${s.name.toString()}` : s.name.toString(), a = h(s.type), l = !a, p = s.type;
|
|
18
|
+
if (i.AST.isUnion(s.type)) {
|
|
19
|
+
const d = s.type.types.filter(
|
|
20
|
+
(f) => f._tag !== "UndefinedKeyword" && f !== i.Null.ast
|
|
21
|
+
);
|
|
22
|
+
if (d.some(
|
|
23
|
+
(f) => "propertySignatures" in f
|
|
24
|
+
)) {
|
|
25
|
+
const f = m({
|
|
26
|
+
parent: o,
|
|
27
|
+
property: s.type,
|
|
28
|
+
meta: { required: l, nullableOrUndefined: a }
|
|
29
|
+
});
|
|
30
|
+
u[o] = f;
|
|
31
|
+
for (const c of d)
|
|
32
|
+
"propertySignatures" in c && Object.assign(
|
|
33
|
+
u,
|
|
34
|
+
m({
|
|
35
|
+
parent: o,
|
|
36
|
+
propertySignatures: c.propertySignatures,
|
|
37
|
+
meta: { required: l, nullableOrUndefined: a }
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
} else {
|
|
41
|
+
const f = m({
|
|
42
|
+
parent: o,
|
|
43
|
+
property: s.type,
|
|
44
|
+
meta: { required: l, nullableOrUndefined: a }
|
|
45
|
+
});
|
|
46
|
+
u[o] = f;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if ("propertySignatures" in p)
|
|
22
50
|
Object.assign(
|
|
23
|
-
|
|
51
|
+
u,
|
|
24
52
|
m({
|
|
25
|
-
parent:
|
|
26
|
-
propertySignatures:
|
|
27
|
-
meta: { required:
|
|
53
|
+
parent: o,
|
|
54
|
+
propertySignatures: p.propertySignatures,
|
|
55
|
+
meta: { required: l, nullableOrUndefined: a }
|
|
28
56
|
})
|
|
29
57
|
);
|
|
30
58
|
else {
|
|
31
|
-
const
|
|
32
|
-
parent:
|
|
59
|
+
const d = m({
|
|
60
|
+
parent: o,
|
|
33
61
|
property: s.type,
|
|
34
|
-
meta: { required:
|
|
62
|
+
meta: { required: l, nullableOrUndefined: a }
|
|
35
63
|
});
|
|
36
|
-
|
|
64
|
+
u[o] = d;
|
|
37
65
|
}
|
|
38
66
|
}
|
|
39
|
-
return
|
|
67
|
+
return u;
|
|
40
68
|
}
|
|
41
69
|
if (n) {
|
|
42
|
-
const s =
|
|
70
|
+
const s = T(n);
|
|
43
71
|
if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(n)) {
|
|
44
|
-
const
|
|
45
|
-
(
|
|
72
|
+
const a = n.types.find(
|
|
73
|
+
(l) => l._tag !== "UndefinedKeyword" && l !== i.Null.ast
|
|
46
74
|
);
|
|
47
|
-
return "propertySignatures" in
|
|
48
|
-
propertySignatures:
|
|
75
|
+
return "propertySignatures" in a ? m({
|
|
76
|
+
propertySignatures: a.propertySignatures,
|
|
49
77
|
parent: t,
|
|
50
78
|
meta: e
|
|
51
79
|
}) : n.types.every(i.AST.isLiteral) ? {
|
|
52
80
|
...e,
|
|
53
81
|
type: "select",
|
|
54
|
-
members: n.types.map((
|
|
82
|
+
members: n.types.map((l) => l.literal)
|
|
55
83
|
} : {
|
|
56
84
|
...e,
|
|
57
85
|
...m({
|
|
58
86
|
parent: t,
|
|
59
87
|
meta: e,
|
|
60
|
-
property:
|
|
88
|
+
property: a
|
|
61
89
|
})
|
|
62
90
|
};
|
|
63
91
|
}
|
|
@@ -68,11 +96,11 @@ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find
|
|
|
68
96
|
members: n.elements,
|
|
69
97
|
rest: n.rest
|
|
70
98
|
};
|
|
71
|
-
const
|
|
99
|
+
const o = i.AST.getAnnotation(
|
|
72
100
|
n,
|
|
73
101
|
i.AST.JSONSchemaAnnotationId
|
|
74
|
-
).pipe(
|
|
75
|
-
return e = { ...e, ...
|
|
102
|
+
).pipe(g.getOrElse(() => ({})));
|
|
103
|
+
return e = { ...e, ...o }, "from" in n ? m({
|
|
76
104
|
parent: t,
|
|
77
105
|
meta: e,
|
|
78
106
|
property: n.from
|
|
@@ -80,50 +108,50 @@ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find
|
|
|
80
108
|
n,
|
|
81
109
|
i.AST.TitleAnnotationId
|
|
82
110
|
).pipe(
|
|
83
|
-
|
|
111
|
+
g.getOrElse(() => "unknown")
|
|
84
112
|
), e);
|
|
85
113
|
}
|
|
86
|
-
return
|
|
87
|
-
},
|
|
114
|
+
return u;
|
|
115
|
+
}, S = (e) => {
|
|
88
116
|
const t = e.ast, n = {};
|
|
89
117
|
if (t._tag === "Transformation" || t._tag === "Refinement")
|
|
90
|
-
return
|
|
118
|
+
return S(i.make(t.from));
|
|
91
119
|
if ("propertySignatures" in t) {
|
|
92
|
-
const
|
|
120
|
+
const r = m({
|
|
93
121
|
propertySignatures: t.propertySignatures
|
|
94
122
|
});
|
|
95
|
-
if (Object.values(
|
|
96
|
-
return
|
|
97
|
-
const
|
|
98
|
-
for (const
|
|
99
|
-
const
|
|
100
|
-
s[
|
|
123
|
+
if (Object.values(r).every((s) => s && "type" in s))
|
|
124
|
+
return r;
|
|
125
|
+
const u = (s, o = "") => {
|
|
126
|
+
for (const a in s) {
|
|
127
|
+
const l = o ? `${o}.${a}` : a;
|
|
128
|
+
s[a] && typeof s[a] == "object" && "type" in s[a] ? n[l] = s[a] : s[a] && typeof s[a] == "object" && u(s[a], l);
|
|
101
129
|
}
|
|
102
130
|
};
|
|
103
|
-
|
|
131
|
+
u(r);
|
|
104
132
|
}
|
|
105
133
|
return n;
|
|
106
|
-
},
|
|
107
|
-
const t =
|
|
134
|
+
}, M = (e) => i.extend(e, i.Struct({})), N = (e) => {
|
|
135
|
+
const t = S(e), n = y(
|
|
108
136
|
e.ast,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
({ items:
|
|
137
|
+
g.liftPredicate((r) => r._tag === "Refinement" && "filter" in r),
|
|
138
|
+
g.flatMap((r) => i.AST.getJSONSchemaAnnotation(r)),
|
|
139
|
+
g.filter((r) => "items" in r),
|
|
140
|
+
g.filterMap(
|
|
141
|
+
({ items: r }) => i.decodeUnknownOption(x)(r)
|
|
114
142
|
),
|
|
115
|
-
|
|
143
|
+
g.zipWith(
|
|
116
144
|
i.AST.getMessageAnnotation(e.ast),
|
|
117
|
-
(
|
|
118
|
-
items:
|
|
119
|
-
message:
|
|
145
|
+
(r, u) => ({
|
|
146
|
+
items: r,
|
|
147
|
+
message: u("")
|
|
120
148
|
})
|
|
121
149
|
),
|
|
122
|
-
|
|
150
|
+
g.getOrUndefined
|
|
123
151
|
);
|
|
124
152
|
return { schema: e, meta: t, filterItems: n };
|
|
125
|
-
},
|
|
126
|
-
const { trans: t } =
|
|
153
|
+
}, L = (e) => {
|
|
154
|
+
const { trans: t } = v();
|
|
127
155
|
let n;
|
|
128
156
|
switch (e.type) {
|
|
129
157
|
case "string":
|
|
@@ -205,7 +233,7 @@ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find
|
|
|
205
233
|
message: () => t("validation.empty")
|
|
206
234
|
})
|
|
207
235
|
) : n = i.NullishOr(n), i.standardSchemaV1(n);
|
|
208
|
-
},
|
|
236
|
+
}, U = (e, t) => i.NullOr(e).pipe(
|
|
209
237
|
i.transform(i.typeSchema(e), {
|
|
210
238
|
decode: (n) => n ?? t(),
|
|
211
239
|
encode: (n) => n
|
|
@@ -213,8 +241,8 @@ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find
|
|
|
213
241
|
);
|
|
214
242
|
export {
|
|
215
243
|
m as createMeta,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
244
|
+
M as duplicateSchema,
|
|
245
|
+
L as generateInputStandardSchemaFromFieldMeta,
|
|
246
|
+
N as generateMetaFromSchema,
|
|
247
|
+
U as nullableInput
|
|
220
248
|
};
|
package/package.json
CHANGED
|
@@ -45,12 +45,8 @@ export function provideOmegaErrors(
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const showErrors = computed(() => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return true
|
|
51
|
-
default:
|
|
52
|
-
return formSubmissionAttempts.value > 0
|
|
53
|
-
}
|
|
48
|
+
if (showErrorsOn === "onSubmit") return formSubmissionAttempts.value > 0
|
|
49
|
+
return true
|
|
54
50
|
})
|
|
55
51
|
|
|
56
52
|
const context = {
|
|
@@ -257,13 +257,48 @@ export const createMeta = <T = any>(
|
|
|
257
257
|
const nullableOrUndefined = isNullableOrUndefined(p.type)
|
|
258
258
|
const isRequired = !nullableOrUndefined
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
const typeToProcess = p.type
|
|
261
261
|
if (S.AST.isUnion(p.type)) {
|
|
262
|
-
|
|
262
|
+
const nonNullTypes = p.type.types.filter(
|
|
263
263
|
t => t._tag !== "UndefinedKeyword" && t !== S.Null.ast,
|
|
264
|
-
)
|
|
265
|
-
}
|
|
264
|
+
)
|
|
266
265
|
|
|
266
|
+
const hasStructMembers = nonNullTypes.some(
|
|
267
|
+
t => "propertySignatures" in t,
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
if (hasStructMembers) {
|
|
271
|
+
// Create metadata for the parent level (the union itself)
|
|
272
|
+
const parentMeta = createMeta<T>({
|
|
273
|
+
parent: key,
|
|
274
|
+
property: p.type,
|
|
275
|
+
meta: { required: isRequired, nullableOrUndefined },
|
|
276
|
+
})
|
|
277
|
+
acc[key as NestedKeyOf<T>] = parentMeta as FieldMeta
|
|
278
|
+
|
|
279
|
+
// Process each non-null type and merge their metadata
|
|
280
|
+
for (const nonNullType of nonNullTypes) {
|
|
281
|
+
if ("propertySignatures" in nonNullType) {
|
|
282
|
+
Object.assign(
|
|
283
|
+
acc,
|
|
284
|
+
createMeta<T>({
|
|
285
|
+
parent: key,
|
|
286
|
+
propertySignatures: nonNullType.propertySignatures,
|
|
287
|
+
meta: { required: isRequired, nullableOrUndefined },
|
|
288
|
+
}),
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
} else {
|
|
293
|
+
// If no struct members, process as regular union
|
|
294
|
+
const newMeta = createMeta<T>({
|
|
295
|
+
parent: key,
|
|
296
|
+
property: p.type,
|
|
297
|
+
meta: { required: isRequired, nullableOrUndefined },
|
|
298
|
+
})
|
|
299
|
+
acc[key as NestedKeyOf<T>] = newMeta as FieldMeta
|
|
300
|
+
}
|
|
301
|
+
}
|
|
267
302
|
if ("propertySignatures" in typeToProcess) {
|
|
268
303
|
Object.assign(
|
|
269
304
|
acc,
|
|
@@ -63,7 +63,11 @@
|
|
|
63
63
|
:model-value="vuetifyValue"
|
|
64
64
|
@update:model-value="
|
|
65
65
|
(e: any) => {
|
|
66
|
-
|
|
66
|
+
if (e || e === 0) {
|
|
67
|
+
inputProps.field.handleChange(Number(e))
|
|
68
|
+
} else {
|
|
69
|
+
inputProps.field.handleChange(undefined)
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
"
|
|
69
73
|
/>
|
|
@@ -79,8 +79,8 @@ const isFalsyButNotZero = (value: unknown): boolean => {
|
|
|
79
79
|
//watchEffect will trigger infinite times with both free fieldValue and errors, so bet to watch a stupid boolean
|
|
80
80
|
watch(
|
|
81
81
|
() => !!fieldValue.value,
|
|
82
|
-
|
|
83
|
-
if (isFalsyButNotZero(value) && props.meta?.type !== "boolean") {
|
|
82
|
+
() => {
|
|
83
|
+
if (isFalsyButNotZero(fieldValue.value) && props.meta?.type !== "boolean") {
|
|
84
84
|
nextTick(() => {
|
|
85
85
|
fieldApi.setValue(
|
|
86
86
|
props.meta?.nullableOrUndefined === "undefined" ? undefined : null,
|