@effect-app/vue-components 0.18.5 → 0.18.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/vue-components.es12.js +2 -2
- package/dist/vue-components.es20.js +38 -38
- package/dist/vue-components.es22.js +1 -1
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es24.js +41 -89
- package/dist/vue-components.es26.js +89 -41
- package/dist/vue-components.es27.js +1 -1
- package/dist/vue-components.es7.js +1 -1
- package/package.json +2 -2
- package/src/components/OmegaForm/OmegaWrapper.vue +8 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-63452e71]{display:contents}fieldset[disabled][data-v-63452e71]>*{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-63452e71]{display:contents}fieldset[disabled][data-v-63452e71]>*{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
2
|
import o from "./vue-components.es20.js";
|
|
3
3
|
|
|
4
4
|
import r from "./vue-components.es17.js";
|
|
5
|
-
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
5
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-63452e71"]]);
|
|
6
6
|
export {
|
|
7
7
|
e as default
|
|
8
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { getOmegaStore as
|
|
4
|
-
import { provideOmegaErrors as
|
|
5
|
-
import { useOmegaForm as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as F, getCurrentInstance as B, computed as v, onBeforeMount as C, watch as g, createElementBlock as O, openBlock as S, withModifiers as I, createElementVNode as L, unref as m, renderSlot as d, createCommentVNode as V, Fragment as k } from "vue";
|
|
2
|
+
import { useStore as h } from "@tanstack/vue-form";
|
|
3
|
+
import { getOmegaStore as $ } from "./vue-components.es25.js";
|
|
4
|
+
import { provideOmegaErrors as A } from "./vue-components.es8.js";
|
|
5
|
+
import { useOmegaForm as K } from "./vue-components.es9.js";
|
|
6
|
+
const _ = ["disabled"], D = /* @__PURE__ */ F({
|
|
7
7
|
__name: "OmegaWrapper",
|
|
8
8
|
props: {
|
|
9
9
|
omegaConfig: {},
|
|
@@ -22,21 +22,21 @@ const K = ["disabled"], W = /* @__PURE__ */ M({
|
|
|
22
22
|
isLoading: { type: Boolean, default: void 0 },
|
|
23
23
|
onSubmit: {}
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const o =
|
|
27
|
-
|
|
28
|
-
const n =
|
|
25
|
+
setup(y) {
|
|
26
|
+
const o = y, w = B(), E = ({ value: e }) => new Promise((r) => {
|
|
27
|
+
w.emit("submit", e);
|
|
28
|
+
const n = g(() => o.isLoading, (t) => {
|
|
29
29
|
t || (r(), n.stop());
|
|
30
30
|
});
|
|
31
|
-
}), u = o.form || !o.schema ? void 0 :
|
|
31
|
+
}), u = typeof o.isLoading < "u" ? E : typeof o.onSubmit < "u" ? o.onSubmit : void 0, l = o.form || !o.schema ? void 0 : K(
|
|
32
32
|
o.schema,
|
|
33
33
|
{
|
|
34
34
|
...o,
|
|
35
|
-
onSubmit:
|
|
35
|
+
onSubmit: u
|
|
36
36
|
},
|
|
37
37
|
o.omegaConfig
|
|
38
|
-
), s =
|
|
39
|
-
|
|
38
|
+
), s = v(() => o.form ?? l);
|
|
39
|
+
C(() => {
|
|
40
40
|
if (!o.form) return;
|
|
41
41
|
const e = Object.keys(o.form.options || {}), r = /* @__PURE__ */ new Set([
|
|
42
42
|
"omegaConfig",
|
|
@@ -47,7 +47,7 @@ const K = ["disabled"], W = /* @__PURE__ */ M({
|
|
|
47
47
|
"schema"
|
|
48
48
|
]), n = Object.fromEntries(
|
|
49
49
|
Object.entries(o).filter(
|
|
50
|
-
([a,
|
|
50
|
+
([a, c]) => a === "isLoading" ? !1 : !r.has(a) && c !== void 0
|
|
51
51
|
)
|
|
52
52
|
), t = Object.keys(n), i = e.filter(
|
|
53
53
|
(a) => t.includes(a) && n[a] !== void 0
|
|
@@ -60,31 +60,31 @@ ${i.join(
|
|
|
60
60
|
)}.
|
|
61
61
|
Props will overwrite existing form options. This might indicate a configuration issue.`
|
|
62
62
|
);
|
|
63
|
-
const
|
|
63
|
+
const b = {
|
|
64
64
|
...s.value.options,
|
|
65
65
|
...n
|
|
66
66
|
};
|
|
67
|
-
s.value.options = Object.fromEntries(
|
|
67
|
+
u && (b.onSubmit = u), s.value.options = Object.fromEntries(
|
|
68
68
|
// TODO
|
|
69
|
-
Object.entries(
|
|
70
|
-
([a,
|
|
69
|
+
Object.entries(b).filter(
|
|
70
|
+
([a, c]) => c !== void 0
|
|
71
71
|
)
|
|
72
72
|
);
|
|
73
73
|
});
|
|
74
|
-
const
|
|
74
|
+
const j = h(
|
|
75
75
|
s.value.store,
|
|
76
76
|
(e) => e.isSubmitting
|
|
77
|
-
),
|
|
77
|
+
), p = $(
|
|
78
78
|
s.value,
|
|
79
79
|
o.subscribe
|
|
80
|
-
),
|
|
80
|
+
), M = h(
|
|
81
81
|
s.value.store,
|
|
82
82
|
(e) => e.submissionAttempts
|
|
83
|
-
),
|
|
84
|
-
return
|
|
85
|
-
() => [s.value.filterItems,
|
|
83
|
+
), f = v(() => s.value.useStore((e) => e.errors));
|
|
84
|
+
return g(
|
|
85
|
+
() => [s.value.filterItems, f.value.value],
|
|
86
86
|
() => {
|
|
87
|
-
const e = s.value.filterItems, r =
|
|
87
|
+
const e = s.value.filterItems, r = f.value.value;
|
|
88
88
|
return e ? r ? (Object.values(r).filter(
|
|
89
89
|
(t) => !!t
|
|
90
90
|
).flatMap(
|
|
@@ -101,23 +101,23 @@ Props will overwrite existing form options. This might indicate a configuration
|
|
|
101
101
|
});
|
|
102
102
|
}), {}) : {} : {};
|
|
103
103
|
}
|
|
104
|
-
),
|
|
104
|
+
), A(M, f.value, o.showErrorsOn), (e, r) => (S(), O("form", {
|
|
105
105
|
novalidate: "",
|
|
106
|
-
onSubmit: r[0] || (r[0] =
|
|
106
|
+
onSubmit: r[0] || (r[0] = I((n) => s.value.handleSubmit(), ["prevent", "stop"]))
|
|
107
107
|
}, [
|
|
108
|
-
|
|
109
|
-
o.form ? (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
], 64)) : m(
|
|
108
|
+
L("fieldset", { disabled: m(j) }, [
|
|
109
|
+
o.form ? (S(), O(k, { key: 0 }, [
|
|
110
|
+
d(e.$slots, "externalForm", { subscribedValues: m(p) }, void 0, !0),
|
|
111
|
+
d(e.$slots, "default", {}, void 0, !0)
|
|
112
|
+
], 64)) : m(l) ? d(e.$slots, "internalForm", {
|
|
113
113
|
key: 1,
|
|
114
|
-
form: m(
|
|
115
|
-
subscribedValues: m(
|
|
116
|
-
}, void 0, !0) :
|
|
117
|
-
], 8,
|
|
114
|
+
form: m(l),
|
|
115
|
+
subscribedValues: m(p)
|
|
116
|
+
}, void 0, !0) : V("", !0)
|
|
117
|
+
], 8, _)
|
|
118
118
|
], 32));
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
D as default
|
|
123
123
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exit as i, Cause as c } from "effect";
|
|
2
|
-
import { dual as s, isFunction as u } from "./vue-components.
|
|
2
|
+
import { dual as s, isFunction as u } from "./vue-components.es24.js";
|
|
3
3
|
const n = Symbol.for("clone-trait"), a = s(2, (e, o) => n in e ? e[n](o) : Object.setPrototypeOf(o, Object.getPrototypeOf(e)));
|
|
4
4
|
s(2, (e, o) => a(e, { ...e, ...u(o) ? o(e) : o }));
|
|
5
5
|
const b = (e) => new Promise((o, r) => e.addObserver((t) => {
|
|
@@ -1,92 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
(E.value || V === "onChange") && (s.value = !0);
|
|
40
|
-
});
|
|
41
|
-
const u = () => {
|
|
42
|
-
s.value = !0;
|
|
43
|
-
};
|
|
44
|
-
d(() => {
|
|
45
|
-
n.value && u();
|
|
46
|
-
});
|
|
47
|
-
const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
|
|
48
|
-
f(
|
|
49
|
-
() => r.value.meta.errors,
|
|
50
|
-
() => {
|
|
51
|
-
r.value.meta.errors.length ? h({
|
|
52
|
-
inputId: l,
|
|
53
|
-
errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
|
|
54
|
-
label: e.label
|
|
55
|
-
}) : b(l);
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
const i = a(() => ({
|
|
59
|
-
id: l,
|
|
60
|
-
required: e.meta?.required,
|
|
61
|
-
minLength: e.meta?.type === "string" && e.meta?.minLength,
|
|
62
|
-
maxLength: e.meta?.type === "string" && e.meta?.maxLength,
|
|
63
|
-
max: e.meta?.type === "number" && e.meta?.maximum,
|
|
64
|
-
min: e.meta?.type === "number" && e.meta?.minimum,
|
|
65
|
-
name: e.field.name,
|
|
66
|
-
modelValue: e.field.state.value,
|
|
67
|
-
errorMessages: p.value,
|
|
68
|
-
error: !!p.value.length,
|
|
69
|
-
field: e.field,
|
|
70
|
-
setRealDirty: u,
|
|
71
|
-
type: m.value,
|
|
72
|
-
label: `${e.label}${e.meta?.required ? " *" : ""}`,
|
|
73
|
-
options: e.options
|
|
74
|
-
}));
|
|
75
|
-
return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
|
|
76
|
-
_("div", {
|
|
77
|
-
class: q(t.$attrs.class),
|
|
78
|
-
onFocusout: u
|
|
79
|
-
}, [
|
|
80
|
-
F(v) ? (S(), L(D, T({
|
|
81
|
-
key: 0,
|
|
82
|
-
"input-props": i.value
|
|
83
|
-
}, t.$attrs, {
|
|
84
|
-
"vuetify-value": i.value.field.state.value
|
|
85
|
-
}), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
|
|
86
|
-
], 34)
|
|
87
|
-
]);
|
|
1
|
+
const f = (c) => typeof c == "function", a = function(c, r) {
|
|
2
|
+
switch (c) {
|
|
3
|
+
case 0:
|
|
4
|
+
case 1:
|
|
5
|
+
throw new RangeError(`Invalid arity ${c}`);
|
|
6
|
+
case 2:
|
|
7
|
+
return function(n, t) {
|
|
8
|
+
return arguments.length >= 2 ? r(n, t) : function(e) {
|
|
9
|
+
return r(e, n);
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
case 3:
|
|
13
|
+
return function(n, t, e) {
|
|
14
|
+
return arguments.length >= 3 ? r(n, t, e) : function(u) {
|
|
15
|
+
return r(u, n, t);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
case 4:
|
|
19
|
+
return function(n, t, e, u) {
|
|
20
|
+
return arguments.length >= 4 ? r(n, t, e, u) : function(i) {
|
|
21
|
+
return r(i, n, t, e);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
case 5:
|
|
25
|
+
return function(n, t, e, u, i) {
|
|
26
|
+
return arguments.length >= 5 ? r(n, t, e, u, i) : function(s) {
|
|
27
|
+
return r(s, n, t, e, u);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
default:
|
|
31
|
+
return function() {
|
|
32
|
+
if (arguments.length >= c)
|
|
33
|
+
return r.apply(this, arguments);
|
|
34
|
+
const n = arguments;
|
|
35
|
+
return function(t) {
|
|
36
|
+
return r(t, ...n);
|
|
37
|
+
};
|
|
38
|
+
};
|
|
88
39
|
}
|
|
89
|
-
}
|
|
40
|
+
};
|
|
90
41
|
export {
|
|
91
|
-
|
|
42
|
+
a as dual,
|
|
43
|
+
f as isFunction
|
|
92
44
|
};
|
|
@@ -1,44 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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 w, getCurrentInstance as x, useId as C, computed as a, watch as f, nextTick as N, onMounted as d, ref as $, watchEffect as k, renderSlot as B, normalizeProps as I, guardReactiveProps as O, createElementVNode as _, normalizeClass as q, createBlock as L, createCommentVNode as P, unref as F, openBlock as S, mergeProps as T } from "vue";
|
|
3
|
+
import { useStore as z } from "@tanstack/vue-form";
|
|
4
|
+
import { useOmegaErrors as A } from "./vue-components.es8.js";
|
|
5
|
+
import D from "./vue-components.es28.js";
|
|
6
|
+
|
|
7
|
+
const J = /* @__PURE__ */ w({
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
__name: "OmegaInternalInput",
|
|
10
|
+
props: {
|
|
11
|
+
field: {},
|
|
12
|
+
meta: {},
|
|
13
|
+
label: {},
|
|
14
|
+
options: {},
|
|
15
|
+
type: {},
|
|
16
|
+
validators: {}
|
|
17
|
+
},
|
|
18
|
+
setup(c) {
|
|
19
|
+
const e = c, v = x()?.appContext.components.VTextField, l = C(), o = e.field, r = z(o.store, (t) => t), m = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown"), n = a(() => r.value.value), g = a(
|
|
20
|
+
() => (
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
r.value.meta.errors.map((t) => t?.message).filter(Boolean)
|
|
23
|
+
)
|
|
24
|
+
), y = (t) => t == null || t === !1 || t === "" || Number.isNaN(t);
|
|
25
|
+
f(
|
|
26
|
+
() => !!n.value,
|
|
27
|
+
() => {
|
|
28
|
+
y(n.value) && e.meta?.type !== "boolean" && N(() => {
|
|
29
|
+
o.setValue(
|
|
30
|
+
e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
), d(() => {
|
|
35
|
+
!n.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null" && o.setValue(null);
|
|
36
|
+
});
|
|
37
|
+
const { addError: h, removeError: b, showErrors: E, showErrorsOn: V } = A(), s = $(!1);
|
|
38
|
+
k(() => {
|
|
39
|
+
(E.value || V === "onChange") && (s.value = !0);
|
|
40
|
+
});
|
|
41
|
+
const u = () => {
|
|
42
|
+
s.value = !0;
|
|
43
|
+
};
|
|
44
|
+
d(() => {
|
|
45
|
+
n.value && u();
|
|
46
|
+
});
|
|
47
|
+
const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
|
|
48
|
+
f(
|
|
49
|
+
() => r.value.meta.errors,
|
|
50
|
+
() => {
|
|
51
|
+
r.value.meta.errors.length ? h({
|
|
52
|
+
inputId: l,
|
|
53
|
+
errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
|
|
54
|
+
label: e.label
|
|
55
|
+
}) : b(l);
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
const i = a(() => ({
|
|
59
|
+
id: l,
|
|
60
|
+
required: e.meta?.required,
|
|
61
|
+
minLength: e.meta?.type === "string" && e.meta?.minLength,
|
|
62
|
+
maxLength: e.meta?.type === "string" && e.meta?.maxLength,
|
|
63
|
+
max: e.meta?.type === "number" && e.meta?.maximum,
|
|
64
|
+
min: e.meta?.type === "number" && e.meta?.minimum,
|
|
65
|
+
name: e.field.name,
|
|
66
|
+
modelValue: e.field.state.value,
|
|
67
|
+
errorMessages: p.value,
|
|
68
|
+
error: !!p.value.length,
|
|
69
|
+
field: e.field,
|
|
70
|
+
setRealDirty: u,
|
|
71
|
+
type: m.value,
|
|
72
|
+
label: `${e.label}${e.meta?.required ? " *" : ""}`,
|
|
73
|
+
options: e.options
|
|
74
|
+
}));
|
|
75
|
+
return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
|
|
76
|
+
_("div", {
|
|
77
|
+
class: q(t.$attrs.class),
|
|
78
|
+
onFocusout: u
|
|
79
|
+
}, [
|
|
80
|
+
F(v) ? (S(), L(D, T({
|
|
81
|
+
key: 0,
|
|
82
|
+
"input-props": i.value
|
|
83
|
+
}, t.$attrs, {
|
|
84
|
+
"vuetify-value": i.value.field.state.value
|
|
85
|
+
}), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
|
|
86
|
+
], 34)
|
|
87
|
+
]);
|
|
39
88
|
}
|
|
40
|
-
};
|
|
89
|
+
});
|
|
41
90
|
export {
|
|
42
|
-
|
|
43
|
-
f as isFunction
|
|
91
|
+
J as default
|
|
44
92
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, inject as f, computed as r, createBlock as n, openBlock as m, resolveDynamicComponent as c, withCtx as l, createCommentVNode as v, mergeProps as y, renderSlot as g, normalizeProps as h, guardReactiveProps as b } from "vue";
|
|
2
2
|
import { generateInputStandardSchemaFromFieldMeta as C } from "./vue-components.es10.js";
|
|
3
|
-
import F from "./vue-components.
|
|
3
|
+
import F from "./vue-components.es26.js";
|
|
4
4
|
const P = /* @__PURE__ */ d({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "OmegaInput",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
6
|
"@tanstack/vue-form": "1.2.4",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"highlight.js": "^11.11.1",
|
|
55
55
|
"vue3-highlightjs": "^1.0.5",
|
|
56
|
-
"@effect-app/vue": "2.55.
|
|
56
|
+
"@effect-app/vue": "2.55.1",
|
|
57
57
|
"effect-app": "3.3.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
@@ -122,15 +122,19 @@ const eventOnSubmit: FormProps<From, To>["onSubmit"] = ({ value }) =>
|
|
|
122
122
|
})
|
|
123
123
|
})
|
|
124
124
|
|
|
125
|
+
const onSubmit = typeof props.isLoading !== "undefined"
|
|
126
|
+
? eventOnSubmit
|
|
127
|
+
: typeof props.onSubmit !== "undefined"
|
|
128
|
+
? props.onSubmit
|
|
129
|
+
: undefined
|
|
130
|
+
|
|
125
131
|
const localForm = props.form || !props.schema
|
|
126
132
|
? undefined
|
|
127
133
|
: useOmegaForm<From, To>(
|
|
128
134
|
props.schema,
|
|
129
135
|
{
|
|
130
136
|
...props,
|
|
131
|
-
onSubmit
|
|
132
|
-
? eventOnSubmit
|
|
133
|
-
: props.onSubmit
|
|
137
|
+
onSubmit
|
|
134
138
|
},
|
|
135
139
|
props.omegaConfig
|
|
136
140
|
)
|
|
@@ -184,6 +188,7 @@ onBeforeMount(() => {
|
|
|
184
188
|
...formToUse.value.options,
|
|
185
189
|
...filteredProps
|
|
186
190
|
}
|
|
191
|
+
if (onSubmit) mergedOptions.onSubmit = onSubmit
|
|
187
192
|
|
|
188
193
|
formToUse.value.options = Object.fromEntries(
|
|
189
194
|
// TODO
|