@effect-app/vue-components 4.0.0-beta.220 → 4.0.0-beta.221
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/CommandButton.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/index.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/checks.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/createMeta.d.ts +2 -1
- package/dist/types/components/OmegaForm/meta/defaults.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/redacted.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/types.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/walker.d.ts +1 -1
- package/dist/types/components/OmegaForm/submit.d.ts +1 -1
- package/dist/types/components/OmegaForm/types.d.ts +3 -1
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +1 -1
- package/dist/types/components/OmegaForm/validation/localized.d.ts +1 -1
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/vue-components.es.js +15 -15
- package/dist/vue-components100.es.js +269 -0
- package/dist/vue-components102.es.js +8 -0
- package/dist/vue-components103.es.js +73 -0
- package/dist/vue-components104.es.js +5 -0
- package/dist/vue-components105.es.js +52 -0
- package/dist/vue-components106.es.js +5 -0
- package/dist/vue-components107.es.js +24 -0
- package/dist/vue-components108.es.js +5 -0
- package/dist/vue-components109.es.js +59 -0
- package/dist/vue-components110.es.js +5 -0
- package/dist/vue-components111.es.js +12 -0
- package/dist/vue-components112.es.js +22 -0
- package/dist/vue-components114.es.js +9 -0
- package/dist/vue-components115.es.js +4 -0
- package/dist/vue-components116.es.js +38 -0
- package/dist/vue-components117.es.js +27 -0
- package/dist/vue-components118.es.js +28 -0
- package/dist/vue-components119.es.js +7 -0
- package/dist/vue-components12.es.js +25 -47
- package/dist/vue-components120.es.js +18 -0
- package/dist/vue-components121.es.js +36 -0
- package/dist/vue-components122.es.js +18 -0
- package/dist/vue-components123.es.js +21 -0
- package/dist/vue-components124.es.js +30 -0
- package/dist/vue-components125.es.js +7 -0
- package/dist/vue-components126.es.js +9 -0
- package/dist/vue-components127.es.js +38 -0
- package/dist/vue-components128.es.js +25 -0
- package/dist/vue-components129.es.js +128 -0
- package/dist/vue-components13.es.js +62 -120
- package/dist/vue-components130.es.js +24 -0
- package/dist/vue-components131.es.js +21 -0
- package/dist/vue-components132.es.js +9 -0
- package/dist/vue-components133.es.js +19 -0
- package/dist/vue-components134.es.js +5 -0
- package/dist/vue-components135.es.js +29 -0
- package/dist/vue-components136.es.js +5 -0
- package/dist/vue-components137.es.js +43 -0
- package/dist/vue-components138.es.js +82 -0
- package/dist/vue-components139.es.js +33 -0
- package/dist/vue-components14.es.js +13 -63
- package/dist/vue-components140.es.js +19 -0
- package/dist/vue-components141.es.js +48 -0
- package/dist/vue-components15.es.js +27 -58
- package/dist/vue-components16.es.js +52 -21
- package/dist/vue-components17.es.js +86 -4
- package/dist/vue-components18.es.js +3 -79
- package/dist/vue-components19.es.js +3 -91
- package/dist/vue-components2.es.js +15 -6
- package/dist/vue-components20.es.js +17 -71
- package/dist/vue-components21.es.js +72 -11
- package/dist/vue-components22.es.js +12 -54
- package/dist/vue-components23.es.js +25 -4
- package/dist/vue-components24.es.js +249 -41
- package/dist/vue-components25.es.js +64 -4
- package/dist/vue-components26.es.js +65 -81
- package/dist/vue-components27.es.js +8 -0
- package/dist/vue-components28.es.js +11 -7
- package/dist/vue-components29.es.js +5 -8
- package/dist/vue-components30.es.js +25 -266
- package/dist/vue-components31.es.js +75 -0
- package/dist/vue-components32.es.js +108 -7
- package/dist/vue-components33.es.js +55 -71
- package/dist/vue-components34.es.js +6 -4
- package/dist/vue-components35.es.js +3 -51
- package/dist/vue-components36.es.js +5 -4
- package/dist/vue-components37.es.js +685 -21
- package/dist/vue-components38.es.js +6 -4
- package/dist/vue-components39.es.js +4 -58
- package/dist/vue-components40.es.js +5 -4
- package/dist/vue-components41.es.js +26 -11
- package/dist/vue-components42.es.js +4 -21
- package/dist/vue-components43.es.js +48 -0
- package/dist/vue-components44.es.js +69 -8
- package/dist/vue-components45.es.js +8 -3
- package/dist/vue-components46.es.js +9 -37
- package/dist/vue-components47.es.js +7 -26
- package/dist/vue-components48.es.js +169 -24
- package/dist/vue-components49.es.js +13 -6
- package/dist/vue-components50.es.js +9 -16
- package/dist/vue-components51.es.js +3 -35
- package/dist/vue-components52.es.js +6 -17
- package/dist/vue-components53.es.js +27 -19
- package/dist/vue-components54.es.js +212 -21
- package/dist/vue-components55.es.js +84 -6
- package/dist/vue-components56.es.js +72 -7
- package/dist/vue-components57.es.js +807 -26
- package/dist/vue-components58.es.js +3 -24
- package/dist/vue-components59.es.js +103 -122
- package/dist/vue-components60.es.js +49 -19
- package/dist/vue-components61.es.js +514 -15
- package/dist/vue-components62.es.js +438 -7
- package/dist/vue-components63.es.js +9 -18
- package/dist/vue-components64.es.js +12 -4
- package/dist/vue-components65.es.js +16 -26
- package/dist/vue-components66.es.js +28 -4
- package/dist/vue-components67.es.js +20 -27
- package/dist/vue-components68.es.js +29 -5
- package/dist/vue-components69.es.js +27 -16
- package/dist/vue-components70.es.js +71 -38
- package/dist/vue-components71.es.js +5 -80
- package/dist/vue-components72.es.js +17 -32
- package/dist/vue-components73.es.js +4 -18
- package/dist/vue-components74.es.js +69 -47
- package/dist/vue-components75.es.js +140 -0
- package/dist/vue-components76.es.js +4 -0
- package/dist/vue-components77.es.js +21 -0
- package/dist/vue-components78.es.js +55 -0
- package/dist/vue-components79.es.js +9 -0
- package/dist/vue-components80.es.js +16 -0
- package/dist/vue-components81.es.js +39 -0
- package/dist/vue-components82.es.js +49 -0
- package/dist/vue-components83.es.js +128 -0
- package/dist/vue-components84.es.js +65 -0
- package/dist/vue-components85.es.js +63 -0
- package/dist/vue-components86.es.js +25 -0
- package/dist/vue-components87.es.js +5 -0
- package/dist/vue-components88.es.js +80 -0
- package/dist/vue-components89.es.js +95 -0
- package/dist/vue-components90.es.js +73 -0
- package/dist/vue-components91.es.js +12 -0
- package/dist/vue-components92.es.js +56 -0
- package/dist/vue-components93.es.js +5 -0
- package/dist/vue-components94.es.js +44 -0
- package/dist/vue-components95.es.js +5 -0
- package/dist/vue-components96.es.js +84 -0
- package/dist/vue-components98.es.js +8 -0
- package/dist/vue-components99.es.js +9 -0
- package/package.json +3 -3
- package/src/components/CommandButton.vue +1 -1
- package/src/components/OmegaForm/OmegaAutoGen.vue +1 -1
- package/src/components/OmegaForm/index.ts +1 -1
- package/src/components/OmegaForm/meta/checks.ts +2 -1
- package/src/components/OmegaForm/meta/createMeta.ts +3 -1
- package/src/components/OmegaForm/meta/defaults.ts +3 -1
- package/src/components/OmegaForm/meta/redacted.ts +1 -1
- package/src/components/OmegaForm/meta/types.ts +1 -1
- package/src/components/OmegaForm/meta/walker.ts +1 -1
- package/src/components/OmegaForm/submit.ts +4 -1
- package/src/components/OmegaForm/types.ts +3 -1
- package/src/components/OmegaForm/useOmegaForm.ts +2 -1
- package/src/components/OmegaForm/useRegisterField.ts +1 -1
- package/src/components/OmegaForm/validation/localized.ts +2 -1
- package/src/utils/index.ts +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useIntl as e } from "./vue-components6.es.js";
|
|
2
|
+
import { computed as t, h as n, onUnmounted as r, ref as i, watch as a } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/errors.ts
|
|
4
|
+
var o = (t) => {
|
|
5
|
+
let { formatMessage: n } = e(), r = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase()).trim(), i = (e) => n ? n({
|
|
6
|
+
id: `general.fields.${e}`,
|
|
7
|
+
defaultMessage: r(e)
|
|
8
|
+
}) : r(e);
|
|
9
|
+
return (e) => t.i18nNamespace ? n({
|
|
10
|
+
id: `${t.i18nNamespace}.fields.${e}`,
|
|
11
|
+
defaultMessage: i(e)
|
|
12
|
+
}) : i(e);
|
|
13
|
+
}, s = (e) => function(r) {
|
|
14
|
+
return {
|
|
15
|
+
setup() {
|
|
16
|
+
let { fieldMap: n, form: r } = e, i = r.useStore((e) => e.errors), a = r.useStore((e) => e.fieldMeta), s = r.useStore((e) => e.errorMap), c = o(r);
|
|
17
|
+
return {
|
|
18
|
+
generalErrors: i,
|
|
19
|
+
errors: t(() => {
|
|
20
|
+
let e = Object.entries(a.value).reduce((e, [t, r]) => {
|
|
21
|
+
let i = r?.errors ?? [];
|
|
22
|
+
if (!i.length) return e;
|
|
23
|
+
let a = n.value.get(t);
|
|
24
|
+
return a && e.push({
|
|
25
|
+
label: a.label,
|
|
26
|
+
inputId: a.id,
|
|
27
|
+
errors: [i[0]?.message].filter(Boolean)
|
|
28
|
+
}), e;
|
|
29
|
+
}, []), t = [], r = [s.value.onDynamic, s.value.onSubmit].filter(Boolean), i = /* @__PURE__ */ new Set();
|
|
30
|
+
for (let e of r) for (let [r, a] of Object.entries(e)) if (Array.isArray(a) && a.length) for (let e of a) {
|
|
31
|
+
let r = e;
|
|
32
|
+
if (r?.path && Array.isArray(r.path) && r.path.length) {
|
|
33
|
+
let e = r.path.join(".");
|
|
34
|
+
if (!n.value.has(e) && !i.has(e)) {
|
|
35
|
+
i.add(e), t.push({
|
|
36
|
+
label: c(e),
|
|
37
|
+
inputId: e,
|
|
38
|
+
errors: [r.message].filter(Boolean)
|
|
39
|
+
});
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return [...e, ...t];
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render({ errors: e, generalErrors: t }) {
|
|
49
|
+
return n(r, {
|
|
50
|
+
errors: e,
|
|
51
|
+
generalErrors: t,
|
|
52
|
+
...this.$attrs
|
|
53
|
+
}, this.$slots);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, c = () => {
|
|
57
|
+
let e = i(/* @__PURE__ */ new Map());
|
|
58
|
+
return {
|
|
59
|
+
fieldMap: e,
|
|
60
|
+
registerField: (t) => {
|
|
61
|
+
a(t, (t) => {
|
|
62
|
+
e.value.set(t.name, {
|
|
63
|
+
label: t.label,
|
|
64
|
+
id: t.id
|
|
65
|
+
});
|
|
66
|
+
}, { immediate: !0 }), r(() => {
|
|
67
|
+
e.value.get(t.value.name)?.id === t.value.id && e.value.delete(t.value.name);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { s as eHoc, c as makeFieldMap, o as useErrorLabel };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createElementBlock as r, defineComponent as i, guardReactiveProps as a, mergeProps as o, normalizeProps as s, onMounted as c, openBlock as l, provide as u, renderList as d, renderSlot as f, resolveDynamicComponent as p, withCtx as m } from "vue";
|
|
2
|
+
//#region src/components/OmegaForm/OmegaArray.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var h = /* @__PURE__ */ i({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "OmegaArray",
|
|
6
|
+
props: {
|
|
7
|
+
form: {},
|
|
8
|
+
inputClass: {},
|
|
9
|
+
name: {},
|
|
10
|
+
defaultItems: {},
|
|
11
|
+
items: {}
|
|
12
|
+
},
|
|
13
|
+
setup(i) {
|
|
14
|
+
let h = i, g = h.form.useStore((e) => e.values), _ = t(() => {
|
|
15
|
+
let e = h.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
16
|
+
try {
|
|
17
|
+
return e.split(".").reduce((e, t) => e && e[t], g.value);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
return console.error(e), [];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return c(async () => {
|
|
23
|
+
h.defaultItems && !_.value && h.form.setFieldValue(h.name, h.defaultItems);
|
|
24
|
+
}), u("getMetaFromArray", t(() => (e) => {
|
|
25
|
+
let t = e.replace(/\[\d+\]/g, "");
|
|
26
|
+
return h.form.meta[t];
|
|
27
|
+
})), (t, c) => (l(), n(p(i.form.Field), { name: i.name }, {
|
|
28
|
+
default: m(({ field: c, state: u }) => [
|
|
29
|
+
f(t.$slots, "pre-array", s(a({
|
|
30
|
+
field: c,
|
|
31
|
+
state: u
|
|
32
|
+
}))),
|
|
33
|
+
(l(!0), r(e, null, d(_.value, (e, r) => (l(), n(p(i.form.Field), {
|
|
34
|
+
key: `${i.name}[${Number(r)}]`,
|
|
35
|
+
name: `${i.name}[${Number(r)}]`
|
|
36
|
+
}, {
|
|
37
|
+
default: m(({ field: e, state: n }) => [f(t.$slots, "default", o({ ref_for: !0 }, {
|
|
38
|
+
subField: e,
|
|
39
|
+
subState: n,
|
|
40
|
+
index: Number(r),
|
|
41
|
+
field: c
|
|
42
|
+
}))]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["name"]))), 128)),
|
|
45
|
+
f(t.$slots, "post-array", s(a({
|
|
46
|
+
field: c,
|
|
47
|
+
state: u
|
|
48
|
+
}))),
|
|
49
|
+
f(t.$slots, "field", s(a({ field: c })))
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 8, ["name"]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { h as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Number as e, mapInput as t } from "./vue-components27.es.js";
|
|
2
|
+
import { Fragment as n, computed as r, createElementBlock as i, createVNode as a, defineComponent as o, mergeProps as s, openBlock as c, renderList as l, renderSlot as u, unref as d } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaAutoGen.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = /* @__PURE__ */ o({
|
|
5
|
+
__name: "OmegaAutoGen",
|
|
6
|
+
props: {
|
|
7
|
+
form: {},
|
|
8
|
+
pick: {},
|
|
9
|
+
omit: {},
|
|
10
|
+
labelMap: { type: Function },
|
|
11
|
+
filterMap: { type: Function },
|
|
12
|
+
order: {},
|
|
13
|
+
sort: {}
|
|
14
|
+
},
|
|
15
|
+
setup(o) {
|
|
16
|
+
let f = (e) => (t) => Object.fromEntries(Object.entries(t).map(([t, n]) => [t, e(n, t)])), p = (e) => (t) => Object.fromEntries(Object.entries(t).filter(([t, n]) => e(n, t))), m = (e) => (t) => Object.entries(t).reduce((t, [n, r]) => {
|
|
17
|
+
let i = e(r, n);
|
|
18
|
+
return i !== !1 && (t[n] = i), t;
|
|
19
|
+
}, {}), h = o, g = (e, t) => {
|
|
20
|
+
let n = t?.indexOf(e) ?? -1;
|
|
21
|
+
return n === -1 ? 2 ** 53 - 1 : n;
|
|
22
|
+
}, _ = t(e, (e) => g(e.name, h.order || [])), v = r(() => {
|
|
23
|
+
let e = p((e, t) => !!e && (h.pick ? h.pick.includes(t) && !h.omit?.includes(t) : !h.omit?.includes(t)))(h.form.meta), t = f((e, t) => ({
|
|
24
|
+
name: t,
|
|
25
|
+
label: h.labelMap?.(t) || t,
|
|
26
|
+
...e
|
|
27
|
+
}))(e), n = h.filterMap ? m((e) => {
|
|
28
|
+
let t = h.filterMap?.(e.name, e);
|
|
29
|
+
return t === void 0 || t === !0 ? e : t;
|
|
30
|
+
})(t) : t, r = [...Object.values(n)].sort(_);
|
|
31
|
+
return h.sort ? r.sort(h.sort) : r;
|
|
32
|
+
});
|
|
33
|
+
return (e, t) => (c(!0), i(n, null, l(v.value, ({ name: t, label: n, ...r }) => u(e.$slots, "default", { child: {
|
|
34
|
+
name: t,
|
|
35
|
+
label: n,
|
|
36
|
+
...r
|
|
37
|
+
} }, () => [a(d(o.form).Input, s({
|
|
38
|
+
name: t,
|
|
39
|
+
label: n
|
|
40
|
+
}, { ref_for: !0 }, r), null, 16, ["name", "label"])])), 256));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { f as default };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { useIntl as e } from "./vue-components6.es.js";
|
|
2
|
+
import { Fragment as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, getCurrentInstance as u, guardReactiveProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaErrorsInternal.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var x = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "error-alert"
|
|
7
|
+
}, S = { class: "container" }, C = {
|
|
8
|
+
key: 0,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
}, w = { class: "text-h6" }, T = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "error-list"
|
|
15
|
+
}, E = ["for"], D = { key: 1 }, O = /* @__PURE__ */ l({
|
|
16
|
+
__name: "OmegaErrorsInternal",
|
|
17
|
+
props: {
|
|
18
|
+
generalErrors: {},
|
|
19
|
+
errors: {},
|
|
20
|
+
hideErrorDetails: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(l) {
|
|
23
|
+
let O = u()?.appContext.components.VAlert, k = l, { trans: A } = e(), j = r(() => k.generalErrors ? k.generalErrors.filter((e) => !!e).flatMap((e) => Object.values(e).filter((e) => !!e).flatMap((e) => e.filter((e) => !!e?.message).map((e) => e.message))) : []);
|
|
24
|
+
return (e, r) => (m(), i(n, null, {
|
|
25
|
+
default: b(() => [l.errors.length || j.value.length ? (m(), o("div", x, [g(e.$slots, "default", p(d({
|
|
26
|
+
errors: l.errors,
|
|
27
|
+
showedGeneralErrors: j.value
|
|
28
|
+
})), () => [(m(), i(_(y(O) ? "v-alert" : "div"), {
|
|
29
|
+
class: f([y(O) ? "mb-4" : "error-alert-content", "mb-4"]),
|
|
30
|
+
type: "error",
|
|
31
|
+
variant: "tonal",
|
|
32
|
+
role: "alert",
|
|
33
|
+
"aria-live": "polite"
|
|
34
|
+
}, {
|
|
35
|
+
default: b(() => [s("div", S, [g(e.$slots, "icon", {}, () => [y(O) ? a("", !0) : (m(), o("svg", C, [...r[0] ||= [
|
|
36
|
+
s("path", {
|
|
37
|
+
d: "M16 2H8L2 8V16L8 22H16L22 16V8L16 2Z",
|
|
38
|
+
stroke: "currentColor",
|
|
39
|
+
"stroke-width": "2",
|
|
40
|
+
"stroke-linecap": "round",
|
|
41
|
+
"stroke-linejoin": "round"
|
|
42
|
+
}, null, -1),
|
|
43
|
+
s("path", {
|
|
44
|
+
d: "M12 8V12",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
"stroke-width": "2",
|
|
47
|
+
"stroke-linecap": "round",
|
|
48
|
+
"stroke-linejoin": "round"
|
|
49
|
+
}, null, -1),
|
|
50
|
+
s("path", {
|
|
51
|
+
d: "M12 16.0195V16",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
"stroke-width": "2",
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-linejoin": "round"
|
|
56
|
+
}, null, -1)
|
|
57
|
+
]]))], !0), s("div", null, [s("div", w, v(y(A)("form.includes_error")) + ": ", 1), l.errors.length ? (m(), o("ul", T, [(m(!0), o(t, null, h(l.errors, (e) => (m(), o("li", {
|
|
58
|
+
key: e.inputId,
|
|
59
|
+
class: "error-item"
|
|
60
|
+
}, [s("div", null, [
|
|
61
|
+
s("label", {
|
|
62
|
+
for: e.inputId,
|
|
63
|
+
class: "error-link"
|
|
64
|
+
}, v(e.label), 9, E),
|
|
65
|
+
r[1] ||= c(" " + v(" ") + " ", -1),
|
|
66
|
+
l.hideErrorDetails ? a("", !0) : (m(), o("div", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: f(["error-message", e.errors.length < 2 && "single-error"])
|
|
69
|
+
}, [(m(), i(_(e.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
|
|
70
|
+
default: b(() => [(m(!0), o(t, null, h(e.errors, (t) => (m(), i(_(e.errors.length > 1 ? "li" : "span"), { key: t }, {
|
|
71
|
+
default: b(() => [c(v(t), 1)]),
|
|
72
|
+
_: 2
|
|
73
|
+
}, 1024))), 128))]),
|
|
74
|
+
_: 2
|
|
75
|
+
}, 1024))], 2))
|
|
76
|
+
])]))), 128))])) : (m(), o("span", D, v(j.value[0]), 1))])])]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["class"]))], !0)])) : a("", !0)]),
|
|
79
|
+
_: 3
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { O as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
3
|
+
import e from "./vue-components96.es.js";
|
|
4
|
+
|
|
5
|
+
import t from "./vue-components98.es.js";
|
|
6
|
+
//#region src/components/OmegaForm/OmegaErrorsInternal.vue
|
|
7
|
+
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-5278f8d3"]]);
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.221",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
6
|
"effect": "^4.0.0-beta.62",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"highlight.js": "^11.11.1",
|
|
58
58
|
"mitt": "^3.0.1",
|
|
59
59
|
"vue3-highlightjs": "^1.0.5",
|
|
60
|
-
"@effect-app/vue": "4.0.0-beta.
|
|
61
|
-
"effect-app": "4.0.0-beta.
|
|
60
|
+
"@effect-app/vue": "4.0.0-beta.221",
|
|
61
|
+
"effect-app": "4.0.0-beta.221"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"check": "vue-tsc",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
lang="ts"
|
|
4
4
|
generic="I = never, RA = unknown, RE = unknown"
|
|
5
5
|
>
|
|
6
|
-
import type { CommandBase, Progress } from "@effect-app/vue"
|
|
6
|
+
import type { CommandBase, Progress } from "@effect-app/vue/makeClient"
|
|
7
7
|
import type * as AsyncResult from "effect/unstable/reactivity/AsyncResult"
|
|
8
8
|
import { computed } from "vue"
|
|
9
9
|
import type { VBtn } from "vuetify/components"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
Name extends DeepKeys<From>"
|
|
21
21
|
>
|
|
22
22
|
import { type DeepKeys } from "@tanstack/vue-form"
|
|
23
|
-
import
|
|
23
|
+
import * as Order from "effect/Order"
|
|
24
24
|
import { computed } from "vue"
|
|
25
25
|
import { type FieldMeta } from "./meta/types"
|
|
26
26
|
import { type FieldPath, type OmegaAutoGenMeta, type OmegaInputProps } from "./types"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import
|
|
2
|
+
import * as S from "effect-app/Schema"
|
|
3
|
+
import type * as Record from "effect/Record"
|
|
3
4
|
import type { FieldMeta } from "./types"
|
|
4
5
|
|
|
5
6
|
export const getCheckMetas = (property: S.AST.AST): Array<Record<string, any>> => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import
|
|
2
|
+
import type * as Effect from "effect-app/Effect"
|
|
3
|
+
import * as S from "effect-app/Schema"
|
|
4
|
+
import type * as Record from "effect/Record"
|
|
3
5
|
import { getTransformationFrom } from "../../../utils"
|
|
4
6
|
import type { FieldMeta, MetaRecord } from "./types"
|
|
5
7
|
import { classifyAndWalkUnion, leafMetaForAst, type ParentMeta, type WalkerContext, walkStruct } from "./walker"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import
|
|
2
|
+
import * as Effect from "effect-app/Effect"
|
|
3
|
+
import * as Option from "effect-app/Option"
|
|
4
|
+
import * as S from "effect-app/Schema"
|
|
3
5
|
import { isNullableOrUndefined, unwrapDeclaration } from "./createMeta"
|
|
4
6
|
|
|
5
7
|
const extractDefaultFromLink = (link: any): unknown | undefined => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import type { DeepKeys } from "@tanstack/vue-form"
|
|
3
|
-
import type
|
|
3
|
+
import type * as S from "effect-app/Schema"
|
|
4
4
|
import type { Redacted } from "effect/Redacted"
|
|
5
5
|
|
|
6
6
|
// Recursively replace Redacted<A> with its inner type so DeepKeys treats it as a leaf
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any -- AST walker interops with Effect Schema generics */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-use-before-define -- mutual recursion between walk and helpers (handleStruct/handleUnion/etc.) */
|
|
3
|
-
import
|
|
3
|
+
import * as S from "effect-app/Schema"
|
|
4
4
|
import { getFieldMetadataFromAst } from "./checks"
|
|
5
5
|
import { isNullableOrUndefined, unwrapDeclaration } from "./createMeta"
|
|
6
6
|
import type { FieldMeta, MetaRecord, NestedKeyOf, SelectFieldMeta } from "./types"
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import * as api from "@opentelemetry/api"
|
|
4
4
|
import type { DeepKeys, StandardSchemaV1Issue, ValidationError, ValidationErrorMap } from "@tanstack/vue-form"
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from "effect-app/Effect"
|
|
6
|
+
import * as Option from "effect-app/Option"
|
|
6
7
|
import { runtimeFiberAsPromise } from "effect-app/utils"
|
|
8
|
+
import * as Data from "effect/Data"
|
|
9
|
+
import * as Fiber from "effect/Fiber"
|
|
7
10
|
import type { Fiber as EffectFiber } from "effect/Fiber"
|
|
8
11
|
import type { OmegaFormApi, OmegaFormParams } from "./types"
|
|
9
12
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import type { DeepKeys, DeepValue, FieldApi, FieldAsyncValidateOrFn, FieldState, FieldValidateOrFn, FormApi, FormAsyncValidateOrFn, FormOptions, FormState, FormValidateOrFn, StandardSchemaV1, VueFormApi } from "@tanstack/vue-form"
|
|
3
|
-
import type
|
|
3
|
+
import type * as Effect from "effect-app/Effect"
|
|
4
|
+
import type * as S from "effect-app/Schema"
|
|
4
5
|
import type { UnionToTuples } from "effect-app/utils"
|
|
5
6
|
import type { Fiber as EffectFiber } from "effect/Fiber"
|
|
7
|
+
import type * as Order from "effect/Order"
|
|
6
8
|
import type { Redacted } from "effect/Redacted"
|
|
7
9
|
import type { AllowedComponentProps, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue"
|
|
8
10
|
import type { MergedInputProps, OmegaFieldInternalApi, TaggedUnionOptionsArray } from "./InputProps"
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import { type FormAsyncValidateOrFn, type FormValidateOrFn, revalidateLogic, type StandardSchemaV1, useForm } from "@tanstack/vue-form"
|
|
5
|
-
import
|
|
5
|
+
import * as Context from "effect-app/Context"
|
|
6
|
+
import * as S from "effect-app/Schema"
|
|
6
7
|
import { type InjectionKey, watch } from "vue"
|
|
7
8
|
import { eHoc, makeFieldMap } from "./errors"
|
|
8
9
|
import { fHoc } from "./hocs"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { injectCertain } from "@effect-app/vue"
|
|
1
|
+
import { injectCertain } from "@effect-app/vue/makeContext"
|
|
2
2
|
import { type ComputedRef, type InjectionKey, onUnmounted, provide, watch } from "vue"
|
|
3
3
|
|
|
4
4
|
const Key = Symbol("injected") as InjectionKey<Map<string, { label: string; id: string }>>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import type { StandardSchemaV1 } from "@tanstack/vue-form"
|
|
3
|
-
import
|
|
3
|
+
import * as Option from "effect-app/Option"
|
|
4
|
+
import * as S from "effect-app/Schema"
|
|
4
5
|
import type { useIntl } from "../../../utils"
|
|
5
6
|
|
|
6
7
|
export type TransFn = ReturnType<typeof useIntl>["trans"]
|
package/src/utils/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type makeIntl } from "@effect-app/vue"
|
|
2
|
-
import type
|
|
1
|
+
import { type makeIntl } from "@effect-app/vue/makeIntl"
|
|
2
|
+
import type * as S from "effect-app/Schema"
|
|
3
3
|
import { inject, type InjectionKey, provide } from "vue"
|
|
4
4
|
|
|
5
5
|
export const useIntlKey = Symbol() as InjectionKey<
|