@effect-app/vue-components 2.5.0 → 2.6.1
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.es10.js +123 -115
- package/dist/vue-components.es12.js +14 -14
- 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/dist/vue-components.es7.js +24 -24
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaFormStuff.ts +8 -8
- package/src/components/OmegaForm/OmegaInternalInput.vue +6 -2
- package/src/components/OmegaForm/useOmegaForm.ts +17 -5
|
@@ -1,106 +1,114 @@
|
|
|
1
|
-
import { useForm as
|
|
2
|
-
import { Data as
|
|
3
|
-
import { runtimeFiberAsPromise as
|
|
4
|
-
import { isObject as
|
|
5
|
-
import { computed as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { generateMetaFromSchema as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { trace as
|
|
14
|
-
import { context as
|
|
15
|
-
class
|
|
1
|
+
import { useForm as z } from "@tanstack/vue-form";
|
|
2
|
+
import { Data as K, S as $, Effect as c, Fiber as k, Option as x, Array as g } from "effect-app";
|
|
3
|
+
import { runtimeFiberAsPromise as T } from "./vue-components.es16.js";
|
|
4
|
+
import { isObject as Z } from "./vue-components.es17.js";
|
|
5
|
+
import { computed as N, onUnmounted as W, onMounted as G, onBeforeUnmount as Q, watch as R, ref as X, h as q } from "vue";
|
|
6
|
+
import Y from "./vue-components.es18.js";
|
|
7
|
+
import C from "./vue-components.es19.js";
|
|
8
|
+
import ee from "./vue-components.es20.js";
|
|
9
|
+
import { generateMetaFromSchema as re } from "./vue-components.es12.js";
|
|
10
|
+
import te from "./vue-components.es6.js";
|
|
11
|
+
import ne from "./vue-components.es8.js";
|
|
12
|
+
import se from "./vue-components.es21.js";
|
|
13
|
+
import { trace as B } from "./vue-components.es22.js";
|
|
14
|
+
import { context as A } from "./vue-components.es23.js";
|
|
15
|
+
class oe extends K.TaggedError("FormErrors") {
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const F = (a) => function(i) {
|
|
18
18
|
return {
|
|
19
19
|
render() {
|
|
20
|
-
return
|
|
21
|
-
form:
|
|
20
|
+
return q(i, {
|
|
21
|
+
form: a,
|
|
22
22
|
...this.$attrs
|
|
23
23
|
}, this.$slots);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, ie = (a) => function(i) {
|
|
27
27
|
return {
|
|
28
28
|
setup() {
|
|
29
|
-
const { fieldMap:
|
|
29
|
+
const { fieldMap: b, form: v } = a, f = v.useStore((u) => u.errors), m = v.useStore((u) => u.fieldMeta), O = v.useStore((u) => u.errorMap), M = N(() => {
|
|
30
30
|
const u = g.filterMap(
|
|
31
|
-
Object.entries(
|
|
32
|
-
([j,
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
label:
|
|
38
|
-
inputId:
|
|
31
|
+
Object.entries(m.value),
|
|
32
|
+
([j, h]) => {
|
|
33
|
+
const o = h.errors ?? [];
|
|
34
|
+
if (!o.length) return x.none();
|
|
35
|
+
const l = b.value.get(j);
|
|
36
|
+
return l ? x.some({
|
|
37
|
+
label: l.label,
|
|
38
|
+
inputId: l.id,
|
|
39
39
|
// Only show the first error
|
|
40
|
-
errors: [
|
|
41
|
-
}) :
|
|
40
|
+
errors: [o[0]?.message].filter(Boolean)
|
|
41
|
+
}) : x.none();
|
|
42
42
|
}
|
|
43
|
-
),
|
|
44
|
-
if (
|
|
45
|
-
for (const [j,
|
|
46
|
-
if (g.isArray(
|
|
47
|
-
for (const
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
const w =
|
|
51
|
-
if (!
|
|
52
|
-
|
|
43
|
+
), y = [];
|
|
44
|
+
if (O.value.onSubmit) {
|
|
45
|
+
for (const [j, h] of Object.entries(O.value.onSubmit))
|
|
46
|
+
if (g.isArray(h) && h.length)
|
|
47
|
+
for (const o of h) {
|
|
48
|
+
const l = o;
|
|
49
|
+
if (l?.path && g.isArray(l.path) && l.path.length) {
|
|
50
|
+
const w = l.path.join(".");
|
|
51
|
+
if (!b.value.has(w)) {
|
|
52
|
+
y.push({
|
|
53
53
|
label: w,
|
|
54
54
|
inputId: w,
|
|
55
|
-
errors: [
|
|
55
|
+
errors: [l.message].filter(Boolean)
|
|
56
56
|
});
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
return [...u, ...
|
|
62
|
+
return [...u, ...y];
|
|
63
63
|
});
|
|
64
64
|
return {
|
|
65
|
-
generalErrors:
|
|
65
|
+
generalErrors: f,
|
|
66
66
|
errors: M
|
|
67
67
|
};
|
|
68
68
|
},
|
|
69
|
-
render({ errors:
|
|
70
|
-
return
|
|
71
|
-
errors:
|
|
69
|
+
render({ errors: b, generalErrors: v }) {
|
|
70
|
+
return q(i, {
|
|
71
|
+
errors: b,
|
|
72
72
|
generalErrors: v,
|
|
73
73
|
...this.$attrs
|
|
74
74
|
}, this.$slots);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
},
|
|
78
|
-
if (!
|
|
79
|
-
const
|
|
77
|
+
}, Ee = (a, p, i) => {
|
|
78
|
+
if (!a) throw new Error("Schema is required");
|
|
79
|
+
const b = $.standardSchemaV1(a), v = $.decode(a), { meta: f } = re(a), m = N(() => {
|
|
80
80
|
if (i?.persistency?.id)
|
|
81
81
|
return i.persistency.id;
|
|
82
|
-
const e = window.location.pathname, r = Object.keys(
|
|
82
|
+
const e = window.location.pathname, r = Object.keys(f);
|
|
83
83
|
return `${e}-${r.join("-")}`;
|
|
84
|
-
}),
|
|
84
|
+
}), O = () => {
|
|
85
85
|
const e = new URLSearchParams(window.location.search);
|
|
86
|
-
e.delete(
|
|
86
|
+
e.delete(m.value);
|
|
87
87
|
const r = new URL(window.location.href);
|
|
88
88
|
r.search = e.toString(), window.history.replaceState({}, "", r.toString());
|
|
89
89
|
};
|
|
90
90
|
function M(e, r) {
|
|
91
91
|
for (const n in r)
|
|
92
|
-
r[n] &&
|
|
92
|
+
r[n] && Z(r[n]) ? (e[n] || (e[n] = {}), M(e[n], r[n])) : e[n] = r[n];
|
|
93
93
|
return e;
|
|
94
94
|
}
|
|
95
95
|
const u = (e) => {
|
|
96
|
+
if (!e) return;
|
|
96
97
|
const r = { ...e };
|
|
97
|
-
for (const n in
|
|
98
|
-
const s =
|
|
99
|
-
s && !s.required && s.nullableOrUndefined && s.type !== "boolean" && (t === void 0 ||
|
|
98
|
+
for (const n in f) {
|
|
99
|
+
const s = f[n], t = r[n], E = (t == null || t === !1 || t === "" || Number.isNaN(t)) && t !== !1 && t !== 0;
|
|
100
|
+
s && !s.required && s.nullableOrUndefined && s.type !== "boolean" && (t === void 0 || E) && (r[n] = s.nullableOrUndefined === "undefined" ? void 0 : null);
|
|
100
101
|
}
|
|
101
102
|
return r;
|
|
102
|
-
},
|
|
103
|
-
|
|
103
|
+
}, y = (e = {}) => {
|
|
104
|
+
try {
|
|
105
|
+
if ("make" in a && typeof a.make == "function")
|
|
106
|
+
return a.make(e, { disableValidation: !0 });
|
|
107
|
+
} catch (r) {
|
|
108
|
+
return console.warn("Could not extract schema constructor defaults:", r), {};
|
|
109
|
+
}
|
|
110
|
+
}, j = N(() => {
|
|
111
|
+
const e = y(u(p?.defaultValues));
|
|
104
112
|
if (e && !i?.persistency?.overrideDefaultValues)
|
|
105
113
|
return e;
|
|
106
114
|
let r;
|
|
@@ -108,8 +116,8 @@ const E = (c) => function(i) {
|
|
|
108
116
|
if (!n?.policies || n.policies.length === 0) return {};
|
|
109
117
|
if (n.policies.includes("querystring"))
|
|
110
118
|
try {
|
|
111
|
-
const t = new URLSearchParams(window.location.search).get(
|
|
112
|
-
|
|
119
|
+
const t = new URLSearchParams(window.location.search).get(m.value);
|
|
120
|
+
O(), t && (r = JSON.parse(t));
|
|
113
121
|
} catch (s) {
|
|
114
122
|
console.error(s);
|
|
115
123
|
}
|
|
@@ -121,121 +129,121 @@ const E = (c) => function(i) {
|
|
|
121
129
|
if (s)
|
|
122
130
|
try {
|
|
123
131
|
const t = JSON.parse(
|
|
124
|
-
s.getItem(
|
|
132
|
+
s.getItem(m.value) || "{}"
|
|
125
133
|
);
|
|
126
|
-
s.removeItem(
|
|
134
|
+
s.removeItem(m.value), r = t;
|
|
127
135
|
} catch (t) {
|
|
128
136
|
console.error(t);
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
|
-
return r ??= {}, e ? M(e, r) : r;
|
|
132
|
-
}),
|
|
133
|
-
...
|
|
139
|
+
return r ??= y({}), e ? M(e, r) : r;
|
|
140
|
+
}), h = (e, r) => e ? A.with(B.setSpan(A.active(), e), r) : r(), o = z({
|
|
141
|
+
...p,
|
|
134
142
|
validators: {
|
|
135
|
-
onSubmit:
|
|
136
|
-
...
|
|
143
|
+
onSubmit: b,
|
|
144
|
+
...p?.validators || {}
|
|
137
145
|
},
|
|
138
|
-
onSubmit:
|
|
139
|
-
const s = await
|
|
146
|
+
onSubmit: p?.onSubmit ? ({ formApi: e, meta: r, value: n }) => h(r?.currentSpan, async () => {
|
|
147
|
+
const s = await c.runPromise(v(n)), t = p.onSubmit({
|
|
140
148
|
formApi: e,
|
|
141
149
|
meta: r,
|
|
142
150
|
value: s
|
|
143
151
|
});
|
|
144
|
-
return
|
|
152
|
+
return k.isFiber(t) && k.isRuntimeFiber(t) ? await T(t) : c.isEffect(t) ? await c.runPromise(
|
|
145
153
|
t.pipe(
|
|
146
154
|
// meta?.currentSpan
|
|
147
155
|
// ? Effect.withParentSpan(meta.currentSpan)
|
|
148
156
|
// : (_) => _,
|
|
149
|
-
|
|
157
|
+
c.flatMap((d) => k.join(d))
|
|
150
158
|
)
|
|
151
159
|
) : t;
|
|
152
160
|
}) : void 0,
|
|
153
|
-
defaultValues:
|
|
154
|
-
}),
|
|
155
|
-
Object.keys(
|
|
161
|
+
defaultValues: j.value
|
|
162
|
+
}), l = () => {
|
|
163
|
+
Object.keys(f).forEach((e) => {
|
|
156
164
|
o.setFieldValue(e, void 0);
|
|
157
165
|
});
|
|
158
|
-
},
|
|
166
|
+
}, w = (e) => e.reduce((r, n) => {
|
|
159
167
|
const s = n.split(".");
|
|
160
|
-
return s.reduce((t, d,
|
|
161
|
-
}, {}),
|
|
168
|
+
return s.reduce((t, d, E) => (E === s.length - 1 ? t[d] = o.getFieldValue(n) : t[d] = t[d] ?? {}, t[d]), r), r;
|
|
169
|
+
}, {}), _ = (e) => {
|
|
162
170
|
if (e) {
|
|
163
171
|
if (g.isArray(e.keys))
|
|
164
|
-
return
|
|
172
|
+
return w(e.keys);
|
|
165
173
|
if (g.isArray(e.banKeys)) {
|
|
166
|
-
const r = Object.keys(
|
|
167
|
-
return
|
|
174
|
+
const r = Object.keys(f).filter((n) => e.banKeys?.includes(n));
|
|
175
|
+
return w(r);
|
|
168
176
|
}
|
|
169
177
|
return o.store.state.values;
|
|
170
178
|
}
|
|
171
|
-
},
|
|
179
|
+
}, P = () => {
|
|
172
180
|
const e = i?.persistency;
|
|
173
181
|
if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
|
|
174
182
|
const r = e.policies.includes("local") ? localStorage : sessionStorage;
|
|
175
183
|
if (!r) return;
|
|
176
|
-
const n =
|
|
177
|
-
return r.setItem(
|
|
184
|
+
const n = _(e);
|
|
185
|
+
return r.setItem(m.value, JSON.stringify(n));
|
|
178
186
|
}
|
|
179
187
|
}, L = () => {
|
|
180
188
|
const e = i?.persistency;
|
|
181
189
|
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
182
|
-
const r =
|
|
183
|
-
n.set(
|
|
190
|
+
const r = _(e), n = new URLSearchParams(window.location.search);
|
|
191
|
+
n.set(m.value, JSON.stringify(r));
|
|
184
192
|
const s = new URL(window.location.href);
|
|
185
193
|
s.search = n.toString(), window.history.replaceState({}, "", s.toString());
|
|
186
194
|
}
|
|
187
195
|
}, V = (e) => {
|
|
188
196
|
o.store.state.isDirty && e.preventDefault();
|
|
189
197
|
};
|
|
190
|
-
if (
|
|
191
|
-
window.addEventListener("beforeunload",
|
|
192
|
-
}),
|
|
193
|
-
window.removeEventListener("beforeunload",
|
|
198
|
+
if (W(P), G(() => {
|
|
199
|
+
window.addEventListener("beforeunload", P), window.addEventListener("blur", L), i?.preventWindowExit && i.preventWindowExit !== "nope" && window.addEventListener("beforeunload", V);
|
|
200
|
+
}), Q(() => {
|
|
201
|
+
window.removeEventListener("beforeunload", P), window.removeEventListener("blur", L), i?.preventWindowExit && i.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", V);
|
|
194
202
|
}), i?.preventWindowExit === "prevent-and-reset") {
|
|
195
203
|
const e = o.useStore((t) => t.isSubmitting), r = o.useStore((t) => t.submissionAttempts), n = o.useStore((t) => t.canSubmit), s = o.useStore((t) => t.values);
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
R([e, r], ([t, d], [E]) => {
|
|
205
|
+
E && !t && d > 0 && n.value && o.reset(s.value);
|
|
198
206
|
});
|
|
199
207
|
}
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
(r) =>
|
|
208
|
+
const D = (e) => c.currentSpan.pipe(
|
|
209
|
+
c.option,
|
|
210
|
+
c.flatMap(
|
|
211
|
+
(r) => c.promise(() => o.handleSubmit(x.isSome(r) ? { currentSpan: r.value, ...e } : e))
|
|
204
212
|
)
|
|
205
|
-
),
|
|
213
|
+
), H = (e) => e?.checkErrors ? D(e?.meta).pipe(c.flatMap(c.fnUntraced(function* () {
|
|
206
214
|
const r = o.getAllErrors();
|
|
207
215
|
if (Object.keys(r.fields).length || r.form.errors.length)
|
|
208
|
-
return yield* new
|
|
209
|
-
}))) :
|
|
216
|
+
return yield* new oe({ form: r.form, fields: r.fields });
|
|
217
|
+
}))) : D(e?.meta), J = o.handleSubmit, U = X(/* @__PURE__ */ new Map()), S = Object.assign(o, {
|
|
210
218
|
i18nNamespace: i?.i18nNamespace,
|
|
211
219
|
ignorePreventCloseEvents: i?.ignorePreventCloseEvents,
|
|
212
|
-
meta:
|
|
213
|
-
clear:
|
|
220
|
+
meta: f,
|
|
221
|
+
clear: l,
|
|
214
222
|
handleSubmit: (e) => {
|
|
215
|
-
const r =
|
|
216
|
-
return
|
|
223
|
+
const r = B.getSpan(A.active());
|
|
224
|
+
return J({ currentSpan: r, ...e });
|
|
217
225
|
},
|
|
218
226
|
// /** @experimental */
|
|
219
|
-
handleSubmitEffect:
|
|
227
|
+
handleSubmitEffect: H,
|
|
220
228
|
registerField: (e) => {
|
|
221
|
-
|
|
229
|
+
R(e, (r) => U.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }), W(() => U.value.delete(e.value.name));
|
|
222
230
|
}
|
|
223
|
-
}),
|
|
224
|
-
return Object.assign(
|
|
231
|
+
}), I = { form: S, fieldMap: U };
|
|
232
|
+
return Object.assign(S, {
|
|
225
233
|
// Type-level properties for performance optimization (not used at runtime)
|
|
226
234
|
_paths: void 0,
|
|
227
235
|
_keys: void 0,
|
|
228
|
-
errorContext:
|
|
229
|
-
Form:
|
|
230
|
-
Input:
|
|
231
|
-
TaggedUnion:
|
|
236
|
+
errorContext: I,
|
|
237
|
+
Form: F(S)(se),
|
|
238
|
+
Input: F(S)(i?.input ?? te),
|
|
239
|
+
TaggedUnion: F(S)(ne),
|
|
232
240
|
Field: o.Field,
|
|
233
|
-
Errors:
|
|
234
|
-
Array:
|
|
235
|
-
AutoGen:
|
|
241
|
+
Errors: ie(I)(ee),
|
|
242
|
+
Array: F(S)(Y),
|
|
243
|
+
AutoGen: F(S)(C)
|
|
236
244
|
});
|
|
237
245
|
};
|
|
238
246
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
247
|
+
oe as FormErrors,
|
|
248
|
+
Ee as useOmegaForm
|
|
241
249
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as n, Option as
|
|
1
|
+
import { S as n, Option as M } from "effect-app";
|
|
2
2
|
import { getMetadataFromSchema as _ } from "@effect-app/vue/form";
|
|
3
3
|
import { useIntl as w, getTransformationFrom as N } from "./vue-components.es3.js";
|
|
4
4
|
const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKeyword" || i === n.Null.ast), d = (e) => !e || !n.AST.isUnion(e) ? !1 : e.types.find((i) => i._tag === "UndefinedKeyword") ? "undefined" : e.types.find((i) => i === n.Null.ast) ? "null" : !1, L = (e) => {
|
|
@@ -209,7 +209,7 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
|
|
|
209
209
|
const o = n.AST.getAnnotation(
|
|
210
210
|
t,
|
|
211
211
|
n.AST.JSONSchemaAnnotationId
|
|
212
|
-
).pipe(
|
|
212
|
+
).pipe(M.getOrElse(() => ({})));
|
|
213
213
|
return e = { ...e, ...o }, "from" in t ? m({
|
|
214
214
|
parent: i,
|
|
215
215
|
meta: e,
|
|
@@ -218,14 +218,14 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
|
|
|
218
218
|
t,
|
|
219
219
|
n.AST.TitleAnnotationId
|
|
220
220
|
).pipe(
|
|
221
|
-
|
|
221
|
+
M.getOrElse(() => "unknown")
|
|
222
222
|
), e);
|
|
223
223
|
}
|
|
224
224
|
return a;
|
|
225
|
-
},
|
|
225
|
+
}, q = (e) => {
|
|
226
226
|
const i = e.ast, t = {};
|
|
227
227
|
if (i._tag === "Transformation" || i._tag === "Refinement")
|
|
228
|
-
return
|
|
228
|
+
return q(n.make(i.from));
|
|
229
229
|
if ("propertySignatures" in i) {
|
|
230
230
|
const g = m({
|
|
231
231
|
propertySignatures: i.propertySignatures
|
|
@@ -242,7 +242,7 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
|
|
|
242
242
|
}
|
|
243
243
|
return t;
|
|
244
244
|
}, P = (e) => n.extend(e, n.Struct({})), F = (e) => {
|
|
245
|
-
const i =
|
|
245
|
+
const i = q(e);
|
|
246
246
|
return { schema: e, meta: i };
|
|
247
247
|
}, j = (e) => {
|
|
248
248
|
const { trans: i } = w();
|
|
@@ -260,11 +260,11 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
|
|
|
260
260
|
message: () => i("validation.empty")
|
|
261
261
|
}).pipe(n.minLength(1)).annotations({
|
|
262
262
|
message: () => i("validation.empty")
|
|
263
|
-
})), e.maxLength && (t = t.pipe(n.maxLength(e.maxLength)).annotations({
|
|
263
|
+
})), typeof e.maxLength == "number" && (t = t.pipe(n.maxLength(e.maxLength)).annotations({
|
|
264
264
|
message: () => i("validation.string.maxLength", {
|
|
265
265
|
maxLength: e.maxLength
|
|
266
266
|
})
|
|
267
|
-
})), e.minLength && (t = t.pipe(n.minLength(e.minLength)).annotations({
|
|
267
|
+
})), typeof e.minLength == "number" && (t = t.pipe(n.minLength(e.minLength)).annotations({
|
|
268
268
|
message: () => i("validation.string.minLength", {
|
|
269
269
|
minLength: e.minLength
|
|
270
270
|
})
|
|
@@ -275,22 +275,22 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
|
|
|
275
275
|
message: () => i("validation.empty")
|
|
276
276
|
}), e.required && t.annotations({
|
|
277
277
|
message: () => i("validation.empty")
|
|
278
|
-
}), e.minimum && (t = t.pipe(n.greaterThanOrEqualTo(e.minimum)).annotations({
|
|
279
|
-
message: () => i("validation.number.min", {
|
|
278
|
+
}), typeof e.minimum == "number" && (t = t.pipe(n.greaterThanOrEqualTo(e.minimum)).annotations({
|
|
279
|
+
message: () => i(e.minimum === 0 ? "validation.number.positive" : "validation.number.min", {
|
|
280
280
|
minimum: e.minimum,
|
|
281
281
|
isExclusive: !0
|
|
282
282
|
})
|
|
283
|
-
})), e.maximum && (t = t.pipe(n.lessThanOrEqualTo(e.maximum)).annotations({
|
|
283
|
+
})), typeof e.maximum == "number" && (t = t.pipe(n.lessThanOrEqualTo(e.maximum)).annotations({
|
|
284
284
|
message: () => i("validation.number.max", {
|
|
285
285
|
maximum: e.maximum,
|
|
286
286
|
isExclusive: !0
|
|
287
287
|
})
|
|
288
|
-
})), e.exclusiveMinimum && (t = t.pipe(n.greaterThan(e.exclusiveMinimum)).annotations({
|
|
289
|
-
message: () => i("validation.number.min", {
|
|
288
|
+
})), typeof e.exclusiveMinimum == "number" && (t = t.pipe(n.greaterThan(e.exclusiveMinimum)).annotations({
|
|
289
|
+
message: () => i(e.exclusiveMinimum === 0 ? "validation.number.positive" : "validation.number.min", {
|
|
290
290
|
minimum: e.exclusiveMinimum,
|
|
291
291
|
isExclusive: !1
|
|
292
292
|
})
|
|
293
|
-
})), e.exclusiveMaximum && (t = t.pipe(n.lessThan(e.exclusiveMaximum)).annotations({
|
|
293
|
+
})), typeof e.exclusiveMaximum == "number" && (t = t.pipe(n.lessThan(e.exclusiveMaximum)).annotations({
|
|
294
294
|
message: () => i("validation.number.max", {
|
|
295
295
|
maximum: e.exclusiveMaximum,
|
|
296
296
|
isExclusive: !1
|
|
@@ -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
|
};
|