@effect-app/vue-components 2.7.5 → 2.7.6
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/OmegaFormStuff.d.ts +1 -0
- package/dist/vue-components.es.js +12 -11
- package/dist/vue-components.es10.js +99 -88
- package/dist/vue-components.es12.js +1 -0
- package/dist/vue-components.es2.js +14 -13
- package/dist/vue-components.es22.js +1 -1
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es36.js +1 -1
- package/dist/vue-components.es40.js +23 -4
- package/dist/vue-components.es41.js +5 -23
- package/dist/vue-components.es42.js +21 -5
- package/dist/vue-components.es43.js +25 -16
- package/dist/vue-components.es44.js +15 -23
- package/dist/vue-components.es45.js +7 -17
- package/dist/vue-components.es46.js +5 -12
- package/dist/vue-components.es47.js +19 -5
- package/dist/vue-components.es48.js +9 -19
- package/dist/vue-components.es49.js +31 -9
- package/dist/vue-components.es50.js +42 -25
- package/dist/vue-components.es51.js +16 -38
- package/dist/vue-components.es52.js +11 -26
- package/dist/vue-components.es53.js +4 -11
- package/dist/vue-components.es54.js +1 -1
- package/dist/vue-components.es56.js +1 -1
- package/dist/vue-components.es58.js +3 -3
- package/dist/vue-components.es59.js +1 -1
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaFormStuff.ts +1 -1
- package/src/components/OmegaForm/useOmegaForm.ts +14 -4
|
@@ -136,6 +136,7 @@ export type CreateMeta = {
|
|
|
136
136
|
propertySignatures?: never;
|
|
137
137
|
property: S.AST.AST;
|
|
138
138
|
});
|
|
139
|
+
export declare const isNullableOrUndefined: (property: false | S.AST.AST | undefined) => false | "undefined" | "null";
|
|
139
140
|
export declare const createMeta: <T = any>({ meta, parent, property, propertySignatures }: CreateMeta, acc?: Partial<MetaRecord<T>>) => MetaRecord<T> | FieldMeta;
|
|
140
141
|
export declare const duplicateSchema: <From, To>(schema: S.Schema<To, From, never>) => S.extend<S.Schema<To, From, never>, S.Struct<{}>>;
|
|
141
142
|
export declare const generateMetaFromSchema: <From, To>(schema: S.Schema<To, From, never>) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as o from "./vue-components.es2.js";
|
|
2
|
-
import { getTransformationFrom as f, provideIntl as
|
|
2
|
+
import { getTransformationFrom as f, provideIntl as l, useIntl as u, useIntlKey as s } from "./vue-components.es3.js";
|
|
3
3
|
import { default as i } from "./vue-components.es4.js";
|
|
4
4
|
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, duplicateSchema as k, generateInputStandardSchemaFromFieldMeta as w, generateMetaFromSchema as B, getInputType as D,
|
|
8
|
+
import { default as C } from "./vue-components.es9.js";
|
|
9
|
+
import { useOmegaForm as T } from "./vue-components.es10.js";
|
|
10
|
+
import { useOnClose as M, usePreventClose as j } from "./vue-components.es11.js";
|
|
11
|
+
import { createMeta as P, duplicateSchema as k, generateInputStandardSchemaFromFieldMeta as w, generateMetaFromSchema as B, getInputType as D, isNullableOrUndefined as K, nullableInput as N } from "./vue-components.es12.js";
|
|
12
12
|
import { createUseFormWithCustomInput as W } from "./vue-components.es13.js";
|
|
13
13
|
function r(a) {
|
|
14
14
|
for (const e in o)
|
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
g as Dialog,
|
|
24
24
|
I as OmegaInput,
|
|
25
25
|
h as OmegaTaggedUnion,
|
|
26
|
-
|
|
26
|
+
C as OmegaTaggedUnionInternal,
|
|
27
27
|
y as OmegaVuetifyInput,
|
|
28
28
|
P as createMeta,
|
|
29
29
|
W as createUseFormWithCustomInput,
|
|
@@ -33,11 +33,12 @@ export {
|
|
|
33
33
|
B as generateMetaFromSchema,
|
|
34
34
|
D as getInputType,
|
|
35
35
|
f as getTransformationFrom,
|
|
36
|
-
K as
|
|
37
|
-
|
|
38
|
-
l as
|
|
36
|
+
K as isNullableOrUndefined,
|
|
37
|
+
N as nullableInput,
|
|
38
|
+
l as provideIntl,
|
|
39
|
+
u as useIntl,
|
|
39
40
|
s as useIntlKey,
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
T as useOmegaForm,
|
|
42
|
+
M as useOnClose,
|
|
42
43
|
j as usePreventClose
|
|
43
44
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { useForm as G } from "@tanstack/vue-form";
|
|
2
|
-
import { Data as z, S as p, Effect as
|
|
2
|
+
import { Data as z, S as p, Effect as b, Array as g, Fiber as O, Option as x } from "effect-app";
|
|
3
3
|
import { runtimeFiberAsPromise as Q } from "./vue-components.es16.js";
|
|
4
4
|
import { isObject as X } from "./vue-components.es17.js";
|
|
5
|
-
import { computed as
|
|
5
|
+
import { computed as V, onUnmounted as W, onMounted as Y, onBeforeUnmount as Z, watch as H, ref as C, h as q } from "vue";
|
|
6
6
|
import ee from "./vue-components.es18.js";
|
|
7
7
|
import te from "./vue-components.es19.js";
|
|
8
8
|
import re from "./vue-components.es20.js";
|
|
9
|
-
import { generateMetaFromSchema as ne } from "./vue-components.es12.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { trace as
|
|
14
|
-
import { context as
|
|
15
|
-
const _ = (
|
|
16
|
-
const i =
|
|
9
|
+
import { generateMetaFromSchema as ne, isNullableOrUndefined as se } from "./vue-components.es12.js";
|
|
10
|
+
import oe from "./vue-components.es6.js";
|
|
11
|
+
import ie from "./vue-components.es8.js";
|
|
12
|
+
import ae from "./vue-components.es21.js";
|
|
13
|
+
import { trace as J } from "./vue-components.es22.js";
|
|
14
|
+
import { context as L } from "./vue-components.es23.js";
|
|
15
|
+
const _ = (l) => {
|
|
16
|
+
const i = l.ast;
|
|
17
17
|
if (i._tag === "Union") {
|
|
18
18
|
const o = i.types.map((u) => {
|
|
19
|
-
const
|
|
20
|
-
return _(
|
|
19
|
+
const c = p.make(u);
|
|
20
|
+
return _(c).ast;
|
|
21
21
|
}), m = {
|
|
22
22
|
...i,
|
|
23
23
|
types: o
|
|
@@ -25,19 +25,19 @@ const _ = (c) => {
|
|
|
25
25
|
return p.make(m);
|
|
26
26
|
}
|
|
27
27
|
if (i._tag === "Transformation") {
|
|
28
|
-
const o = p.make(i.from), m = p.make(i.to), u = _(o),
|
|
28
|
+
const o = p.make(i.from), m = p.make(i.to), u = _(o), c = _(m), f = {
|
|
29
29
|
...i,
|
|
30
30
|
from: u.ast,
|
|
31
|
-
to:
|
|
31
|
+
to: c.ast
|
|
32
32
|
};
|
|
33
33
|
return p.make(f);
|
|
34
34
|
}
|
|
35
35
|
if (i._tag === "TypeLiteral") {
|
|
36
36
|
const o = i.propertySignatures.map((u) => {
|
|
37
|
-
const
|
|
38
|
-
let f =
|
|
39
|
-
if (
|
|
40
|
-
const k = p.make(
|
|
37
|
+
const c = u.type;
|
|
38
|
+
let f = c;
|
|
39
|
+
if (c._tag === "TypeLiteral" || c._tag === "Union" || c._tag === "Transformation") {
|
|
40
|
+
const k = p.make(c);
|
|
41
41
|
f = _(k).ast;
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
@@ -51,41 +51,41 @@ const _ = (c) => {
|
|
|
51
51
|
};
|
|
52
52
|
return p.make(m);
|
|
53
53
|
}
|
|
54
|
-
return
|
|
54
|
+
return l;
|
|
55
55
|
};
|
|
56
|
-
class
|
|
56
|
+
class le extends z.TaggedError("FormErrors") {
|
|
57
57
|
}
|
|
58
|
-
const M = (
|
|
58
|
+
const M = (l) => function(o) {
|
|
59
59
|
return {
|
|
60
60
|
render() {
|
|
61
|
-
return
|
|
62
|
-
form:
|
|
61
|
+
return q(o, {
|
|
62
|
+
form: l,
|
|
63
63
|
...this.$attrs
|
|
64
64
|
}, this.$slots);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
}, ce = (
|
|
67
|
+
}, ce = (l) => function(o) {
|
|
68
68
|
return {
|
|
69
69
|
setup() {
|
|
70
|
-
const { fieldMap: m, form: u } =
|
|
70
|
+
const { fieldMap: m, form: u } = l, c = u.useStore((S) => S.errors), f = u.useStore((S) => S.fieldMeta), k = u.useStore((S) => S.errorMap), h = V(() => {
|
|
71
71
|
const S = g.filterMap(
|
|
72
72
|
Object.entries(f.value),
|
|
73
|
-
([
|
|
74
|
-
const a =
|
|
75
|
-
if (!a.length) return
|
|
76
|
-
const v = m.value.get(
|
|
77
|
-
return v ?
|
|
73
|
+
([U, w]) => {
|
|
74
|
+
const a = w.errors ?? [];
|
|
75
|
+
if (!a.length) return x.none();
|
|
76
|
+
const v = m.value.get(U);
|
|
77
|
+
return v ? x.some({
|
|
78
78
|
label: v.label,
|
|
79
79
|
inputId: v.id,
|
|
80
80
|
// Only show the first error
|
|
81
81
|
errors: [a[0]?.message].filter(Boolean)
|
|
82
|
-
}) :
|
|
82
|
+
}) : x.none();
|
|
83
83
|
}
|
|
84
84
|
), F = [];
|
|
85
85
|
if (k.value.onSubmit) {
|
|
86
|
-
for (const [
|
|
87
|
-
if (g.isArray(
|
|
88
|
-
for (const a of
|
|
86
|
+
for (const [U, w] of Object.entries(k.value.onSubmit))
|
|
87
|
+
if (g.isArray(w) && w.length)
|
|
88
|
+
for (const a of w) {
|
|
89
89
|
const v = a;
|
|
90
90
|
if (v?.path && g.isArray(v.path) && v.path.length) {
|
|
91
91
|
const A = v.path.join(".");
|
|
@@ -103,24 +103,24 @@ const M = (c) => function(o) {
|
|
|
103
103
|
return [...S, ...F];
|
|
104
104
|
});
|
|
105
105
|
return {
|
|
106
|
-
generalErrors:
|
|
107
|
-
errors:
|
|
106
|
+
generalErrors: c,
|
|
107
|
+
errors: h
|
|
108
108
|
};
|
|
109
109
|
},
|
|
110
110
|
render({ errors: m, generalErrors: u }) {
|
|
111
|
-
return
|
|
111
|
+
return q(o, {
|
|
112
112
|
errors: m,
|
|
113
113
|
generalErrors: u,
|
|
114
114
|
...this.$attrs
|
|
115
115
|
}, this.$slots);
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
-
},
|
|
119
|
-
if (!
|
|
120
|
-
const m = p.standardSchemaV1(
|
|
118
|
+
}, Ae = (l, i, o) => {
|
|
119
|
+
if (!l) throw new Error("Schema is required");
|
|
120
|
+
const m = p.standardSchemaV1(l), u = p.decode(l), { meta: c } = ne(l), f = V(() => {
|
|
121
121
|
if (o?.persistency?.id)
|
|
122
122
|
return o.persistency.id;
|
|
123
|
-
const e = window.location.pathname, t = Object.keys(
|
|
123
|
+
const e = window.location.pathname, t = Object.keys(c);
|
|
124
124
|
return `${e}-${t.join("-")}`;
|
|
125
125
|
}), k = () => {
|
|
126
126
|
const e = new URLSearchParams(window.location.search);
|
|
@@ -128,9 +128,9 @@ const M = (c) => function(o) {
|
|
|
128
128
|
const t = new URL(window.location.href);
|
|
129
129
|
t.search = e.toString(), window.history.replaceState({}, "", t.toString());
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function h(e, t) {
|
|
132
132
|
for (const r in t)
|
|
133
|
-
g.isArray(t[r]) ? e[r] = t[r] : t[r] && X(t[r]) ? (e[r] || (e[r] = {}),
|
|
133
|
+
g.isArray(t[r]) ? e[r] = t[r] : t[r] && X(t[r]) ? (e[r] || (e[r] = {}), h(e[r], t[r])) : e[r] = t[r];
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
const S = (e) => {
|
|
@@ -145,7 +145,7 @@ const M = (c) => function(o) {
|
|
|
145
145
|
for (const n of r) {
|
|
146
146
|
const s = S(n);
|
|
147
147
|
if (Object.keys(s).length > 0 && n?.fields && Object.entries(n.fields).some(
|
|
148
|
-
([y,
|
|
148
|
+
([y, R]) => y === "_tag" || y === "type" || y === "kind" ? R?.ast?.defaultValue !== void 0 : !1
|
|
149
149
|
))
|
|
150
150
|
return s;
|
|
151
151
|
}
|
|
@@ -156,9 +156,20 @@ const M = (c) => function(o) {
|
|
|
156
156
|
if (s?.ast?.defaultValue)
|
|
157
157
|
try {
|
|
158
158
|
const y = s.ast.defaultValue();
|
|
159
|
-
|
|
159
|
+
t[n] = y;
|
|
160
160
|
} catch {
|
|
161
161
|
}
|
|
162
|
+
else {
|
|
163
|
+
const y = s.ast;
|
|
164
|
+
switch (se(y)) {
|
|
165
|
+
case "null":
|
|
166
|
+
t[n] = null;
|
|
167
|
+
break;
|
|
168
|
+
case "undefined":
|
|
169
|
+
t[n] = void 0;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
162
173
|
const d = S(s);
|
|
163
174
|
Object.keys(d).length > 0 && (t[n] && typeof t[n] == "object" ? Object.assign(t[n], d) : t[n] || (t[n] = d));
|
|
164
175
|
}
|
|
@@ -166,19 +177,19 @@ const M = (c) => function(o) {
|
|
|
166
177
|
}, F = (e = {}) => {
|
|
167
178
|
let t = {};
|
|
168
179
|
try {
|
|
169
|
-
const r =
|
|
170
|
-
t = p.encodeSync(_(
|
|
180
|
+
const r = l.make(e);
|
|
181
|
+
t = p.encodeSync(_(l))(r);
|
|
171
182
|
} catch (r) {
|
|
172
183
|
window.location.hostname === "localhost" && console.warn("schema.make() failed, extracting defaults from AST:", r);
|
|
173
184
|
try {
|
|
174
|
-
const n = S(
|
|
175
|
-
t = p.encodeSync(_(
|
|
185
|
+
const n = S(l);
|
|
186
|
+
t = p.encodeSync(_(l))(n);
|
|
176
187
|
} catch (n) {
|
|
177
188
|
window.location.hostname === "localhost" && console.warn("Could not extract defaults from AST:", n);
|
|
178
189
|
}
|
|
179
190
|
}
|
|
180
|
-
return
|
|
181
|
-
},
|
|
191
|
+
return h(t, e);
|
|
192
|
+
}, U = V(() => {
|
|
182
193
|
let e;
|
|
183
194
|
const t = o?.persistency;
|
|
184
195
|
if (
|
|
@@ -199,64 +210,64 @@ const M = (c) => function(o) {
|
|
|
199
210
|
if (t?.policies && t.policies.includes("querystring"))
|
|
200
211
|
try {
|
|
201
212
|
const n = new URLSearchParams(window.location.search).get(f.value);
|
|
202
|
-
k(), n && (e =
|
|
213
|
+
k(), n && (e = h(e || {}, JSON.parse(n)));
|
|
203
214
|
} catch (r) {
|
|
204
215
|
console.error(r);
|
|
205
216
|
}
|
|
206
217
|
return e ??= {}, F(
|
|
207
|
-
o?.persistency?.overrideDefaultValues ?
|
|
218
|
+
o?.persistency?.overrideDefaultValues ? h(i?.defaultValues || {}, e) : h(e, i?.defaultValues || {})
|
|
208
219
|
);
|
|
209
|
-
}),
|
|
220
|
+
}), w = (e, t) => e ? L.with(J.setSpan(L.active(), e), t) : t(), a = G({
|
|
210
221
|
...i,
|
|
211
222
|
validators: {
|
|
212
223
|
onSubmit: m,
|
|
213
224
|
...i?.validators || {}
|
|
214
225
|
},
|
|
215
|
-
onSubmit: i?.onSubmit ? ({ formApi: e, meta: t, value: r }) =>
|
|
216
|
-
const n = await
|
|
226
|
+
onSubmit: i?.onSubmit ? ({ formApi: e, meta: t, value: r }) => w(t?.currentSpan, async () => {
|
|
227
|
+
const n = await b.runPromise(u(r)), s = i.onSubmit({
|
|
217
228
|
formApi: e,
|
|
218
229
|
meta: t,
|
|
219
230
|
value: n
|
|
220
231
|
});
|
|
221
|
-
return
|
|
232
|
+
return O.isFiber(s) && O.isRuntimeFiber(s) ? await Q(s) : b.isEffect(s) ? await b.runPromise(
|
|
222
233
|
s.pipe(
|
|
223
234
|
// meta?.currentSpan
|
|
224
235
|
// ? Effect.withParentSpan(meta.currentSpan)
|
|
225
236
|
// : (_) => _,
|
|
226
|
-
|
|
237
|
+
b.flatMap((d) => O.join(d))
|
|
227
238
|
)
|
|
228
239
|
) : s;
|
|
229
240
|
}) : void 0,
|
|
230
|
-
defaultValues:
|
|
241
|
+
defaultValues: U.value
|
|
231
242
|
}), v = () => {
|
|
232
|
-
Object.keys(
|
|
243
|
+
Object.keys(c).forEach((e) => {
|
|
233
244
|
a.setFieldValue(e, void 0);
|
|
234
245
|
});
|
|
235
246
|
}, A = (e) => e.reduce((t, r) => {
|
|
236
247
|
const n = r.split(".");
|
|
237
248
|
return n.reduce((s, d, y) => (y === n.length - 1 ? s[d] = a.getFieldValue(r) : s[d] = s[d] ?? {}, s[d]), t), t;
|
|
238
|
-
}, {}),
|
|
249
|
+
}, {}), j = (e) => {
|
|
239
250
|
if (e) {
|
|
240
251
|
if (g.isArray(e.keys))
|
|
241
252
|
return A(e.keys);
|
|
242
253
|
if (g.isArray(e.banKeys)) {
|
|
243
|
-
const t = Object.keys(
|
|
254
|
+
const t = Object.keys(c).filter((r) => e.banKeys?.includes(r));
|
|
244
255
|
return A(t);
|
|
245
256
|
}
|
|
246
257
|
return a.store.state.values;
|
|
247
258
|
}
|
|
248
|
-
},
|
|
259
|
+
}, D = () => {
|
|
249
260
|
const e = o?.persistency;
|
|
250
261
|
if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
|
|
251
262
|
const t = e.policies.includes("local") ? localStorage : sessionStorage;
|
|
252
263
|
if (!t) return;
|
|
253
|
-
const r =
|
|
264
|
+
const r = j(e);
|
|
254
265
|
return t.setItem(f.value, JSON.stringify(r));
|
|
255
266
|
}
|
|
256
|
-
},
|
|
267
|
+
}, T = () => {
|
|
257
268
|
const e = o?.persistency;
|
|
258
269
|
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
259
|
-
const t =
|
|
270
|
+
const t = j(e), r = new URLSearchParams(window.location.search);
|
|
260
271
|
r.set(f.value, JSON.stringify(t));
|
|
261
272
|
const n = new URL(window.location.href);
|
|
262
273
|
n.search = r.toString(), window.history.replaceState({}, "", n.toString());
|
|
@@ -264,48 +275,48 @@ const M = (c) => function(o) {
|
|
|
264
275
|
}, I = (e) => {
|
|
265
276
|
a.store.state.isDirty && e.preventDefault();
|
|
266
277
|
};
|
|
267
|
-
if (
|
|
268
|
-
window.addEventListener("beforeunload",
|
|
278
|
+
if (W(D), Y(() => {
|
|
279
|
+
window.addEventListener("beforeunload", D), window.addEventListener("blur", T), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.addEventListener("beforeunload", I);
|
|
269
280
|
}), Z(() => {
|
|
270
|
-
window.removeEventListener("beforeunload",
|
|
281
|
+
window.removeEventListener("beforeunload", D), window.removeEventListener("blur", T), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", I);
|
|
271
282
|
}), o?.preventWindowExit === "prevent-and-reset") {
|
|
272
283
|
const e = a.useStore((s) => s.isSubmitting), t = a.useStore((s) => s.submissionAttempts), r = a.useStore((s) => s.canSubmit), n = a.useStore((s) => s.values);
|
|
273
|
-
|
|
284
|
+
H([e, t], ([s, d], [y]) => {
|
|
274
285
|
y && !s && d > 0 && r.value && a.reset(n.value);
|
|
275
286
|
});
|
|
276
287
|
}
|
|
277
|
-
const $ = (e) =>
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
(t) =>
|
|
288
|
+
const $ = (e) => b.currentSpan.pipe(
|
|
289
|
+
b.option,
|
|
290
|
+
b.flatMap(
|
|
291
|
+
(t) => b.promise(() => a.handleSubmit(x.isSome(t) ? { currentSpan: t.value, ...e } : e))
|
|
281
292
|
)
|
|
282
|
-
),
|
|
293
|
+
), B = (e) => e?.checkErrors ? $(e?.meta).pipe(b.flatMap(b.fnUntraced(function* () {
|
|
283
294
|
const t = a.getAllErrors();
|
|
284
295
|
if (Object.keys(t.fields).length || t.form.errors.length)
|
|
285
|
-
return yield* new
|
|
286
|
-
}))) : $(e?.meta),
|
|
296
|
+
return yield* new le({ form: t.form, fields: t.fields });
|
|
297
|
+
}))) : $(e?.meta), K = a.handleSubmit, P = C(/* @__PURE__ */ new Map()), E = Object.assign(a, {
|
|
287
298
|
i18nNamespace: o?.i18nNamespace,
|
|
288
299
|
ignorePreventCloseEvents: o?.ignorePreventCloseEvents,
|
|
289
|
-
meta:
|
|
300
|
+
meta: c,
|
|
290
301
|
clear: v,
|
|
291
302
|
handleSubmit: (e) => {
|
|
292
|
-
const t =
|
|
293
|
-
return
|
|
303
|
+
const t = J.getSpan(L.active());
|
|
304
|
+
return K({ currentSpan: t, ...e });
|
|
294
305
|
},
|
|
295
306
|
// /** @experimental */
|
|
296
|
-
handleSubmitEffect:
|
|
307
|
+
handleSubmitEffect: B,
|
|
297
308
|
registerField: (e) => {
|
|
298
|
-
|
|
309
|
+
H(e, (t) => P.value.set(t.name, { label: t.label, id: t.id }), { immediate: !0 }), W(() => P.value.delete(e.value.name));
|
|
299
310
|
}
|
|
300
|
-
}), N = { form: E, fieldMap:
|
|
311
|
+
}), N = { form: E, fieldMap: P };
|
|
301
312
|
return Object.assign(E, {
|
|
302
313
|
// Type-level properties for performance optimization (not used at runtime)
|
|
303
314
|
_paths: void 0,
|
|
304
315
|
_keys: void 0,
|
|
305
316
|
errorContext: N,
|
|
306
|
-
Form: M(E)(
|
|
307
|
-
Input: M(E)(o?.input ??
|
|
308
|
-
TaggedUnion: M(E)(
|
|
317
|
+
Form: M(E)(ae),
|
|
318
|
+
Input: M(E)(o?.input ?? oe),
|
|
319
|
+
TaggedUnion: M(E)(ie),
|
|
309
320
|
Field: a.Field,
|
|
310
321
|
Errors: ce(N)(re),
|
|
311
322
|
Array: M(E)(ee),
|
|
@@ -313,6 +324,6 @@ const M = (c) => function(o) {
|
|
|
313
324
|
});
|
|
314
325
|
};
|
|
315
326
|
export {
|
|
316
|
-
|
|
317
|
-
|
|
327
|
+
le as FormErrors,
|
|
328
|
+
Ae as useOmegaForm
|
|
318
329
|
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { default as a } from "./vue-components.es4.js";
|
|
2
2
|
import { default as r } from "./vue-components.es5.js";
|
|
3
|
-
import { createMeta as n, duplicateSchema as u, generateInputStandardSchemaFromFieldMeta as
|
|
4
|
-
import { useOmegaForm as
|
|
5
|
-
import { default as
|
|
3
|
+
import { createMeta as n, duplicateSchema as u, generateInputStandardSchemaFromFieldMeta as f, generateMetaFromSchema as l, getInputType as p, isNullableOrUndefined as d, nullableInput as s } from "./vue-components.es12.js";
|
|
4
|
+
import { useOmegaForm as x } from "./vue-components.es10.js";
|
|
5
|
+
import { default as I } from "./vue-components.es6.js";
|
|
6
6
|
import { default as c } from "./vue-components.es7.js";
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
7
|
+
import { default as h } from "./vue-components.es8.js";
|
|
8
|
+
import { default as S } from "./vue-components.es9.js";
|
|
9
9
|
import { useOnClose as M, usePreventClose as T } from "./vue-components.es11.js";
|
|
10
10
|
import { createUseFormWithCustomInput as y } from "./vue-components.es13.js";
|
|
11
11
|
export {
|
|
12
12
|
a as CommandButton,
|
|
13
13
|
r as Dialog,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
I as OmegaInput,
|
|
15
|
+
h as OmegaTaggedUnion,
|
|
16
|
+
S as OmegaTaggedUnionInternal,
|
|
17
17
|
c as OmegaVuetifyInput,
|
|
18
18
|
n as createMeta,
|
|
19
19
|
y as createUseFormWithCustomInput,
|
|
20
20
|
u as duplicateSchema,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
d as
|
|
25
|
-
s as
|
|
21
|
+
f as generateInputStandardSchemaFromFieldMeta,
|
|
22
|
+
l as generateMetaFromSchema,
|
|
23
|
+
p as getInputType,
|
|
24
|
+
d as isNullableOrUndefined,
|
|
25
|
+
s as nullableInput,
|
|
26
|
+
x as useOmegaForm,
|
|
26
27
|
M as useOnClose,
|
|
27
28
|
T as usePreventClose
|
|
28
29
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as m, createElementBlock as d, openBlock as u, withModifiers as f, createElementVNode as l, unref as s, renderSlot as a } from "vue";
|
|
2
2
|
import { useStore as b } from "@tanstack/vue-form";
|
|
3
3
|
import { usePreventClose as p } from "./vue-components.es11.js";
|
|
4
|
-
import { getOmegaStore as c } from "./vue-components.
|
|
4
|
+
import { getOmegaStore as c } from "./vue-components.es52.js";
|
|
5
5
|
const S = ["disabled"], V = /* @__PURE__ */ m({
|
|
6
6
|
__name: "OmegaWrapper",
|
|
7
7
|
props: {
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function a(t) {
|
|
2
|
+
return Symbol.for(t);
|
|
3
|
+
}
|
|
4
|
+
var c = (
|
|
5
|
+
/** @class */
|
|
6
|
+
/* @__PURE__ */ (function() {
|
|
7
|
+
function t(u) {
|
|
8
|
+
var e = this;
|
|
9
|
+
e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
|
|
10
|
+
return e._currentContext.get(n);
|
|
11
|
+
}, e.setValue = function(n, r) {
|
|
12
|
+
var o = new t(e._currentContext);
|
|
13
|
+
return o._currentContext.set(n, r), o;
|
|
14
|
+
}, e.deleteValue = function(n) {
|
|
15
|
+
var r = new t(e._currentContext);
|
|
16
|
+
return r._currentContext.delete(n), r;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
})()
|
|
21
|
+
), x = new c();
|
|
4
22
|
export {
|
|
5
|
-
|
|
23
|
+
x as ROOT_CONTEXT,
|
|
24
|
+
a as createContextKey
|
|
6
25
|
};
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** @class */
|
|
6
|
-
/* @__PURE__ */ (function() {
|
|
7
|
-
function t(u) {
|
|
8
|
-
var e = this;
|
|
9
|
-
e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
|
|
10
|
-
return e._currentContext.get(n);
|
|
11
|
-
}, e.setValue = function(n, r) {
|
|
12
|
-
var o = new t(e._currentContext);
|
|
13
|
-
return o._currentContext.set(n, r), o;
|
|
14
|
-
}, e.deleteValue = function(n) {
|
|
15
|
-
var r = new t(e._currentContext);
|
|
16
|
-
return r._currentContext.delete(n), r;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
})()
|
|
21
|
-
), x = new c();
|
|
1
|
+
var R;
|
|
2
|
+
(function(E) {
|
|
3
|
+
E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
|
|
4
|
+
})(R || (R = {}));
|
|
22
5
|
export {
|
|
23
|
-
|
|
24
|
-
a as createContextKey
|
|
6
|
+
R as DiagLogLevel
|
|
25
7
|
};
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
(
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NoopTracer as o } from "./vue-components.es43.js";
|
|
2
|
+
var s = new o(), c = (
|
|
3
|
+
/** @class */
|
|
4
|
+
(function() {
|
|
5
|
+
function r(t, e, n, a) {
|
|
6
|
+
this._provider = t, this.name = e, this.version = n, this.options = a;
|
|
7
|
+
}
|
|
8
|
+
return r.prototype.startSpan = function(t, e, n) {
|
|
9
|
+
return this._getTracer().startSpan(t, e, n);
|
|
10
|
+
}, r.prototype.startActiveSpan = function(t, e, n, a) {
|
|
11
|
+
var i = this._getTracer();
|
|
12
|
+
return Reflect.apply(i.startActiveSpan, i, arguments);
|
|
13
|
+
}, r.prototype._getTracer = function() {
|
|
14
|
+
if (this._delegate)
|
|
15
|
+
return this._delegate;
|
|
16
|
+
var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
17
|
+
return t ? (this._delegate = t, this._delegate) : s;
|
|
18
|
+
}, r;
|
|
19
|
+
})()
|
|
20
|
+
);
|
|
5
21
|
export {
|
|
6
|
-
|
|
22
|
+
c as ProxyTracer
|
|
7
23
|
};
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ContextAPI as l } from "./vue-components.es50.js";
|
|
2
|
+
import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
|
|
3
|
+
import { NonRecordingSpan as p } from "./vue-components.es49.js";
|
|
4
|
+
import { isSpanContextValid as S } from "./vue-components.es47.js";
|
|
5
|
+
var f = l.getInstance(), I = (
|
|
3
6
|
/** @class */
|
|
4
7
|
(function() {
|
|
5
|
-
function
|
|
6
|
-
this._provider = t, this.name = e, this.version = n, this.options = a;
|
|
8
|
+
function t() {
|
|
7
9
|
}
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
return t.prototype.startSpan = function(u, e, r) {
|
|
11
|
+
r === void 0 && (r = f.active());
|
|
12
|
+
var i = !!e?.root;
|
|
13
|
+
if (i)
|
|
14
|
+
return new p();
|
|
15
|
+
var n = r && m(r);
|
|
16
|
+
return g(n) && S(n) ? new p(n) : new p();
|
|
17
|
+
}, t.prototype.startActiveSpan = function(u, e, r, i) {
|
|
18
|
+
var n, o, a;
|
|
19
|
+
if (!(arguments.length < 2)) {
|
|
20
|
+
arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
|
|
21
|
+
var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
|
|
22
|
+
return f.with(c, a, void 0, s);
|
|
23
|
+
}
|
|
24
|
+
}, t;
|
|
19
25
|
})()
|
|
20
26
|
);
|
|
27
|
+
function g(t) {
|
|
28
|
+
return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
|
|
29
|
+
}
|
|
21
30
|
export {
|
|
22
|
-
|
|
31
|
+
I as NoopTracer
|
|
23
32
|
};
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { isSpanContextValid as S } from "./vue-components.es48.js";
|
|
5
|
-
var f = l.getInstance(), I = (
|
|
1
|
+
import { ProxyTracer as i } from "./vue-components.es42.js";
|
|
2
|
+
import { NoopTracerProvider as n } from "./vue-components.es45.js";
|
|
3
|
+
var c = new n(), g = (
|
|
6
4
|
/** @class */
|
|
7
5
|
(function() {
|
|
8
6
|
function t() {
|
|
9
7
|
}
|
|
10
|
-
return t.prototype.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
|
|
22
|
-
return f.with(c, a, void 0, s);
|
|
23
|
-
}
|
|
8
|
+
return t.prototype.getTracer = function(e, o, a) {
|
|
9
|
+
var r;
|
|
10
|
+
return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
|
|
11
|
+
}, t.prototype.getDelegate = function() {
|
|
12
|
+
var e;
|
|
13
|
+
return (e = this._delegate) !== null && e !== void 0 ? e : c;
|
|
14
|
+
}, t.prototype.setDelegate = function(e) {
|
|
15
|
+
this._delegate = e;
|
|
16
|
+
}, t.prototype.getDelegateTracer = function(e, o, a) {
|
|
17
|
+
var r;
|
|
18
|
+
return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
|
|
24
19
|
}, t;
|
|
25
20
|
})()
|
|
26
21
|
);
|
|
27
|
-
function g(t) {
|
|
28
|
-
return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
|
|
29
|
-
}
|
|
30
22
|
export {
|
|
31
|
-
|
|
23
|
+
g as ProxyTracerProvider
|
|
32
24
|
};
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var c = new n(), g = (
|
|
1
|
+
import { NoopTracer as o } from "./vue-components.es43.js";
|
|
2
|
+
var p = (
|
|
4
3
|
/** @class */
|
|
5
4
|
(function() {
|
|
6
|
-
function
|
|
5
|
+
function r() {
|
|
7
6
|
}
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, t.prototype.getDelegate = function() {
|
|
12
|
-
var e;
|
|
13
|
-
return (e = this._delegate) !== null && e !== void 0 ? e : c;
|
|
14
|
-
}, t.prototype.setDelegate = function(e) {
|
|
15
|
-
this._delegate = e;
|
|
16
|
-
}, t.prototype.getDelegateTracer = function(e, o, a) {
|
|
17
|
-
var r;
|
|
18
|
-
return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
|
|
19
|
-
}, t;
|
|
7
|
+
return r.prototype.getTracer = function(e, n, t) {
|
|
8
|
+
return new o();
|
|
9
|
+
}, r;
|
|
20
10
|
})()
|
|
21
11
|
);
|
|
22
12
|
export {
|
|
23
|
-
|
|
13
|
+
p as NoopTracerProvider
|
|
24
14
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function r() {
|
|
6
|
-
}
|
|
7
|
-
return r.prototype.getTracer = function(e, n, t) {
|
|
8
|
-
return new o();
|
|
9
|
-
}, r;
|
|
10
|
-
})()
|
|
11
|
-
);
|
|
1
|
+
var N;
|
|
2
|
+
(function(E) {
|
|
3
|
+
E[E.NONE = 0] = "NONE", E[E.SAMPLED = 1] = "SAMPLED";
|
|
4
|
+
})(N || (N = {}));
|
|
12
5
|
export {
|
|
13
|
-
|
|
6
|
+
N as TraceFlags
|
|
14
7
|
};
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { INVALID_TRACEID as r, INVALID_SPANID as t } from "./vue-components.es48.js";
|
|
2
|
+
import { NonRecordingSpan as i } from "./vue-components.es49.js";
|
|
3
|
+
var a = /^([0-9a-f]{32})$/i, o = /^[0-9a-f]{16}$/i;
|
|
4
|
+
function I(n) {
|
|
5
|
+
return a.test(n) && n !== r;
|
|
6
|
+
}
|
|
7
|
+
function e(n) {
|
|
8
|
+
return o.test(n) && n !== t;
|
|
9
|
+
}
|
|
10
|
+
function A(n) {
|
|
11
|
+
return I(n.traceId) && e(n.spanId);
|
|
12
|
+
}
|
|
13
|
+
function D(n) {
|
|
14
|
+
return new i(n);
|
|
15
|
+
}
|
|
5
16
|
export {
|
|
6
|
-
|
|
17
|
+
A as isSpanContextValid,
|
|
18
|
+
e as isValidSpanId,
|
|
19
|
+
I as isValidTraceId,
|
|
20
|
+
D as wrapSpanContext
|
|
7
21
|
};
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
function e(n) {
|
|
8
|
-
return o.test(n) && n !== t;
|
|
9
|
-
}
|
|
10
|
-
function A(n) {
|
|
11
|
-
return I(n.traceId) && e(n.spanId);
|
|
12
|
-
}
|
|
13
|
-
function D(n) {
|
|
14
|
-
return new i(n);
|
|
15
|
-
}
|
|
1
|
+
import { TraceFlags as I } from "./vue-components.es46.js";
|
|
2
|
+
var a = "0000000000000000", r = "00000000000000000000000000000000", A = {
|
|
3
|
+
traceId: r,
|
|
4
|
+
spanId: a,
|
|
5
|
+
traceFlags: I.NONE
|
|
6
|
+
};
|
|
16
7
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
D as wrapSpanContext
|
|
8
|
+
a as INVALID_SPANID,
|
|
9
|
+
A as INVALID_SPAN_CONTEXT,
|
|
10
|
+
r as INVALID_TRACEID
|
|
21
11
|
};
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { INVALID_SPAN_CONTEXT as o } from "./vue-components.es48.js";
|
|
2
|
+
var i = (
|
|
3
|
+
/** @class */
|
|
4
|
+
(function() {
|
|
5
|
+
function t(n) {
|
|
6
|
+
n === void 0 && (n = o), this._spanContext = n;
|
|
7
|
+
}
|
|
8
|
+
return t.prototype.spanContext = function() {
|
|
9
|
+
return this._spanContext;
|
|
10
|
+
}, t.prototype.setAttribute = function(n, e) {
|
|
11
|
+
return this;
|
|
12
|
+
}, t.prototype.setAttributes = function(n) {
|
|
13
|
+
return this;
|
|
14
|
+
}, t.prototype.addEvent = function(n, e) {
|
|
15
|
+
return this;
|
|
16
|
+
}, t.prototype.addLink = function(n) {
|
|
17
|
+
return this;
|
|
18
|
+
}, t.prototype.addLinks = function(n) {
|
|
19
|
+
return this;
|
|
20
|
+
}, t.prototype.setStatus = function(n) {
|
|
21
|
+
return this;
|
|
22
|
+
}, t.prototype.updateName = function(n) {
|
|
23
|
+
return this;
|
|
24
|
+
}, t.prototype.end = function(n) {
|
|
25
|
+
}, t.prototype.isRecording = function() {
|
|
26
|
+
return !1;
|
|
27
|
+
}, t.prototype.recordException = function(n, e) {
|
|
28
|
+
}, t;
|
|
29
|
+
})()
|
|
30
|
+
);
|
|
7
31
|
export {
|
|
8
|
-
|
|
9
|
-
A as INVALID_SPAN_CONTEXT,
|
|
10
|
-
r as INVALID_TRACEID
|
|
32
|
+
i as NonRecordingSpan
|
|
11
33
|
};
|
|
@@ -1,33 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { NoopContextManager as f } from "./vue-components.es59.js";
|
|
2
|
+
import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es57.js";
|
|
3
|
+
import { DiagAPI as u } from "./vue-components.es54.js";
|
|
4
|
+
var y = function(t, e) {
|
|
5
|
+
var a = typeof Symbol == "function" && t[Symbol.iterator];
|
|
6
|
+
if (!a) return t;
|
|
7
|
+
var n = a.call(t), o, r = [], i;
|
|
8
|
+
try {
|
|
9
|
+
for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
|
|
10
|
+
} catch (c) {
|
|
11
|
+
i = { error: c };
|
|
12
|
+
} finally {
|
|
13
|
+
try {
|
|
14
|
+
o && !o.done && (a = n.return) && a.call(n);
|
|
15
|
+
} finally {
|
|
16
|
+
if (i) throw i.error;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return r;
|
|
20
|
+
}, d = function(t, e, a) {
|
|
21
|
+
if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
|
|
22
|
+
(r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
|
|
23
|
+
return t.concat(r || Array.prototype.slice.call(e));
|
|
24
|
+
}, l = "context", _ = new f(), A = (
|
|
3
25
|
/** @class */
|
|
4
26
|
(function() {
|
|
5
|
-
function t(
|
|
6
|
-
n === void 0 && (n = o), this._spanContext = n;
|
|
27
|
+
function t() {
|
|
7
28
|
}
|
|
8
|
-
return t.
|
|
9
|
-
return this.
|
|
10
|
-
}, t.prototype.
|
|
11
|
-
return
|
|
12
|
-
}, t.prototype.
|
|
13
|
-
return this;
|
|
14
|
-
}, t.prototype.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return this;
|
|
18
|
-
}, t.prototype.
|
|
19
|
-
return this;
|
|
20
|
-
}, t.prototype.
|
|
21
|
-
return
|
|
22
|
-
}, t.prototype.
|
|
23
|
-
|
|
24
|
-
}, t.prototype.end = function(n) {
|
|
25
|
-
}, t.prototype.isRecording = function() {
|
|
26
|
-
return !1;
|
|
27
|
-
}, t.prototype.recordException = function(n, e) {
|
|
29
|
+
return t.getInstance = function() {
|
|
30
|
+
return this._instance || (this._instance = new t()), this._instance;
|
|
31
|
+
}, t.prototype.setGlobalContextManager = function(e) {
|
|
32
|
+
return s(l, e, u.instance());
|
|
33
|
+
}, t.prototype.active = function() {
|
|
34
|
+
return this._getContextManager().active();
|
|
35
|
+
}, t.prototype.with = function(e, a, n) {
|
|
36
|
+
for (var o, r = [], i = 3; i < arguments.length; i++)
|
|
37
|
+
r[i - 3] = arguments[i];
|
|
38
|
+
return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
|
|
39
|
+
}, t.prototype.bind = function(e, a) {
|
|
40
|
+
return this._getContextManager().bind(e, a);
|
|
41
|
+
}, t.prototype._getContextManager = function() {
|
|
42
|
+
return p(l) || _;
|
|
43
|
+
}, t.prototype.disable = function() {
|
|
44
|
+
this._getContextManager().disable(), g(l, u.instance());
|
|
28
45
|
}, t;
|
|
29
46
|
})()
|
|
30
47
|
);
|
|
31
48
|
export {
|
|
32
|
-
|
|
49
|
+
A as ContextAPI
|
|
33
50
|
};
|
|
@@ -1,50 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var n = a.call(t), o, r = [], i;
|
|
8
|
-
try {
|
|
9
|
-
for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
|
|
10
|
-
} catch (c) {
|
|
11
|
-
i = { error: c };
|
|
12
|
-
} finally {
|
|
13
|
-
try {
|
|
14
|
-
o && !o.done && (a = n.return) && a.call(n);
|
|
15
|
-
} finally {
|
|
16
|
-
if (i) throw i.error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return r;
|
|
20
|
-
}, d = function(t, e, a) {
|
|
21
|
-
if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
|
|
22
|
-
(r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
|
|
23
|
-
return t.concat(r || Array.prototype.slice.call(e));
|
|
24
|
-
}, l = "context", _ = new f(), A = (
|
|
1
|
+
import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es57.js";
|
|
2
|
+
import { ProxyTracerProvider as i } from "./vue-components.es44.js";
|
|
3
|
+
import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es47.js";
|
|
4
|
+
import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es58.js";
|
|
5
|
+
import { DiagAPI as o } from "./vue-components.es54.js";
|
|
6
|
+
var n = "trace", y = (
|
|
25
7
|
/** @class */
|
|
26
8
|
(function() {
|
|
27
9
|
function t() {
|
|
10
|
+
this._proxyTracerProvider = new i(), this.wrapSpanContext = c, this.isSpanContextValid = h, this.deleteSpan = g, this.getSpan = S, this.getActiveSpan = x, this.getSpanContext = d, this.setSpan = f, this.setSpanContext = l;
|
|
28
11
|
}
|
|
29
12
|
return t.getInstance = function() {
|
|
30
13
|
return this._instance || (this._instance = new t()), this._instance;
|
|
31
|
-
}, t.prototype.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
|
|
39
|
-
}, t.prototype.bind = function(e, a) {
|
|
40
|
-
return this._getContextManager().bind(e, a);
|
|
41
|
-
}, t.prototype._getContextManager = function() {
|
|
42
|
-
return p(l) || _;
|
|
14
|
+
}, t.prototype.setGlobalTracerProvider = function(r) {
|
|
15
|
+
var e = a(n, this._proxyTracerProvider, o.instance());
|
|
16
|
+
return e && this._proxyTracerProvider.setDelegate(r), e;
|
|
17
|
+
}, t.prototype.getTracerProvider = function() {
|
|
18
|
+
return p(n) || this._proxyTracerProvider;
|
|
19
|
+
}, t.prototype.getTracer = function(r, e) {
|
|
20
|
+
return this.getTracerProvider().getTracer(r, e);
|
|
43
21
|
}, t.prototype.disable = function() {
|
|
44
|
-
|
|
22
|
+
s(n, o.instance()), this._proxyTracerProvider = new i();
|
|
45
23
|
}, t;
|
|
46
24
|
})()
|
|
47
25
|
);
|
|
48
26
|
export {
|
|
49
|
-
|
|
27
|
+
y as TraceAPI
|
|
50
28
|
};
|
|
@@ -1,28 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
return t.getInstance = function() {
|
|
13
|
-
return this._instance || (this._instance = new t()), this._instance;
|
|
14
|
-
}, t.prototype.setGlobalTracerProvider = function(r) {
|
|
15
|
-
var e = a(n, this._proxyTracerProvider, o.instance());
|
|
16
|
-
return e && this._proxyTracerProvider.setDelegate(r), e;
|
|
17
|
-
}, t.prototype.getTracerProvider = function() {
|
|
18
|
-
return p(n) || this._proxyTracerProvider;
|
|
19
|
-
}, t.prototype.getTracer = function(r, e) {
|
|
20
|
-
return this.getTracerProvider().getTracer(r, e);
|
|
21
|
-
}, t.prototype.disable = function() {
|
|
22
|
-
s(n, o.instance()), this._proxyTracerProvider = new i();
|
|
23
|
-
}, t;
|
|
24
|
-
})()
|
|
25
|
-
);
|
|
1
|
+
import { useStore as u } from "@tanstack/vue-form";
|
|
2
|
+
import { computed as f } from "vue";
|
|
3
|
+
function c(o, t) {
|
|
4
|
+
return f(() => t ? u(o.store, (n) => {
|
|
5
|
+
const r = {};
|
|
6
|
+
for (const e of t)
|
|
7
|
+
r[e] = n[e];
|
|
8
|
+
return r;
|
|
9
|
+
}).value : {});
|
|
10
|
+
}
|
|
26
11
|
export {
|
|
27
|
-
|
|
12
|
+
c as getOmegaStore
|
|
28
13
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
return f(() => t ? u(o.store, (n) => {
|
|
5
|
-
const r = {};
|
|
6
|
-
for (const e of t)
|
|
7
|
-
r[e] = n[e];
|
|
8
|
-
return r;
|
|
9
|
-
}).value : {});
|
|
10
|
-
}
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es38.js";
|
|
3
|
+
|
|
11
4
|
export {
|
|
12
|
-
|
|
5
|
+
o as default
|
|
13
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiagComponentLogger as m } from "./vue-components.es55.js";
|
|
2
2
|
import { createLogLevelDiagLogger as y } from "./vue-components.es56.js";
|
|
3
|
-
import { DiagLogLevel as d } from "./vue-components.
|
|
3
|
+
import { DiagLogLevel as d } from "./vue-components.es41.js";
|
|
4
4
|
import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es57.js";
|
|
5
5
|
var b = function(i, n) {
|
|
6
6
|
var r = typeof Symbol == "function" && i[Symbol.iterator];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createContextKey as o } from "./vue-components.
|
|
2
|
-
import { NonRecordingSpan as a } from "./vue-components.
|
|
3
|
-
import { ContextAPI as u } from "./vue-components.
|
|
1
|
+
import { createContextKey as o } from "./vue-components.es40.js";
|
|
2
|
+
import { NonRecordingSpan as a } from "./vue-components.es49.js";
|
|
3
|
+
import { ContextAPI as u } from "./vue-components.es50.js";
|
|
4
4
|
var n = o("OpenTelemetry Context Key SPAN");
|
|
5
5
|
function r(e) {
|
|
6
6
|
return e.getValue(n) || void 0;
|
package/package.json
CHANGED
|
@@ -321,7 +321,7 @@ const getNullableOrUndefined = (property: S.AST.AST) => {
|
|
|
321
321
|
)
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
const isNullableOrUndefined = (property: false | S.AST.AST | undefined) => {
|
|
324
|
+
export const isNullableOrUndefined = (property: false | S.AST.AST | undefined) => {
|
|
325
325
|
if (!property || !S.AST.isUnion(property)) return false
|
|
326
326
|
if (property.types.find((_) => _._tag === "UndefinedKeyword")) {
|
|
327
327
|
return "undefined"
|
|
@@ -11,7 +11,7 @@ import { MergedInputProps } from "./InputProps"
|
|
|
11
11
|
import OmegaArray from "./OmegaArray.vue"
|
|
12
12
|
import OmegaAutoGen from "./OmegaAutoGen.vue"
|
|
13
13
|
import OmegaErrorsInternal from "./OmegaErrorsInternal.vue"
|
|
14
|
-
import { BaseProps, DefaultTypeProps, FieldPath, type FormProps, generateMetaFromSchema, type MetaRecord, type NestedKeyOf, OmegaArrayProps, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState } from "./OmegaFormStuff"
|
|
14
|
+
import { BaseProps, DefaultTypeProps, FieldPath, type FormProps, generateMetaFromSchema, isNullableOrUndefined, type MetaRecord, type NestedKeyOf, OmegaArrayProps, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState } from "./OmegaFormStuff"
|
|
15
15
|
import OmegaInput from "./OmegaInput.vue"
|
|
16
16
|
import OmegaTaggedUnion from "./OmegaTaggedUnion.vue"
|
|
17
17
|
import OmegaForm from "./OmegaWrapper.vue"
|
|
@@ -813,12 +813,22 @@ export const useOmegaForm = <
|
|
|
813
813
|
if ((fieldSchema as any)?.ast?.defaultValue) {
|
|
814
814
|
try {
|
|
815
815
|
const defaultValue = (fieldSchema as any).ast.defaultValue()
|
|
816
|
-
|
|
817
|
-
result[key] = defaultValue
|
|
818
|
-
}
|
|
816
|
+
result[key] = defaultValue
|
|
819
817
|
} catch {
|
|
820
818
|
// Silently ignore if defaultValue() throws
|
|
821
819
|
}
|
|
820
|
+
} else {
|
|
821
|
+
// TODO Should we put to null/undefined only leaves?
|
|
822
|
+
const ast = (fieldSchema as any).ast
|
|
823
|
+
const nullableOrUndefined = isNullableOrUndefined(ast)
|
|
824
|
+
switch (nullableOrUndefined) {
|
|
825
|
+
case "null":
|
|
826
|
+
result[key] = null
|
|
827
|
+
break
|
|
828
|
+
case "undefined":
|
|
829
|
+
result[key] = undefined
|
|
830
|
+
break
|
|
831
|
+
}
|
|
822
832
|
}
|
|
823
833
|
|
|
824
834
|
// Recursively check nested fields for structs and unions
|