@effect-app/vue-components 1.8.5 → 1.8.7
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/OmegaErrorsInternal.vue.d.ts +7 -5
- package/dist/vue-components.es12.js +10 -11
- package/dist/vue-components.es13.js +5 -10
- package/dist/vue-components.es14.js +54 -5
- package/dist/vue-components.es15.js +63 -49
- package/dist/vue-components.es16.js +6 -68
- package/dist/vue-components.es17.js +5 -5
- package/dist/vue-components.es18.js +3 -6
- package/dist/vue-components.es19.js +3 -3
- package/dist/vue-components.es20.js +2 -3
- package/dist/vue-components.es21.js +1 -1
- package/dist/vue-components.es22.js +17 -2
- package/dist/vue-components.es23.js +10 -16
- package/dist/vue-components.es27.js +1 -1
- package/dist/vue-components.es28.js +1 -1
- package/dist/vue-components.es29.js +48 -38
- package/dist/vue-components.es32.js +1 -1
- package/dist/vue-components.es35.js +10 -22
- package/dist/vue-components.es36.js +23 -5
- package/dist/vue-components.es37.js +5 -21
- package/dist/vue-components.es38.js +16 -25
- package/dist/vue-components.es39.js +23 -15
- package/dist/vue-components.es4.js +1 -1
- package/dist/vue-components.es40.js +17 -7
- package/dist/vue-components.es41.js +12 -5
- package/dist/vue-components.es42.js +5 -19
- package/dist/vue-components.es43.js +19 -9
- package/dist/vue-components.es44.js +9 -31
- package/dist/vue-components.es45.js +25 -42
- package/dist/vue-components.es46.js +38 -16
- package/dist/vue-components.es47.js +26 -11
- package/dist/vue-components.es48.js +1 -1
- package/dist/vue-components.es50.js +1 -1
- package/dist/vue-components.es52.js +3 -3
- package/dist/vue-components.es53.js +1 -1
- package/dist/vue-components.es6.js +13 -13
- package/dist/vue-components.es7.js +85 -95
- package/dist/vue-components.es8.js +2 -2
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaErrorsInternal.vue +24 -6
- package/src/components/OmegaForm/OmegaInternalInput.vue +4 -0
- package/src/components/OmegaForm/useOmegaForm.ts +10 -30
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type OmegaError } from "./OmegaFormStuff";
|
|
1
|
+
import { type OmegaError, type OmegaFormApi } from "./OmegaFormStuff";
|
|
3
2
|
type __VLS_Props = {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
form: OmegaFormApi<any, any>;
|
|
4
|
+
fieldMap: Map<string, {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}>;
|
|
6
8
|
};
|
|
7
9
|
declare var __VLS_6: {
|
|
8
|
-
errors:
|
|
10
|
+
errors: OmegaError[];
|
|
9
11
|
showedGeneralErrors: string[];
|
|
10
12
|
};
|
|
11
13
|
type __VLS_Slots = {} & {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
n && n();
|
|
9
|
-
});
|
|
10
|
-
}
|
|
1
|
+
import { Exit as c, Runtime as s } from "effect";
|
|
2
|
+
import { dual as n, isFunction as m } from "./vue-components.es26.js";
|
|
3
|
+
const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
|
+
n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
|
+
const b = (e) => new Promise((t, r) => e.addObserver((o) => {
|
|
6
|
+
c.isSuccess(o) ? t(o.value) : r(s.makeFiberFailure(o.cause));
|
|
7
|
+
}));
|
|
11
8
|
export {
|
|
12
|
-
|
|
9
|
+
u as clone,
|
|
10
|
+
i as cloneTrait,
|
|
11
|
+
b as runtimeFiberAsPromise
|
|
13
12
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
|
-
n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
|
-
const b = (e) => new Promise((t, r) => e.addObserver((o) => {
|
|
6
|
-
c.isSuccess(o) ? t(o.value) : r(s.makeFiberFailure(o.cause));
|
|
7
|
-
}));
|
|
1
|
+
import { isFunction as c } from "./vue-components.es26.js";
|
|
2
|
+
const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
|
|
8
3
|
export {
|
|
9
|
-
|
|
10
|
-
i as
|
|
11
|
-
|
|
4
|
+
s as isFunction,
|
|
5
|
+
i as isObject,
|
|
6
|
+
t as isRecordOrArray
|
|
12
7
|
};
|
|
@@ -1,7 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as F, computed as i, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as b, mergeProps as B } from "vue";
|
|
2
|
+
const N = /* @__PURE__ */ F({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "OmegaArray",
|
|
5
|
+
props: {
|
|
6
|
+
form: {},
|
|
7
|
+
name: {},
|
|
8
|
+
defaultItems: {},
|
|
9
|
+
items: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
const a = n, y = a.form.useStore((e) => e.values), d = i(() => {
|
|
13
|
+
const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
14
|
+
try {
|
|
15
|
+
return e.split(".").reduce((r, t) => r && r[t], y.value);
|
|
16
|
+
} catch (r) {
|
|
17
|
+
return console.error(r), [];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
M(async () => {
|
|
21
|
+
a.defaultItems && !d.value && a.form.setFieldValue(a.name, a.defaultItems);
|
|
22
|
+
});
|
|
23
|
+
const $ = i(() => (r) => {
|
|
24
|
+
const t = r.replace(/\[\d+\]/g, "");
|
|
25
|
+
return a.form.meta[t];
|
|
26
|
+
});
|
|
27
|
+
return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
|
|
28
|
+
default: g(({ field: t, state: f }) => [
|
|
29
|
+
o(e.$slots, "pre-array", l(u({ field: t, state: f }))),
|
|
30
|
+
(s(!0), k(A, null, b(d.value, (C, m) => (s(), c(p(n.form.Field), {
|
|
31
|
+
key: `${n.name}[${Number(m)}]`,
|
|
32
|
+
name: (
|
|
33
|
+
// eslint-disable-next-line
|
|
34
|
+
`${n.name}[${Number(m)}]`
|
|
35
|
+
)
|
|
36
|
+
}, {
|
|
37
|
+
default: g(({ field: v, state: h }) => [
|
|
38
|
+
o(e.$slots, "default", B({ ref_for: !0 }, {
|
|
39
|
+
subField: v,
|
|
40
|
+
subState: h,
|
|
41
|
+
index: Number(m),
|
|
42
|
+
field: t
|
|
43
|
+
}))
|
|
44
|
+
]),
|
|
45
|
+
_: 2
|
|
46
|
+
}, 1032, ["name"]))), 128)),
|
|
47
|
+
o(e.$slots, "post-array", l(u({ field: t, state: f }))),
|
|
48
|
+
o(e.$slots, "field", l(u({ field: t })))
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["name"]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
3
54
|
export {
|
|
4
|
-
|
|
5
|
-
i as isObject,
|
|
6
|
-
t as isRecordOrArray
|
|
55
|
+
N as default
|
|
7
56
|
};
|
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__name: "
|
|
1
|
+
import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
|
|
2
|
+
import { Order as l, pipe as v, Array as u } from "effect-app";
|
|
3
|
+
const I = /* @__PURE__ */ O({
|
|
4
|
+
__name: "OmegaAutoGen",
|
|
5
5
|
props: {
|
|
6
6
|
form: {},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
pick: {},
|
|
8
|
+
omit: {},
|
|
9
|
+
labelMap: { type: Function },
|
|
10
|
+
filterMap: { type: Function },
|
|
11
|
+
order: {},
|
|
12
|
+
sort: {}
|
|
10
13
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
setup(i) {
|
|
15
|
+
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
+
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
+
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
+
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
+
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
+
(t, [o, c]) => {
|
|
21
|
+
const s = e(c, o);
|
|
22
|
+
return s !== !1 && (t[o] = s), t;
|
|
23
|
+
},
|
|
24
|
+
{}
|
|
25
|
+
), n = i, f = (e, r) => {
|
|
26
|
+
const t = r?.indexOf(e) ?? -1;
|
|
27
|
+
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
+
}, d = l.mapInput(
|
|
29
|
+
l.number,
|
|
30
|
+
(e) => f(e.name, n.order || [])
|
|
31
|
+
), b = j(
|
|
32
|
+
() => v(
|
|
33
|
+
n.form.meta,
|
|
34
|
+
// include / exclude
|
|
35
|
+
a(
|
|
36
|
+
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
|
+
),
|
|
38
|
+
(e) => e,
|
|
39
|
+
// labelMap and adding name
|
|
40
|
+
p((e, r) => ({
|
|
41
|
+
name: r,
|
|
42
|
+
label: n.labelMap?.(r) || r,
|
|
43
|
+
...e
|
|
44
|
+
})),
|
|
45
|
+
// filterMap
|
|
46
|
+
n.filterMap ? m((e) => {
|
|
47
|
+
const r = n.filterMap?.(e.name, e);
|
|
48
|
+
return r === void 0 || r === !0 ? e : r;
|
|
49
|
+
}) : (e) => e,
|
|
50
|
+
// transform to array
|
|
51
|
+
(e) => Object.values(e),
|
|
52
|
+
// order
|
|
53
|
+
u.sort(d),
|
|
54
|
+
// sort
|
|
55
|
+
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
+
child: { name: t, label: o, ...c }
|
|
60
|
+
}, () => [
|
|
61
|
+
g(h(i.form).Input, k({
|
|
62
|
+
name: t,
|
|
63
|
+
label: o
|
|
64
|
+
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
+
])), 256));
|
|
52
66
|
}
|
|
53
67
|
});
|
|
54
68
|
export {
|
|
55
|
-
|
|
69
|
+
I as default
|
|
56
70
|
};
|
|
@@ -1,70 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
form: {},
|
|
7
|
-
pick: {},
|
|
8
|
-
omit: {},
|
|
9
|
-
labelMap: { type: Function },
|
|
10
|
-
filterMap: { type: Function },
|
|
11
|
-
order: {},
|
|
12
|
-
sort: {}
|
|
13
|
-
},
|
|
14
|
-
setup(i) {
|
|
15
|
-
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
-
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
-
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
-
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
-
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
-
(t, [o, c]) => {
|
|
21
|
-
const s = e(c, o);
|
|
22
|
-
return s !== !1 && (t[o] = s), t;
|
|
23
|
-
},
|
|
24
|
-
{}
|
|
25
|
-
), n = i, f = (e, r) => {
|
|
26
|
-
const t = r?.indexOf(e) ?? -1;
|
|
27
|
-
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
-
}, d = l.mapInput(
|
|
29
|
-
l.number,
|
|
30
|
-
(e) => f(e.name, n.order || [])
|
|
31
|
-
), b = j(
|
|
32
|
-
() => v(
|
|
33
|
-
n.form.meta,
|
|
34
|
-
// include / exclude
|
|
35
|
-
a(
|
|
36
|
-
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
|
-
),
|
|
38
|
-
(e) => e,
|
|
39
|
-
// labelMap and adding name
|
|
40
|
-
p((e, r) => ({
|
|
41
|
-
name: r,
|
|
42
|
-
label: n.labelMap?.(r) || r,
|
|
43
|
-
...e
|
|
44
|
-
})),
|
|
45
|
-
// filterMap
|
|
46
|
-
n.filterMap ? m((e) => {
|
|
47
|
-
const r = n.filterMap?.(e.name, e);
|
|
48
|
-
return r === void 0 || r === !0 ? e : r;
|
|
49
|
-
}) : (e) => e,
|
|
50
|
-
// transform to array
|
|
51
|
-
(e) => Object.values(e),
|
|
52
|
-
// order
|
|
53
|
-
u.sort(d),
|
|
54
|
-
// sort
|
|
55
|
-
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
-
child: { name: t, label: o, ...c }
|
|
60
|
-
}, () => [
|
|
61
|
-
g(h(i.form).Input, k({
|
|
62
|
-
name: t,
|
|
63
|
-
label: o
|
|
64
|
-
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
-
])), 256));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-6dbb0b00],.v-leave-to[data-v-6dbb0b00]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6dbb0b00],.v-leave-active[data-v-6dbb0b00]{display:grid;transition:all .15s}.v-enter-to[data-v-6dbb0b00],.v-leave-from[data-v-6dbb0b00]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6dbb0b00]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6dbb0b00]{min-height:0}.error-list[data-v-6dbb0b00]{list-style-position:inside}div.error-list[data-v-6dbb0b00]{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-6dbb0b00]{grid-template-columns:auto 1fr}.error-link[data-v-6dbb0b00]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-6dbb0b00]{grid-template-columns:1fr}.error-message[data-v-6dbb0b00]{grid-column:1 / -1}}.error-item[data-v-6dbb0b00]{display:contents}a[data-v-6dbb0b00]{min-width:min-content}.error-link[data-v-6dbb0b00]{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-6dbb0b00],.v-leave-to[data-v-6dbb0b00]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6dbb0b00],.v-leave-active[data-v-6dbb0b00]{display:grid;transition:all .15s}.v-enter-to[data-v-6dbb0b00],.v-leave-from[data-v-6dbb0b00]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6dbb0b00]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6dbb0b00]{min-height:0}.error-list[data-v-6dbb0b00]{list-style-position:inside}div.error-list[data-v-6dbb0b00]{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-6dbb0b00]{grid-template-columns:auto 1fr}.error-link[data-v-6dbb0b00]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-6dbb0b00]{grid-template-columns:1fr}.error-message[data-v-6dbb0b00]{grid-column:1 / -1}}.error-item[data-v-6dbb0b00]{display:contents}a[data-v-6dbb0b00]{min-width:min-content}.error-link[data-v-6dbb0b00]{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.es29.js";
|
|
3
|
+
|
|
4
|
+
import o from "./vue-components.es31.js";
|
|
5
|
+
const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6dbb0b00"]]);
|
|
68
6
|
export {
|
|
69
|
-
|
|
7
|
+
e as default
|
|
70
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{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-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{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.es32.js";
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import m from "./vue-components.es31.js";
|
|
5
|
+
const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8fe92df3"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import m from "./vue-components.es31.js";
|
|
5
|
-
const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8fe92df3"]]);
|
|
1
|
+
import { TraceAPI as r } from "./vue-components.es47.js";
|
|
2
|
+
var t = r.getInstance();
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
t as trace
|
|
8
5
|
};
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
function c(t) {
|
|
2
|
+
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
|
|
3
|
+
var i = t.get(e);
|
|
4
|
+
i ? i.push(f) : t.set(e, [f]);
|
|
5
|
+
}, off: function(e, f) {
|
|
6
|
+
var i = t.get(e);
|
|
7
|
+
i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
|
|
8
|
+
}, emit: function(e, f) {
|
|
9
|
+
var i = t.get(e);
|
|
10
|
+
i && i.slice().map(function(a) {
|
|
11
|
+
a(f);
|
|
12
|
+
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
+
a(e, f);
|
|
14
|
+
});
|
|
15
|
+
} };
|
|
16
|
+
}
|
|
2
17
|
export {
|
|
3
|
-
|
|
18
|
+
c as default
|
|
4
19
|
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
i && i.slice().map(function(a) {
|
|
11
|
-
a(f);
|
|
12
|
-
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
-
a(e, f);
|
|
14
|
-
});
|
|
15
|
-
} };
|
|
1
|
+
import { onMounted as e, onUnmounted as u } from "vue";
|
|
2
|
+
function p(t) {
|
|
3
|
+
let n;
|
|
4
|
+
e(() => {
|
|
5
|
+
const o = t();
|
|
6
|
+
o && (n = o);
|
|
7
|
+
}), u(() => {
|
|
8
|
+
n && n();
|
|
9
|
+
});
|
|
16
10
|
}
|
|
17
11
|
export {
|
|
18
|
-
|
|
12
|
+
p as onMountedWithCleanup
|
|
19
13
|
};
|
|
@@ -1,53 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { mdiLink as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as x, getCurrentInstance as E, computed as h, createBlock as o, openBlock as t, Transition as I, withCtx as a, createElementBlock as m, createCommentVNode as w, renderSlot as O, normalizeProps as S, guardReactiveProps as V, resolveDynamicComponent as s, unref as i, normalizeClass as N, createElementVNode as d, toDisplayString as c, Fragment as M, renderList as b, createTextVNode as k } from "vue";
|
|
2
|
+
import { mdiLink as j } from "@mdi/js";
|
|
3
|
+
import { Array as z, Option as y } from "effect-app";
|
|
4
|
+
import { useIntl as A } from "./vue-components.es3.js";
|
|
4
5
|
const D = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "error-alert"
|
|
7
|
-
}, G = { class: "text-h6 mb-3" }, L = { class: "font-weight-medium" },
|
|
8
|
+
}, G = { class: "text-h6 mb-3" }, L = { class: "font-weight-medium" }, P = { class: "error-message" }, T = ["href"], $ = { key: 1 }, K = /* @__PURE__ */ x({
|
|
8
9
|
__name: "OmegaErrorsInternal",
|
|
9
10
|
props: {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
form: {},
|
|
12
|
+
fieldMap: {}
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
(
|
|
14
|
+
setup(B) {
|
|
15
|
+
const f = E()?.appContext.components.VAlert, u = B, v = u.form.useStore((e) => e.errors), C = u.form.useStore((e) => e.fieldMeta), n = h(
|
|
16
|
+
() => z.filterMap(
|
|
17
|
+
Object.entries(C.value),
|
|
18
|
+
([e, l]) => (l.errors ?? []).length && u.fieldMap.get(e)?.id ? y.some({
|
|
19
|
+
label: u.fieldMap.get(e).label,
|
|
20
|
+
inputId: u.fieldMap.get(e).id,
|
|
21
|
+
errors: (l.errors ?? []).map((r) => r.message).filter(Boolean)
|
|
22
|
+
}) : y.none()
|
|
23
|
+
)
|
|
24
|
+
), { trans: _ } = A(), p = h(() => v.value ? v.value.filter((e) => !!e).flatMap(
|
|
25
|
+
(e) => Object.values(e).filter((l) => !!l).flatMap(
|
|
16
26
|
(l) => l.filter(
|
|
17
27
|
(r) => !!r?.message
|
|
18
28
|
).map((r) => r.message)
|
|
19
29
|
)
|
|
20
30
|
) : []);
|
|
21
|
-
return (
|
|
22
|
-
default:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(
|
|
26
|
-
class:
|
|
31
|
+
return (e, l) => (t(), o(I, null, {
|
|
32
|
+
default: a(() => [
|
|
33
|
+
n.value.length || p.value.length ? (t(), m("div", D, [
|
|
34
|
+
O(e.$slots, "default", S(V({ errors: n.value, showedGeneralErrors: p.value })), () => [
|
|
35
|
+
(t(), o(s(i(f) ? "v-alert" : "div"), {
|
|
36
|
+
class: N([i(f) ? "mb-4" : "error-alert-content", "mb-4"]),
|
|
27
37
|
type: "error",
|
|
28
38
|
variant: "tonal",
|
|
29
39
|
role: "alert",
|
|
30
40
|
"aria-live": "polite"
|
|
31
41
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
default: a(() => [
|
|
43
|
+
d("div", G, c(i(_)("form.includes_error")) + ": ", 1),
|
|
44
|
+
n.value.length ? (t(), o(s(n.value.length > 1 ? "ul" : "div"), {
|
|
35
45
|
key: 0,
|
|
36
46
|
class: "error-list"
|
|
37
47
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
(
|
|
48
|
+
default: a(() => [
|
|
49
|
+
(t(!0), m(M, null, b(n.value, (r) => (t(), o(s(n.value.length > 1 ? "li" : "div"), {
|
|
40
50
|
key: r.inputId,
|
|
41
51
|
class: "error-item"
|
|
42
52
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(
|
|
47
|
-
default:
|
|
48
|
-
(
|
|
49
|
-
default:
|
|
50
|
-
k(
|
|
53
|
+
default: a(() => [
|
|
54
|
+
d("div", L, c(r.label), 1),
|
|
55
|
+
d("div", P, [
|
|
56
|
+
(t(), o(s(r.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
|
|
57
|
+
default: a(() => [
|
|
58
|
+
(t(!0), m(M, null, b(r.errors, (g) => (t(), o(s(r.errors.length > 1 ? "li" : "span"), { key: g }, {
|
|
59
|
+
default: a(() => [
|
|
60
|
+
k(c(g), 1)
|
|
51
61
|
]),
|
|
52
62
|
_: 2
|
|
53
63
|
}, 1024))), 128))
|
|
@@ -55,37 +65,37 @@ const D = {
|
|
|
55
65
|
_: 2
|
|
56
66
|
}, 1024))
|
|
57
67
|
]),
|
|
58
|
-
|
|
68
|
+
d("a", {
|
|
59
69
|
href: `#${r.inputId}`,
|
|
60
70
|
class: "error-link"
|
|
61
71
|
}, [
|
|
62
|
-
(
|
|
63
|
-
icon:
|
|
72
|
+
(t(), o(s(i(f) ? "v-icon" : "i"), {
|
|
73
|
+
icon: i(j),
|
|
64
74
|
"aria-hidden": "true"
|
|
65
75
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
76
|
+
default: a(() => [...l[0] || (l[0] = [
|
|
77
|
+
d("i", null, "🔗", -1)
|
|
68
78
|
])]),
|
|
69
79
|
_: 1
|
|
70
80
|
}, 8, ["icon"])),
|
|
71
|
-
k(" " +
|
|
72
|
-
], 8,
|
|
81
|
+
k(" " + c(i(_)("form.fix_input")), 1)
|
|
82
|
+
], 8, T)
|
|
73
83
|
]),
|
|
74
84
|
_: 2
|
|
75
85
|
}, 1024))), 128))
|
|
76
86
|
]),
|
|
77
87
|
_: 1
|
|
78
|
-
})) : (
|
|
88
|
+
})) : (t(), m("span", $, c(p.value[0]), 1))
|
|
79
89
|
]),
|
|
80
90
|
_: 1
|
|
81
91
|
}, 8, ["class"]))
|
|
82
92
|
], !0)
|
|
83
|
-
])) :
|
|
93
|
+
])) : w("", !0)
|
|
84
94
|
]),
|
|
85
95
|
_: 3
|
|
86
96
|
}));
|
|
87
97
|
}
|
|
88
98
|
});
|
|
89
99
|
export {
|
|
90
|
-
|
|
100
|
+
K as default
|
|
91
101
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, createElementBlock as d, openBlock as a, withModifiers as l, createElementVNode as u, unref as s, renderSlot as b } from "vue";
|
|
2
2
|
import { useStore as f } from "@tanstack/vue-form";
|
|
3
|
-
import { getOmegaStore as c } from "./vue-components.
|
|
3
|
+
import { getOmegaStore as c } from "./vue-components.es35.js";
|
|
4
4
|
const p = ["disabled"], V = /* @__PURE__ */ m({
|
|
5
5
|
__name: "OmegaWrapper",
|
|
6
6
|
props: {
|