@effect-app/vue-components 4.0.0-beta.2 → 4.0.0-beta.21
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/OmegaAutoGen.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +11 -11
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +2 -4
- package/dist/types/utils/index.d.ts +3 -4
- package/dist/vue-components.es.js +14 -13
- package/dist/vue-components.es10.js +131 -129
- package/dist/vue-components.es11.js +2 -2
- package/dist/vue-components.es12.js +382 -340
- package/dist/vue-components.es16.js +4 -723
- package/dist/vue-components.es17.js +10 -140
- package/dist/vue-components.es18.js +55 -4
- package/dist/vue-components.es19.js +54 -11
- package/dist/vue-components.es2.js +18 -17
- package/dist/vue-components.es20.js +6 -3
- package/dist/vue-components.es21.js +6 -24
- package/dist/vue-components.es22.js +3 -4
- package/dist/vue-components.es23.js +3 -8
- package/dist/vue-components.es24.js +2 -55
- package/dist/vue-components.es25.js +2 -69
- package/dist/vue-components.es26.js +2 -6
- package/dist/vue-components.es27.js +2 -6
- package/dist/vue-components.es28.js +17 -3
- package/dist/vue-components.es29.js +11 -3
- package/dist/vue-components.es3.js +11 -10
- package/dist/vue-components.es30.js +29 -2
- package/dist/vue-components.es31.js +4 -2
- package/dist/vue-components.es32.js +1 -1
- package/dist/vue-components.es33.js +1 -1
- package/dist/vue-components.es34.js +111 -17
- package/dist/vue-components.es36.js +7 -318
- package/dist/vue-components.es37.js +31 -560
- package/dist/vue-components.es39.js +190 -50
- package/dist/vue-components.es41.js +4 -4
- package/dist/vue-components.es42.js +23 -4
- package/dist/vue-components.es43.js +5 -24
- package/dist/vue-components.es44.js +20 -74
- package/dist/vue-components.es45.js +29 -39
- package/dist/vue-components.es46.js +21 -313
- package/dist/vue-components.es47.js +11 -98
- package/dist/vue-components.es48.js +5 -31
- package/dist/vue-components.es49.js +19 -2
- package/dist/vue-components.es5.js +1 -1
- package/dist/vue-components.es50.js +9 -2
- package/dist/vue-components.es51.js +31 -2
- package/dist/vue-components.es52.js +47 -110
- package/dist/{vue-components.es75.js → vue-components.es53.js} +5 -5
- package/dist/vue-components.es54.js +11 -7
- package/dist/vue-components.es55.js +64 -31
- package/dist/{vue-components.es93.js → vue-components.es56.js} +1 -1
- package/dist/vue-components.es57.js +15 -190
- package/dist/{vue-components.es95.js → vue-components.es58.js} +3 -3
- package/dist/vue-components.es59.js +28 -37
- package/dist/vue-components.es60.js +39 -80
- package/dist/vue-components.es61.js +2 -41
- package/dist/vue-components.es62.js +44 -5
- package/dist/vue-components.es63.js +2 -4
- package/dist/vue-components.es7.js +35 -35
- package/package.json +10 -10
- package/src/components/OmegaForm/OmegaAutoGen.vue +25 -30
- package/src/components/OmegaForm/OmegaErrorsInternal.vue +2 -3
- package/src/components/OmegaForm/OmegaFormStuff.ts +311 -301
- package/src/components/OmegaForm/OmegaInternalInput.vue +3 -1
- package/src/components/OmegaForm/useOmegaForm.ts +30 -32
- package/src/utils/index.ts +4 -8
- package/dist/vue-components.es100.js +0 -4
- package/dist/vue-components.es35.js +0 -13
- package/dist/vue-components.es38.js +0 -29
- package/dist/vue-components.es40.js +0 -66
- package/dist/vue-components.es64.js +0 -25
- package/dist/vue-components.es65.js +0 -7
- package/dist/vue-components.es66.js +0 -23
- package/dist/vue-components.es67.js +0 -32
- package/dist/vue-components.es68.js +0 -24
- package/dist/vue-components.es69.js +0 -14
- package/dist/vue-components.es70.js +0 -7
- package/dist/vue-components.es71.js +0 -21
- package/dist/vue-components.es72.js +0 -11
- package/dist/vue-components.es73.js +0 -33
- package/dist/vue-components.es74.js +0 -50
- package/dist/vue-components.es76.js +0 -103
- package/dist/vue-components.es77.js +0 -84
- package/dist/vue-components.es78.js +0 -23
- package/dist/vue-components.es79.js +0 -14
- package/dist/vue-components.es80.js +0 -115
- package/dist/vue-components.es81.js +0 -5
- package/dist/vue-components.es82.js +0 -34
- package/dist/vue-components.es83.js +0 -4
- package/dist/vue-components.es84.js +0 -4
- package/dist/vue-components.es85.js +0 -18
- package/dist/vue-components.es86.js +0 -17
- package/dist/vue-components.es87.js +0 -72
- package/dist/vue-components.es88.js +0 -10
- package/dist/vue-components.es89.js +0 -4
- package/dist/vue-components.es90.js +0 -17
- package/dist/vue-components.es91.js +0 -13
- package/dist/vue-components.es92.js +0 -67
- package/dist/vue-components.es94.js +0 -19
- package/dist/vue-components.es96.js +0 -31
- package/dist/vue-components.es97.js +0 -44
- package/dist/vue-components.es98.js +0 -4
- package/dist/vue-components.es99.js +0 -46
|
@@ -1,85 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ROOT_CONTEXT as l } from "./vue-components.es42.js";
|
|
2
|
+
var c = function(t, o) {
|
|
3
|
+
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
|
4
|
+
if (!n) return t;
|
|
5
|
+
var e = n.call(t), a, r = [], u;
|
|
6
|
+
try {
|
|
7
|
+
for (; (o === void 0 || o-- > 0) && !(a = e.next()).done; ) r.push(a.value);
|
|
8
|
+
} catch (i) {
|
|
9
|
+
u = { error: i };
|
|
10
|
+
} finally {
|
|
8
11
|
try {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
function f(t, r = 0) {
|
|
15
|
-
if (Array.isArray(t)) {
|
|
16
|
-
if (s.has(t)) return m;
|
|
17
|
-
if (s.add(t), !a || t.length <= 1) return `[${t.map((u) => f(u, r)).join(",")}]`;
|
|
18
|
-
const e = t.map((u) => f(u, r + 1)).join(`,
|
|
19
|
-
` + o(r + 1));
|
|
20
|
-
return `[
|
|
21
|
-
${o(r + 1)}${e}
|
|
22
|
-
${o(r)}]`;
|
|
23
|
-
}
|
|
24
|
-
if (t instanceof Date) return d(t);
|
|
25
|
-
if (!i?.ignoreToString && b(t, "toString") && typeof t.toString == "function" && t.toString !== Object.prototype.toString && t.toString !== Array.prototype.toString) {
|
|
26
|
-
const e = O(t);
|
|
27
|
-
return t instanceof Error && t.cause ? `${e} (cause: ${f(t.cause, r)})` : e;
|
|
12
|
+
a && !a.done && (n = e.return) && n.call(e);
|
|
13
|
+
} finally {
|
|
14
|
+
if (u) throw u.error;
|
|
28
15
|
}
|
|
29
|
-
if (typeof t == "string") return JSON.stringify(t);
|
|
30
|
-
if (typeof t == "number" || t == null || typeof t == "boolean" || typeof t == "symbol") return String(t);
|
|
31
|
-
if (typeof t == "bigint") return String(t) + "n";
|
|
32
|
-
if (typeof t == "object" || typeof t == "function") {
|
|
33
|
-
if (s.has(t)) return m;
|
|
34
|
-
if (s.add(t), h in t) return w(l(t));
|
|
35
|
-
if (Symbol.iterator in t)
|
|
36
|
-
return `${t.constructor.name}(${f(Array.from(t), r)})`;
|
|
37
|
-
const e = $(t);
|
|
38
|
-
if (!a || e.length <= 1) {
|
|
39
|
-
const y = `{${e.map((S) => `${p(S)}:${f(t[S], r)}`).join(",")}}`;
|
|
40
|
-
return g(t, y);
|
|
41
|
-
}
|
|
42
|
-
const u = `{
|
|
43
|
-
${e.map((y) => `${o(r + 1)}${p(y)}: ${f(t[y], r + 1)}`).join(`,
|
|
44
|
-
`)}
|
|
45
|
-
${o(r)}}`;
|
|
46
|
-
return g(t, u);
|
|
47
|
-
}
|
|
48
|
-
return String(t);
|
|
49
16
|
}
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
let c = [];
|
|
76
|
-
const s = JSON.stringify(n, (a, o) => typeof o == "object" && o !== null ? c.includes(o) ? void 0 : c.push(o) && j(o) : o, i?.space);
|
|
77
|
-
return c = void 0, s;
|
|
78
|
-
}
|
|
17
|
+
return r;
|
|
18
|
+
}, p = function(t, o, n) {
|
|
19
|
+
if (n || arguments.length === 2) for (var e = 0, a = o.length, r; e < a; e++)
|
|
20
|
+
(r || !(e in o)) && (r || (r = Array.prototype.slice.call(o, 0, e)), r[e] = o[e]);
|
|
21
|
+
return t.concat(r || Array.prototype.slice.call(o));
|
|
22
|
+
}, y = (
|
|
23
|
+
/** @class */
|
|
24
|
+
(function() {
|
|
25
|
+
function t() {
|
|
26
|
+
}
|
|
27
|
+
return t.prototype.active = function() {
|
|
28
|
+
return l;
|
|
29
|
+
}, t.prototype.with = function(o, n, e) {
|
|
30
|
+
for (var a = [], r = 3; r < arguments.length; r++)
|
|
31
|
+
a[r - 3] = arguments[r];
|
|
32
|
+
return n.call.apply(n, p([e], c(a), !1));
|
|
33
|
+
}, t.prototype.bind = function(o, n) {
|
|
34
|
+
return n;
|
|
35
|
+
}, t.prototype.enable = function() {
|
|
36
|
+
return this;
|
|
37
|
+
}, t.prototype.disable = function() {
|
|
38
|
+
return this;
|
|
39
|
+
}, t;
|
|
40
|
+
})()
|
|
41
|
+
);
|
|
79
42
|
export {
|
|
80
|
-
|
|
81
|
-
d as formatDate,
|
|
82
|
-
K as formatJson,
|
|
83
|
-
J as formatPath,
|
|
84
|
-
p as formatPropertyKey
|
|
43
|
+
y as NoopContextManager
|
|
85
44
|
};
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
switch (t.length) {
|
|
3
|
-
case 0:
|
|
4
|
-
return e;
|
|
5
|
-
case 1:
|
|
6
|
-
return t[0](e);
|
|
7
|
-
case 2:
|
|
8
|
-
return t[1](t[0](e));
|
|
9
|
-
case 3:
|
|
10
|
-
return t[2](t[1](t[0](e)));
|
|
11
|
-
case 4:
|
|
12
|
-
return t[3](t[2](t[1](t[0](e))));
|
|
13
|
-
case 5:
|
|
14
|
-
return t[4](t[3](t[2](t[1](t[0](e)))));
|
|
15
|
-
case 6:
|
|
16
|
-
return t[5](t[4](t[3](t[2](t[1](t[0](e))))));
|
|
17
|
-
case 7:
|
|
18
|
-
return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));
|
|
19
|
-
case 8:
|
|
20
|
-
return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));
|
|
21
|
-
case 9:
|
|
22
|
-
return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));
|
|
23
|
-
default: {
|
|
24
|
-
let n = e;
|
|
25
|
-
for (let u = 0, c = t.length; u < c; u++)
|
|
26
|
-
n = t[u](n);
|
|
27
|
-
return n;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}, p = {
|
|
31
|
-
pipe() {
|
|
32
|
-
return o(this, arguments);
|
|
33
|
-
}
|
|
34
|
-
}, i = /* @__PURE__ */ (function() {
|
|
35
|
-
function e() {
|
|
36
|
-
}
|
|
37
|
-
return e.prototype = p, e;
|
|
38
|
-
})();
|
|
1
|
+
var r = "1.9.0";
|
|
39
2
|
export {
|
|
40
|
-
|
|
41
|
-
p as Prototype,
|
|
42
|
-
o as pipeArguments
|
|
3
|
+
r as VERSION
|
|
43
4
|
};
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { VERSION as d } from "./vue-components.es61.js";
|
|
2
|
+
var h = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
3
|
+
function s(c) {
|
|
4
|
+
var m = /* @__PURE__ */ new Set([c]), f = /* @__PURE__ */ new Set(), t = c.match(h);
|
|
5
|
+
if (!t)
|
|
6
|
+
return function() {
|
|
7
|
+
return !1;
|
|
8
|
+
};
|
|
9
|
+
var e = {
|
|
10
|
+
major: +t[1],
|
|
11
|
+
minor: +t[2],
|
|
12
|
+
patch: +t[3],
|
|
13
|
+
prerelease: t[4]
|
|
14
|
+
};
|
|
15
|
+
if (e.prerelease != null)
|
|
16
|
+
return function(r) {
|
|
17
|
+
return r === c;
|
|
18
|
+
};
|
|
19
|
+
function a(n) {
|
|
20
|
+
return f.add(n), !1;
|
|
21
|
+
}
|
|
22
|
+
function p(n) {
|
|
23
|
+
return m.add(n), !0;
|
|
24
|
+
}
|
|
25
|
+
return function(r) {
|
|
26
|
+
if (m.has(r))
|
|
27
|
+
return !0;
|
|
28
|
+
if (f.has(r))
|
|
29
|
+
return !1;
|
|
30
|
+
var i = r.match(h);
|
|
31
|
+
if (!i)
|
|
32
|
+
return a(r);
|
|
33
|
+
var u = {
|
|
34
|
+
major: +i[1],
|
|
35
|
+
minor: +i[2],
|
|
36
|
+
patch: +i[3],
|
|
37
|
+
prerelease: i[4]
|
|
38
|
+
};
|
|
39
|
+
return u.prerelease != null || e.major !== u.major ? a(r) : e.major === 0 ? e.minor === u.minor && e.patch <= u.patch ? p(r) : a(r) : e.minor <= u.minor ? p(r) : a(r);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
var v = s(d);
|
|
3
43
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
c as succeed
|
|
44
|
+
s as _makeCompatibilityCheck,
|
|
45
|
+
v as isCompatible
|
|
7
46
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import o from "./vue-components.es57.js";
|
|
3
|
-
|
|
1
|
+
var o = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {};
|
|
4
2
|
export {
|
|
5
|
-
o as
|
|
3
|
+
o as _globalThis
|
|
6
4
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import
|
|
2
|
+
import { defineComponent as k, computed as a, getCurrentInstance as q, useAttrs as B, useSlots as S, useId as w, renderSlot as p, normalizeProps as s, guardReactiveProps as f, createElementVNode as F, normalizeClass as I, createBlock as L, createCommentVNode as A, unref as O, openBlock as R, mergeProps as V, createSlots as z, withCtx as T } from "vue";
|
|
3
|
+
import { useStore as c } from "@tanstack/vue-form";
|
|
4
|
+
import U from "./vue-components.es39.js";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const J = /* @__PURE__ */ k({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "OmegaInternalInput",
|
|
9
9
|
props: {
|
|
@@ -18,31 +18,31 @@ const H = /* @__PURE__ */ N({
|
|
|
18
18
|
register: {},
|
|
19
19
|
options: { default: void 0 }
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
23
|
-
const { class: t, ...
|
|
24
|
-
return
|
|
25
|
-
}), i =
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
e.register(
|
|
29
|
-
const
|
|
21
|
+
setup(g) {
|
|
22
|
+
const e = g, l = a(() => e.required ?? e?.meta?.required), v = q()?.appContext.components.VTextField, o = B(), y = S(), h = a(() => {
|
|
23
|
+
const { class: t, ...n } = o;
|
|
24
|
+
return n;
|
|
25
|
+
}), b = a(() => o.class), i = w(), m = e.field;
|
|
26
|
+
c(m.store, (t) => t);
|
|
27
|
+
const C = c(m.form.store, (t) => t.fieldMeta), x = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown");
|
|
28
|
+
e.register(a(() => ({ name: e.field.name, label: e.label, id: i })));
|
|
29
|
+
const M = a(() => C.value[e.field.name]?.errors ?? []), u = a(
|
|
30
30
|
() => (
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
-
|
|
32
|
+
M.value.map((t) => t?.message).filter(Boolean)
|
|
33
33
|
)
|
|
34
|
-
),
|
|
35
|
-
|
|
34
|
+
), _ = (t) => t == null || t === !1 || t === "" || Number.isNaN(t), P = (t) => {
|
|
35
|
+
_(t) && e.meta?.type !== "boolean" && e.meta?.nullableOrUndefined ? e.field.handleChange(
|
|
36
36
|
e.meta.nullableOrUndefined === "undefined" ? void 0 : null
|
|
37
|
-
) : e.field.handleChange(t), e.field.setMeta((
|
|
38
|
-
},
|
|
39
|
-
const
|
|
40
|
-
get(
|
|
41
|
-
return $ === "handleChange" ?
|
|
37
|
+
) : e.field.handleChange(t), e.field.setMeta((n) => ({ ...n, errorMap: { ...n.errorMap, onSubmit: void 0 } }));
|
|
38
|
+
}, N = (t) => {
|
|
39
|
+
const n = {
|
|
40
|
+
get(W, $, Z) {
|
|
41
|
+
return $ === "handleChange" ? P : Reflect.get(...arguments);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return new Proxy(t,
|
|
45
|
-
}, r =
|
|
44
|
+
return new Proxy(t, n);
|
|
45
|
+
}, r = a(() => ({
|
|
46
46
|
inputProps: {
|
|
47
47
|
id: i,
|
|
48
48
|
required: l.value,
|
|
@@ -50,34 +50,34 @@ const H = /* @__PURE__ */ N({
|
|
|
50
50
|
maxLength: e.meta?.type === "string" && e.meta?.maxLength,
|
|
51
51
|
max: e.meta?.type === "number" && (e.meta?.maximum ?? (typeof e.meta?.exclusiveMaximum == "number" && e.meta.exclusiveMaximum - 1)),
|
|
52
52
|
min: e.meta?.type === "number" && (e.meta?.minimum ?? (typeof e.meta?.exclusiveMinimum == "number" && e.meta.exclusiveMinimum + 1)),
|
|
53
|
-
errorMessages:
|
|
54
|
-
error: !!
|
|
55
|
-
type:
|
|
53
|
+
errorMessages: u.value,
|
|
54
|
+
error: !!u.value.length,
|
|
55
|
+
type: x.value,
|
|
56
56
|
// Only add asterisk if label slot is not provided (slot has full control)
|
|
57
57
|
label: y.label ? e.label : `${e.label}${l.value ? " *" : ""}`,
|
|
58
58
|
options: e.options,
|
|
59
59
|
inputClass: e.inputClass
|
|
60
60
|
},
|
|
61
61
|
state: e.state,
|
|
62
|
-
field:
|
|
62
|
+
field: N(e.field)
|
|
63
63
|
}));
|
|
64
|
-
return (t,
|
|
65
|
-
|
|
66
|
-
class:
|
|
64
|
+
return (t, n) => p(t.$slots, "default", s(f({ ...r.value.inputProps, field: r.value.field, state: r.value.state })), () => [
|
|
65
|
+
F("div", {
|
|
66
|
+
class: I(b.value)
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
O(v) ? (R(), L(U, s(V({ key: 0 }, { ...h.value, ...r.value, class: e.inputClass })), z({ _: 2 }, [
|
|
69
69
|
t.$slots.label ? {
|
|
70
70
|
name: "label",
|
|
71
|
-
fn:
|
|
72
|
-
|
|
71
|
+
fn: T((d) => [
|
|
72
|
+
p(t.$slots, "label", s(f(d)))
|
|
73
73
|
]),
|
|
74
74
|
key: "0"
|
|
75
75
|
} : void 0
|
|
76
|
-
]), 1040)) :
|
|
76
|
+
]), 1040)) : A("", !0)
|
|
77
77
|
], 2)
|
|
78
78
|
]);
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
J as default
|
|
83
83
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.21",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
|
-
"effect": "^4.0.0-beta.
|
|
6
|
+
"effect": "^4.0.0-beta.36",
|
|
7
7
|
"intl-messageformat": "^11.1.2",
|
|
8
8
|
"mdi-js": "^1.0.1",
|
|
9
9
|
"primeflex": "^4.0.0",
|
|
10
10
|
"primeicons": "^7.0.0",
|
|
11
11
|
"primevue": "^4.5.4",
|
|
12
12
|
"vue": "^3.5.29",
|
|
13
|
-
"vuetify": "^4.0.
|
|
13
|
+
"vuetify": "^4.0.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@storybook/vue3": "^10.2.
|
|
17
|
-
"@storybook/vue3-vite": "^10.2.
|
|
16
|
+
"@storybook/vue3": "^10.2.15",
|
|
17
|
+
"@storybook/vue3-vite": "^10.2.15",
|
|
18
18
|
"@types/node": "^25.3.3",
|
|
19
19
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
20
20
|
"@vue/test-utils": "^2.4.6",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"jsdom": "^28.1.0",
|
|
24
24
|
"rimraf": "^6.1.3",
|
|
25
25
|
"sass": "^1.97.3",
|
|
26
|
-
"storybook": "^10.2.
|
|
26
|
+
"storybook": "^10.2.15",
|
|
27
27
|
"typescript": "~5.9.3",
|
|
28
28
|
"vite": "^7.3.1",
|
|
29
29
|
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"vue-router": "^5.0.3",
|
|
33
33
|
"vue-toastification": "^2.0.0-rc.5",
|
|
34
34
|
"vue-tsc": "^3.2.5",
|
|
35
|
-
"vuetify": "^4.0.
|
|
36
|
-
"@effect-app/eslint-shared-config": "0.5.7-beta.
|
|
35
|
+
"vuetify": "^4.0.1",
|
|
36
|
+
"@effect-app/eslint-shared-config": "0.5.7-beta.2"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"src",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"highlight.js": "^11.11.1",
|
|
54
54
|
"mitt": "^3.0.1",
|
|
55
55
|
"vue3-highlightjs": "^1.0.5",
|
|
56
|
-
"@effect-app/vue": "4.0.0-beta.
|
|
57
|
-
"effect-app": "4.0.0-beta.
|
|
56
|
+
"@effect-app/vue": "4.0.0-beta.21",
|
|
57
|
+
"effect-app": "4.0.0-beta.21"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"check": "vue-tsc",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
Name extends DeepKeys<From>"
|
|
21
21
|
>
|
|
22
22
|
import { type DeepKeys } from "@tanstack/vue-form"
|
|
23
|
-
import {
|
|
24
|
-
import * as Order from "effect/Order"
|
|
23
|
+
import { Order } from "effect-app"
|
|
25
24
|
import { computed } from "vue"
|
|
26
25
|
import { type FieldMeta, type FieldPath, type OmegaAutoGenMeta, type OmegaInputProps } from "./OmegaFormStuff"
|
|
27
26
|
|
|
@@ -71,37 +70,33 @@ const orderBy: Order.Order<NewMeta> = Order.mapInput(
|
|
|
71
70
|
(x: NewMeta) => namePosition(x.name, props.order || [])
|
|
72
71
|
)
|
|
73
72
|
|
|
74
|
-
const children = computed<NewMeta[]>(() =>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
filterRecord((_, metaKey) =>
|
|
73
|
+
const children = computed<NewMeta[]>(() => {
|
|
74
|
+
const included = filterRecord((value, metaKey) =>
|
|
75
|
+
Boolean(value)
|
|
76
|
+
&& (
|
|
79
77
|
props.pick
|
|
80
78
|
? props.pick.includes(metaKey) && !props.omit?.includes(metaKey)
|
|
81
79
|
: !props.omit?.includes(metaKey)
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
props.sort ? (items: NewMeta[]) => [...items].sort((a, b) => props.sort!(a, b)) : (x: NewMeta[]) => x
|
|
103
|
-
)
|
|
104
|
-
)
|
|
80
|
+
)
|
|
81
|
+
)(props.form.meta as Record<DeepKeys<From>, FieldMeta | undefined>) as Record<DeepKeys<From>, FieldMeta>
|
|
82
|
+
|
|
83
|
+
const withLabels = mapObject((metaValue: FieldMeta, metaKey) => ({
|
|
84
|
+
name: metaKey,
|
|
85
|
+
label: props.labelMap?.(metaKey) || metaKey,
|
|
86
|
+
...metaValue
|
|
87
|
+
}))(included) as unknown as Record<DeepKeys<From>, NewMeta>
|
|
88
|
+
|
|
89
|
+
const filtered = props.filterMap
|
|
90
|
+
? filterMapRecord((m: NewMeta) => {
|
|
91
|
+
const result = props.filterMap?.(m.name, m)
|
|
92
|
+
return result === undefined || result === true ? m : result
|
|
93
|
+
})(withLabels) as Record<DeepKeys<From>, NewMeta>
|
|
94
|
+
: withLabels
|
|
95
|
+
|
|
96
|
+
const sorted = [...Object.values(filtered) as NewMeta[]].sort(orderBy)
|
|
97
|
+
|
|
98
|
+
return props.sort ? sorted.sort(props.sort) : sorted
|
|
99
|
+
})
|
|
105
100
|
|
|
106
101
|
defineSlots<{
|
|
107
102
|
default(props: { child: NewMeta }): void
|
|
@@ -130,10 +130,9 @@ const showedGeneralErrors = computed(() => {
|
|
|
130
130
|
.flatMap((issues) =>
|
|
131
131
|
issues
|
|
132
132
|
.filter(
|
|
133
|
-
(issue): issue is StandardSchemaV1Issue & { message: string } =>
|
|
134
|
-
typeof (issue as { message?: unknown })?.message === "string"
|
|
133
|
+
(issue): issue is StandardSchemaV1Issue & { message: string } => Boolean(issue?.message)
|
|
135
134
|
)
|
|
136
|
-
.map((issue) =>
|
|
135
|
+
.map((issue) => issue.message)
|
|
137
136
|
)
|
|
138
137
|
)
|
|
139
138
|
})
|