@effect-app/vue-components 2.9.1 → 2.10.0
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/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +2 -1
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +2 -0
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +1 -0
- package/dist/vue-components.es.js +17 -15
- package/dist/vue-components.es10.js +91 -93
- package/dist/vue-components.es12.js +282 -204
- package/dist/vue-components.es16.js +4 -10
- package/dist/vue-components.es17.js +10 -97
- package/dist/vue-components.es2.js +29 -27
- package/dist/vue-components.es20.js +2 -2
- package/dist/vue-components.es21.js +5 -5
- package/dist/vue-components.es22.js +1 -1
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es30.js +191 -41
- package/dist/vue-components.es32.js +42 -2
- package/dist/vue-components.es33.js +1 -1
- package/dist/vue-components.es34.js +2 -111
- package/dist/vue-components.es35.js +113 -0
- package/dist/vue-components.es37.js +7 -32
- package/dist/vue-components.es38.js +34 -0
- package/dist/vue-components.es40.js +6 -0
- package/dist/vue-components.es41.js +23 -4
- package/dist/vue-components.es42.js +5 -23
- package/dist/vue-components.es43.js +21 -5
- package/dist/vue-components.es44.js +25 -16
- package/dist/vue-components.es45.js +15 -23
- package/dist/vue-components.es46.js +7 -17
- package/dist/vue-components.es47.js +5 -12
- package/dist/vue-components.es48.js +19 -5
- package/dist/vue-components.es49.js +9 -19
- package/dist/vue-components.es50.js +31 -9
- package/dist/vue-components.es51.js +42 -25
- package/dist/vue-components.es52.js +16 -38
- package/dist/vue-components.es53.js +11 -26
- package/dist/vue-components.es54.js +65 -11
- package/dist/vue-components.es55.js +45 -54
- package/dist/vue-components.es56.js +15 -54
- package/dist/vue-components.es57.js +31 -15
- package/dist/vue-components.es58.js +26 -30
- package/dist/vue-components.es59.js +42 -29
- package/dist/vue-components.es60.js +2 -42
- package/dist/vue-components.es61.js +44 -2
- package/dist/vue-components.es62.js +2 -44
- package/dist/vue-components.es7.js +1 -1
- package/dist/vue-components.es9.js +10 -33
- package/package.json +3 -3
- package/src/components/OmegaForm/OmegaArray.vue +1 -6
- package/src/components/OmegaForm/OmegaAutoGen.vue +2 -3
- package/src/components/OmegaForm/OmegaFormInput.vue +1 -5
- package/src/components/OmegaForm/OmegaFormStuff.ts +174 -11
- package/src/components/OmegaForm/OmegaInput.vue +1 -6
- package/src/components/OmegaForm/OmegaTaggedUnion.vue +2 -4
- package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +1 -53
- package/src/components/OmegaForm/OmegaWrapper.vue +2 -4
- package/src/components/OmegaForm/useOmegaForm.ts +16 -8
- package/dist/types/components/OmegaForm/defaultAST.d.ts +0 -4
- package/dist/vue-components.es31.js +0 -6
- package/dist/vue-components.es36.js +0 -9
- package/dist/vue-components.es39.js +0 -194
- package/dist/vue-components.es63.js +0 -4
- package/src/components/OmegaForm/defaultAST.ts +0 -191
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import { Order } from "effect-app";
|
|
3
3
|
import { type OmegaAutoGenMeta, type OmegaInputProps } from "./OmegaFormStuff";
|
|
4
|
-
declare const __VLS_export:
|
|
4
|
+
declare const __VLS_export: <// dprint-ignore
|
|
5
|
+
From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>, Name extends DeepKeys<From>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
6
|
props: __VLS_PrettifyLocal<{
|
|
6
7
|
form: OmegaInputProps<From, To, Name>["form"];
|
|
7
8
|
pick?: DeepKeys<From>[];
|
|
@@ -151,4 +151,6 @@ export type OmegaAutoGenMeta<From extends Record<PropertyKey, any>, To extends R
|
|
|
151
151
|
declare const supportedInputs: readonly ["button", "checkbox", "color", "date", "email", "number", "password", "radio", "range", "search", "submit", "tel", "text", "time", "url"];
|
|
152
152
|
export type SupportedInputs = typeof supportedInputs[number];
|
|
153
153
|
export declare const getInputType: (input: string) => SupportedInputs;
|
|
154
|
+
export declare function deepMerge(target: any, source: any): any;
|
|
155
|
+
export declare const defaultsValueFromSchema: (schema: S.Schema<any>, record?: Record<string, any>) => any;
|
|
154
156
|
export {};
|
|
@@ -46,6 +46,7 @@ export type OmegaConfig<T> = {
|
|
|
46
46
|
*/
|
|
47
47
|
preventWindowExit?: "prevent" | "prevent-and-reset" | "nope";
|
|
48
48
|
input?: any;
|
|
49
|
+
defaultFromSchema?: "only" | "nope" | "merge";
|
|
49
50
|
};
|
|
50
51
|
export interface OF<From, To> extends OmegaFormApi<From, To> {
|
|
51
52
|
meta: MetaRecord<From>;
|
|
@@ -5,11 +5,11 @@ import { default as g } from "./vue-components.es5.js";
|
|
|
5
5
|
import { default as I } from "./vue-components.es6.js";
|
|
6
6
|
import { default as y } from "./vue-components.es7.js";
|
|
7
7
|
import { default as h } from "./vue-components.es8.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { useOmegaForm as
|
|
10
|
-
import { useOnClose as
|
|
11
|
-
import { createMeta as P,
|
|
12
|
-
import { createUseFormWithCustomInput as
|
|
8
|
+
import { default as b } from "./vue-components.es9.js";
|
|
9
|
+
import { useOmegaForm as M } from "./vue-components.es10.js";
|
|
10
|
+
import { useOnClose as U, usePreventClose as j } from "./vue-components.es11.js";
|
|
11
|
+
import { createMeta as P, deepMerge as V, defaultsValueFromSchema as k, duplicateSchema as w, generateInputStandardSchemaFromFieldMeta as B, generateMetaFromSchema as D, getInputType as K, isNullableOrUndefined as N, nullableInput as W } from "./vue-components.es12.js";
|
|
12
|
+
import { createUseFormWithCustomInput as q } from "./vue-components.es13.js";
|
|
13
13
|
function r(a) {
|
|
14
14
|
for (const e in o)
|
|
15
15
|
if (Object.prototype.hasOwnProperty.call(o, e)) {
|
|
@@ -23,22 +23,24 @@ export {
|
|
|
23
23
|
g as Dialog,
|
|
24
24
|
I as OmegaInput,
|
|
25
25
|
h as OmegaTaggedUnion,
|
|
26
|
-
|
|
26
|
+
b as OmegaTaggedUnionInternal,
|
|
27
27
|
y as OmegaVuetifyInput,
|
|
28
28
|
P as createMeta,
|
|
29
|
-
|
|
29
|
+
q as createUseFormWithCustomInput,
|
|
30
|
+
V as deepMerge,
|
|
30
31
|
n as default,
|
|
31
|
-
k as
|
|
32
|
-
w as
|
|
33
|
-
B as
|
|
34
|
-
D as
|
|
32
|
+
k as defaultsValueFromSchema,
|
|
33
|
+
w as duplicateSchema,
|
|
34
|
+
B as generateInputStandardSchemaFromFieldMeta,
|
|
35
|
+
D as generateMetaFromSchema,
|
|
36
|
+
K as getInputType,
|
|
35
37
|
f as getTransformationFrom,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
N as isNullableOrUndefined,
|
|
39
|
+
W as nullableInput,
|
|
38
40
|
l as provideIntl,
|
|
39
41
|
u as useIntl,
|
|
40
42
|
s as useIntlKey,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
M as useOmegaForm,
|
|
44
|
+
U as useOnClose,
|
|
43
45
|
j as usePreventClose
|
|
44
46
|
};
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { useForm as
|
|
2
|
-
import { Data as
|
|
3
|
-
import { runtimeFiberAsPromise as
|
|
4
|
-
import { computed as
|
|
5
|
-
import { deepMerge as O, extractSchemaDefaults as Q } from "./vue-components.es17.js";
|
|
1
|
+
import { useForm as B } from "@tanstack/vue-form";
|
|
2
|
+
import { Data as K, S as N, Effect as c, Fiber as V, Option as _, Array as F } from "effect-app";
|
|
3
|
+
import { runtimeFiberAsPromise as T } from "./vue-components.es17.js";
|
|
4
|
+
import { computed as L, onUnmounted as W, onMounted as G, onBeforeUnmount as z, watch as D, ref as Q, h as H } from "vue";
|
|
6
5
|
import X from "./vue-components.es18.js";
|
|
7
6
|
import Y from "./vue-components.es19.js";
|
|
8
7
|
import Z from "./vue-components.es20.js";
|
|
9
|
-
import { generateMetaFromSchema as C } from "./vue-components.es12.js";
|
|
8
|
+
import { generateMetaFromSchema as C, deepMerge as P, defaultsValueFromSchema as R } from "./vue-components.es12.js";
|
|
10
9
|
import ee from "./vue-components.es6.js";
|
|
11
10
|
import re from "./vue-components.es8.js";
|
|
12
11
|
import te from "./vue-components.es21.js";
|
|
13
|
-
import { trace as
|
|
14
|
-
import { context as
|
|
15
|
-
class se extends
|
|
12
|
+
import { trace as k } from "./vue-components.es22.js";
|
|
13
|
+
import { context as x } from "./vue-components.es23.js";
|
|
14
|
+
class se extends K.TaggedError("FormErrors") {
|
|
16
15
|
}
|
|
17
|
-
const E = (l) => function(
|
|
16
|
+
const E = (l) => function(s) {
|
|
18
17
|
return {
|
|
19
18
|
render() {
|
|
20
|
-
return
|
|
19
|
+
return H(s, {
|
|
21
20
|
form: l,
|
|
22
21
|
...this.$attrs
|
|
23
22
|
}, this.$slots);
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
|
-
}, ne = (l) => function(
|
|
25
|
+
}, ne = (l) => function(s) {
|
|
27
26
|
return {
|
|
28
27
|
setup() {
|
|
29
|
-
const { fieldMap: w, form: v } = l, b = v.useStore((u) => u.errors), m = v.useStore((u) => u.fieldMeta),
|
|
30
|
-
const u =
|
|
28
|
+
const { fieldMap: w, form: v } = l, b = v.useStore((u) => u.errors), m = v.useStore((u) => u.fieldMeta), g = v.useStore((u) => u.errorMap), j = L(() => {
|
|
29
|
+
const u = F.filterMap(
|
|
31
30
|
Object.entries(m.value),
|
|
32
31
|
([M, f]) => {
|
|
33
32
|
const S = f.errors ?? [];
|
|
34
|
-
if (!S.length) return
|
|
33
|
+
if (!S.length) return _.none();
|
|
35
34
|
const a = w.value.get(M);
|
|
36
|
-
return a ?
|
|
35
|
+
return a ? _.some({
|
|
37
36
|
label: a.label,
|
|
38
37
|
inputId: a.id,
|
|
39
38
|
// Only show the first error
|
|
40
39
|
errors: [S[0]?.message].filter(Boolean)
|
|
41
|
-
}) :
|
|
40
|
+
}) : _.none();
|
|
42
41
|
}
|
|
43
|
-
),
|
|
44
|
-
if (
|
|
45
|
-
for (const [M, f] of Object.entries(
|
|
46
|
-
if (
|
|
42
|
+
), n = [];
|
|
43
|
+
if (g.value.onSubmit) {
|
|
44
|
+
for (const [M, f] of Object.entries(g.value.onSubmit))
|
|
45
|
+
if (F.isArray(f) && f.length)
|
|
47
46
|
for (const S of f) {
|
|
48
47
|
const a = S;
|
|
49
|
-
if (a?.path &&
|
|
48
|
+
if (a?.path && F.isArray(a.path) && a.path.length) {
|
|
50
49
|
const y = a.path.join(".");
|
|
51
50
|
if (!w.value.has(y)) {
|
|
52
|
-
|
|
51
|
+
n.push({
|
|
53
52
|
label: y,
|
|
54
53
|
inputId: y,
|
|
55
54
|
errors: [a.message].filter(Boolean)
|
|
@@ -59,154 +58,153 @@ const E = (l) => function(n) {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
|
-
return [...u, ...
|
|
61
|
+
return [...u, ...n];
|
|
63
62
|
});
|
|
64
63
|
return {
|
|
65
64
|
generalErrors: b,
|
|
66
|
-
errors:
|
|
65
|
+
errors: j
|
|
67
66
|
};
|
|
68
67
|
},
|
|
69
68
|
render({ errors: w, generalErrors: v }) {
|
|
70
|
-
return
|
|
69
|
+
return H(s, {
|
|
71
70
|
errors: w,
|
|
72
71
|
generalErrors: v,
|
|
73
72
|
...this.$attrs
|
|
74
73
|
}, this.$slots);
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
|
-
},
|
|
76
|
+
}, we = (l, d, s) => {
|
|
78
77
|
if (!l) throw new Error("Schema is required");
|
|
79
|
-
const w =
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
78
|
+
const w = N.standardSchemaV1(l), v = N.decode(l), { meta: b } = C(l), m = L(() => {
|
|
79
|
+
if (s?.persistency?.id)
|
|
80
|
+
return s.persistency.id;
|
|
82
81
|
const e = window.location.pathname, r = Object.keys(b);
|
|
83
82
|
return `${e}-${r.join("-")}`;
|
|
84
|
-
}),
|
|
83
|
+
}), g = () => {
|
|
85
84
|
const e = new URLSearchParams(window.location.search);
|
|
86
85
|
e.delete(m.value);
|
|
87
86
|
const r = new URL(window.location.href);
|
|
88
87
|
r.search = e.toString(), window.history.replaceState({}, "", r.toString());
|
|
89
|
-
},
|
|
88
|
+
}, j = L(() => {
|
|
90
89
|
let e;
|
|
91
|
-
const r =
|
|
90
|
+
const r = s?.persistency;
|
|
92
91
|
if (
|
|
93
92
|
// query string has higher priority than local/session storage
|
|
94
93
|
r?.policies && !e && (r.policies.includes("local") || r.policies.includes("session"))
|
|
95
94
|
) {
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
95
|
+
const i = r.policies.includes("local") ? localStorage : sessionStorage;
|
|
96
|
+
if (i)
|
|
98
97
|
try {
|
|
99
|
-
const
|
|
100
|
-
|
|
98
|
+
const t = JSON.parse(
|
|
99
|
+
i.getItem(m.value) || "{}"
|
|
101
100
|
);
|
|
102
|
-
|
|
103
|
-
} catch (
|
|
104
|
-
console.error(
|
|
101
|
+
i.removeItem(m.value), e = t;
|
|
102
|
+
} catch (t) {
|
|
103
|
+
console.error(t);
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
if (r?.policies && r.policies.includes("querystring"))
|
|
108
107
|
try {
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
} catch (
|
|
112
|
-
console.error(
|
|
108
|
+
const t = new URLSearchParams(window.location.search).get(m.value);
|
|
109
|
+
g(), t && (e = P(e || {}, JSON.parse(t)));
|
|
110
|
+
} catch (i) {
|
|
111
|
+
console.error(i);
|
|
113
112
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}), u = (e, r) => e ? L.with(R.setSpan(L.active(), e), r) : r(), o = q({
|
|
113
|
+
e ??= {};
|
|
114
|
+
const o = s?.defaultFromSchema === "only" ? R(l) : s?.defaultFromSchema === "nope" ? d?.defaultValues || {} : P(R(l), d?.defaultValues || {});
|
|
115
|
+
return s?.persistency?.overrideDefaultValues ? P(o, e) : P(e, o);
|
|
116
|
+
}), u = (e, r) => e ? x.with(k.setSpan(x.active(), e), r) : r(), n = B({
|
|
119
117
|
...d,
|
|
120
118
|
validators: {
|
|
121
119
|
onSubmit: w,
|
|
122
120
|
...d?.validators || {}
|
|
123
121
|
},
|
|
124
|
-
onSubmit: d?.onSubmit ? ({ formApi: e, meta: r, value:
|
|
125
|
-
const i = await c.runPromise(v(
|
|
122
|
+
onSubmit: d?.onSubmit ? ({ formApi: e, meta: r, value: o }) => u(r?.currentSpan, async () => {
|
|
123
|
+
const i = await c.runPromise(v(o)), t = d.onSubmit({
|
|
126
124
|
formApi: e,
|
|
127
125
|
meta: r,
|
|
128
126
|
value: i
|
|
129
127
|
});
|
|
130
|
-
return
|
|
128
|
+
return V.isFiber(t) && V.isRuntimeFiber(t) ? await T(t) : c.isEffect(t) ? await c.runPromise(
|
|
131
129
|
t.pipe(
|
|
132
130
|
// meta?.currentSpan
|
|
133
131
|
// ? Effect.withParentSpan(meta.currentSpan)
|
|
134
132
|
// : (_) => _,
|
|
135
|
-
c.flatMap((p) =>
|
|
133
|
+
c.flatMap((p) => V.join(p))
|
|
136
134
|
)
|
|
137
135
|
) : t;
|
|
138
136
|
}) : void 0,
|
|
139
|
-
defaultValues:
|
|
137
|
+
defaultValues: j.value
|
|
140
138
|
}), M = () => {
|
|
141
139
|
Object.keys(b).forEach((e) => {
|
|
142
|
-
|
|
140
|
+
n.setFieldValue(e, void 0);
|
|
143
141
|
});
|
|
144
|
-
}, f = (e) => e.reduce((r,
|
|
145
|
-
const i =
|
|
146
|
-
return i.reduce((t, p,
|
|
142
|
+
}, f = (e) => e.reduce((r, o) => {
|
|
143
|
+
const i = o.split(".");
|
|
144
|
+
return i.reduce((t, p, O) => (O === i.length - 1 ? t[p] = n.getFieldValue(o) : t[p] = t[p] ?? {}, t[p]), r), r;
|
|
147
145
|
}, {}), S = (e) => {
|
|
148
146
|
if (e) {
|
|
149
|
-
if (
|
|
147
|
+
if (F.isArray(e.keys))
|
|
150
148
|
return f(e.keys);
|
|
151
|
-
if (
|
|
152
|
-
const r = Object.keys(b).filter((
|
|
149
|
+
if (F.isArray(e.banKeys)) {
|
|
150
|
+
const r = Object.keys(b).filter((o) => e.banKeys?.includes(o));
|
|
153
151
|
return f(r);
|
|
154
152
|
}
|
|
155
|
-
return
|
|
153
|
+
return n.store.state.values;
|
|
156
154
|
}
|
|
157
155
|
}, a = () => {
|
|
158
|
-
const e =
|
|
156
|
+
const e = s?.persistency;
|
|
159
157
|
if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
|
|
160
158
|
const r = e.policies.includes("local") ? localStorage : sessionStorage;
|
|
161
159
|
if (!r) return;
|
|
162
|
-
const
|
|
163
|
-
return r.setItem(m.value, JSON.stringify(
|
|
160
|
+
const o = S(e);
|
|
161
|
+
return r.setItem(m.value, JSON.stringify(o));
|
|
164
162
|
}
|
|
165
163
|
}, y = () => {
|
|
166
|
-
const e =
|
|
164
|
+
const e = s?.persistency;
|
|
167
165
|
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
168
|
-
const r = S(e),
|
|
169
|
-
|
|
166
|
+
const r = S(e), o = new URLSearchParams(window.location.search);
|
|
167
|
+
o.set(m.value, JSON.stringify(r));
|
|
170
168
|
const i = new URL(window.location.href);
|
|
171
|
-
i.search =
|
|
169
|
+
i.search = o.toString(), window.history.replaceState({}, "", i.toString());
|
|
172
170
|
}
|
|
173
|
-
},
|
|
174
|
-
|
|
171
|
+
}, U = (e) => {
|
|
172
|
+
n.store.state.isDirty && e.preventDefault();
|
|
175
173
|
};
|
|
176
|
-
if (
|
|
177
|
-
window.addEventListener("beforeunload", a), window.addEventListener("blur", y),
|
|
178
|
-
}),
|
|
179
|
-
window.removeEventListener("beforeunload", a), window.removeEventListener("blur", y),
|
|
180
|
-
}),
|
|
181
|
-
const e =
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
if (W(a), G(() => {
|
|
175
|
+
window.addEventListener("beforeunload", a), window.addEventListener("blur", y), s?.preventWindowExit && s.preventWindowExit !== "nope" && window.addEventListener("beforeunload", U);
|
|
176
|
+
}), z(() => {
|
|
177
|
+
window.removeEventListener("beforeunload", a), window.removeEventListener("blur", y), s?.preventWindowExit && s.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", U);
|
|
178
|
+
}), s?.preventWindowExit === "prevent-and-reset") {
|
|
179
|
+
const e = n.useStore((t) => t.isSubmitting), r = n.useStore((t) => t.submissionAttempts), o = n.useStore((t) => t.canSubmit), i = n.useStore((t) => t.values);
|
|
180
|
+
D([e, r], ([t, p], [O]) => {
|
|
181
|
+
O && !t && p > 0 && o.value && n.reset(i.value);
|
|
184
182
|
});
|
|
185
183
|
}
|
|
186
184
|
const I = (e) => c.currentSpan.pipe(
|
|
187
185
|
c.option,
|
|
188
186
|
c.flatMap(
|
|
189
|
-
(r) => c.promise(() =>
|
|
187
|
+
(r) => c.promise(() => n.handleSubmit(_.isSome(r) ? { currentSpan: r.value, ...e } : e))
|
|
190
188
|
)
|
|
191
|
-
),
|
|
192
|
-
const r =
|
|
189
|
+
), J = (e) => e?.checkErrors ? I(e?.meta).pipe(c.flatMap(c.fnUntraced(function* () {
|
|
190
|
+
const r = n.getAllErrors();
|
|
193
191
|
if (Object.keys(r.fields).length || r.form.errors.length)
|
|
194
192
|
return yield* new se({ form: r.form, fields: r.fields });
|
|
195
|
-
}))) : I(e?.meta),
|
|
196
|
-
i18nNamespace:
|
|
197
|
-
ignorePreventCloseEvents:
|
|
193
|
+
}))) : I(e?.meta), q = n.handleSubmit, A = Q(/* @__PURE__ */ new Map()), h = Object.assign(n, {
|
|
194
|
+
i18nNamespace: s?.i18nNamespace,
|
|
195
|
+
ignorePreventCloseEvents: s?.ignorePreventCloseEvents,
|
|
198
196
|
meta: b,
|
|
199
197
|
clear: M,
|
|
200
198
|
handleSubmit: (e) => {
|
|
201
|
-
const r =
|
|
202
|
-
return
|
|
199
|
+
const r = k.getSpan(x.active());
|
|
200
|
+
return q({ currentSpan: r, ...e });
|
|
203
201
|
},
|
|
204
202
|
// /** @experimental */
|
|
205
|
-
handleSubmitEffect:
|
|
203
|
+
handleSubmitEffect: J,
|
|
206
204
|
registerField: (e) => {
|
|
207
|
-
|
|
205
|
+
D(e, (r) => A.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }), W(() => A.value.delete(e.value.name));
|
|
208
206
|
}
|
|
209
|
-
}), $ = { form: h, fieldMap:
|
|
207
|
+
}), $ = { form: h, fieldMap: A };
|
|
210
208
|
return Object.assign(h, {
|
|
211
209
|
// Type-level properties for performance optimization (not used at runtime)
|
|
212
210
|
_paths: void 0,
|
|
@@ -214,9 +212,9 @@ const E = (l) => function(n) {
|
|
|
214
212
|
_schema: l,
|
|
215
213
|
errorContext: $,
|
|
216
214
|
Form: E(h)(te),
|
|
217
|
-
Input: E(h)(
|
|
215
|
+
Input: E(h)(s?.input ?? ee),
|
|
218
216
|
TaggedUnion: E(h)(re),
|
|
219
|
-
Field:
|
|
217
|
+
Field: n.Field,
|
|
220
218
|
Errors: ne($)(Z),
|
|
221
219
|
Array: E(h)(X),
|
|
222
220
|
AutoGen: E(h)(Y)
|
|
@@ -224,5 +222,5 @@ const E = (l) => function(n) {
|
|
|
224
222
|
};
|
|
225
223
|
export {
|
|
226
224
|
se as FormErrors,
|
|
227
|
-
|
|
225
|
+
we as useOmegaForm
|
|
228
226
|
};
|