@effect-app/vue-components 2.5.0 → 2.6.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/vue-components.es10.js +123 -115
- package/dist/vue-components.es12.js +14 -14
- package/dist/vue-components.es16.js +1 -1
- package/dist/vue-components.es17.js +1 -1
- package/dist/vue-components.es20.js +2 -2
- package/dist/vue-components.es21.js +2 -2
- package/dist/vue-components.es30.js +191 -41
- package/dist/vue-components.es32.js +42 -2
- package/dist/vue-components.es33.js +2 -89
- package/dist/vue-components.es34.js +4 -0
- package/dist/vue-components.es35.js +89 -7
- package/dist/vue-components.es37.js +9 -0
- package/dist/vue-components.es38.js +27 -187
- package/dist/vue-components.es40.js +1 -1
- package/dist/vue-components.es7.js +14 -14
- package/package.json +3 -3
- package/src/components/OmegaForm/OmegaFormStuff.ts +8 -8
- package/src/components/OmegaForm/OmegaInternalInput.vue +2 -2
- package/src/components/OmegaForm/useOmegaForm.ts +17 -5
- package/dist/vue-components.es31.js +0 -4
- package/dist/vue-components.es36.js +0 -34
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { Exit as c, Runtime as u } from "effect";
|
|
2
|
-
import { dual as n, isFunction as m } from "./vue-components.
|
|
2
|
+
import { dual as n, isFunction as m } from "./vue-components.es32.js";
|
|
3
3
|
const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
4
|
n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
5
|
const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(r,t){const i=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,r,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import r from "./vue-components.
|
|
2
|
+
import r from "./vue-components.es35.js";
|
|
3
3
|
|
|
4
|
-
import o from "./vue-components.
|
|
4
|
+
import o from "./vue-components.es37.js";
|
|
5
5
|
const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-d4ffe76f"]]);
|
|
6
6
|
export {
|
|
7
7
|
e as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-05e510ab]{display:contents}fieldset[disabled][data-v-05e510ab]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-05e510ab]{display:contents}fieldset[disabled][data-v-05e510ab]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import o from "./vue-components.
|
|
2
|
+
import o from "./vue-components.es38.js";
|
|
3
3
|
|
|
4
|
-
import m from "./vue-components.
|
|
4
|
+
import m from "./vue-components.es37.js";
|
|
5
5
|
const e = /* @__PURE__ */ m(o, [["__scopeId", "data-v-05e510ab"]]);
|
|
6
6
|
export {
|
|
7
7
|
e as default
|