@effect-app/vue-components 0.18.5 → 0.18.6

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.
@@ -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-294e3536]{display:contents}fieldset[disabled][data-v-294e3536]>*{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-294e3536]{display:contents}fieldset[disabled][data-v-294e3536]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
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-294e3536"]]);
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 M, getCurrentInstance as F, computed as p, onBeforeMount as B, watch as b, createElementBlock as v, openBlock as g, withModifiers as C, createElementVNode as I, unref as m, renderSlot as c, createCommentVNode as L, Fragment as V } from "vue";
2
- import { useStore as O } from "@tanstack/vue-form";
3
- import { getOmegaStore as k } from "./vue-components.es25.js";
4
- import { provideOmegaErrors as $ } from "./vue-components.es8.js";
5
- import { useOmegaForm as A } from "./vue-components.es9.js";
6
- const K = ["disabled"], W = /* @__PURE__ */ M({
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.es26.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(S) {
26
- const o = S, h = F(), y = ({ value: e }) => new Promise((r) => {
27
- h.emit("submit", e);
28
- const n = b(() => o.isLoading, (t) => {
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 : A(
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: typeof o.isLoading < "u" ? y : o.onSubmit
35
+ onSubmit: u
36
36
  },
37
37
  o.omegaConfig
38
- ), s = p(() => o.form ?? u);
39
- B(() => {
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, f]) => a === "isLoading" ? !1 : !r.has(a) && f !== void 0
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 j = {
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(j).filter(
70
- ([a, f]) => f !== void 0
69
+ Object.entries(b).filter(
70
+ ([a, c]) => c !== void 0
71
71
  )
72
72
  );
73
73
  });
74
- const w = O(
74
+ const j = h(
75
75
  s.value.store,
76
76
  (e) => e.isSubmitting
77
- ), d = k(
77
+ ), p = $(
78
78
  s.value,
79
79
  o.subscribe
80
- ), E = O(
80
+ ), M = h(
81
81
  s.value.store,
82
82
  (e) => e.submissionAttempts
83
- ), l = p(() => s.value.useStore((e) => e.errors));
84
- return b(
85
- () => [s.value.filterItems, l.value.value],
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 = l.value.value;
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
- ), $(E, l.value, o.showErrorsOn), (e, r) => (g(), v("form", {
104
+ ), A(M, f.value, o.showErrorsOn), (e, r) => (S(), O("form", {
105
105
  novalidate: "",
106
- onSubmit: r[0] || (r[0] = C((n) => s.value.handleSubmit(), ["prevent", "stop"]))
106
+ onSubmit: r[0] || (r[0] = I((n) => s.value.handleSubmit(), ["prevent", "stop"]))
107
107
  }, [
108
- I("fieldset", { disabled: m(w) }, [
109
- o.form ? (g(), v(V, { key: 0 }, [
110
- c(e.$slots, "externalForm", { subscribedValues: m(d) }, void 0, !0),
111
- c(e.$slots, "default", {}, void 0, !0)
112
- ], 64)) : m(u) ? c(e.$slots, "internalForm", {
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(u),
115
- subscribedValues: m(d)
116
- }, void 0, !0) : L("", !0)
117
- ], 8, K)
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
- W as default
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.es26.js";
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,4 +1,4 @@
1
- import { isFunction as c } from "./vue-components.es26.js";
1
+ import { isFunction as c } from "./vue-components.es24.js";
2
2
  const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
3
3
  export {
4
4
  s as isFunction,
@@ -1,92 +1,44 @@
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
- ]);
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
- J as default
42
+ a as dual,
43
+ f as isFunction
92
44
  };
@@ -1,13 +1,92 @@
1
- import { useStore as u } from "@tanstack/vue-form";
2
- import { computed as f } from "vue";
3
- function c(o, t) {
4
- return f(() => t ? u(o.store, (n) => {
5
- const r = {};
6
- for (const e of t)
7
- r[e] = n[e];
8
- return r;
9
- }).value : {});
10
- }
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
+ ]);
88
+ }
89
+ });
11
90
  export {
12
- c as getOmegaStore
91
+ J as default
13
92
  };
@@ -1,44 +1,13 @@
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
- };
39
- }
40
- };
1
+ import { useStore as u } from "@tanstack/vue-form";
2
+ import { computed as f } from "vue";
3
+ function c(o, t) {
4
+ return f(() => t ? u(o.store, (n) => {
5
+ const r = {};
6
+ for (const e of t)
7
+ r[e] = n[e];
8
+ return r;
9
+ }).value : {});
10
+ }
41
11
  export {
42
- a as dual,
43
- f as isFunction
12
+ c as getOmegaStore
44
13
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es24.js";
1
+ import f from "./vue-components.es25.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -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.es24.js";
3
+ import F from "./vue-components.es25.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.5",
3
+ "version": "0.18.6",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "@tanstack/vue-form": "1.2.4",
@@ -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: typeof props.isLoading !== "undefined"
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