@effect-app/vue-components 0.12.19 → 0.12.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.
Files changed (48) hide show
  1. package/dist/types/components/OmegaForm/InputProps.d.ts +5 -47
  2. package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +5 -5
  3. package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +8 -9
  4. package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +4 -3
  5. package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +14 -13
  6. package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -3
  7. package/dist/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +2 -2
  8. package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +6 -6
  9. package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +3 -3
  10. package/dist/types/components/OmegaForm/index.d.ts +2 -1
  11. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +2 -2
  12. package/dist/vue-components.es.js +15 -13
  13. package/dist/vue-components.es10.js +246 -6
  14. package/dist/vue-components.es11.js +5 -5
  15. package/dist/vue-components.es12.js +6 -111
  16. package/dist/vue-components.es13.js +113 -0
  17. package/dist/vue-components.es15.js +7 -2
  18. package/dist/vue-components.es16.js +2 -89
  19. package/dist/vue-components.es17.js +4 -0
  20. package/dist/vue-components.es18.js +89 -2
  21. package/dist/vue-components.es2.js +17 -15
  22. package/dist/vue-components.es20.js +2 -5
  23. package/dist/vue-components.es21.js +2 -32
  24. package/dist/vue-components.es22.js +5 -2
  25. package/dist/vue-components.es23.js +2 -2
  26. package/dist/vue-components.es24.js +90 -11
  27. package/dist/vue-components.es25.js +11 -90
  28. package/dist/vue-components.es26.js +1 -1
  29. package/dist/vue-components.es4.js +2 -2
  30. package/dist/vue-components.es5.js +28 -66
  31. package/dist/vue-components.es6.js +65 -55
  32. package/dist/vue-components.es7.js +60 -29
  33. package/dist/vue-components.es8.js +28 -124
  34. package/dist/vue-components.es9.js +118 -241
  35. package/package.json +5 -9
  36. package/src/components/OmegaForm/InputProps.ts +37 -64
  37. package/src/components/OmegaForm/OmegaArray.vue +5 -3
  38. package/src/components/OmegaForm/OmegaAutoGen.vue +10 -10
  39. package/src/components/OmegaForm/OmegaFormInput.vue +6 -8
  40. package/src/components/OmegaForm/OmegaFormStuff.ts +76 -77
  41. package/src/components/OmegaForm/OmegaInput.vue +1 -2
  42. package/src/components/OmegaForm/OmegaInputVuetify.vue +3 -3
  43. package/src/components/OmegaForm/OmegaInternalInput.vue +5 -5
  44. package/src/components/OmegaForm/OmegaWrapper.vue +2 -2
  45. package/src/components/OmegaForm/index.ts +2 -1
  46. package/src/components/OmegaForm/useOmegaForm.ts +20 -22
  47. package/dist/vue-components.es14.js +0 -9
  48. package/dist/vue-components.es19.js +0 -4
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-9c44b8ac],.v-leave-to[data-v-9c44b8ac]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-9c44b8ac],.v-leave-active[data-v-9c44b8ac]{display:grid;transition:all .15s}.v-enter-to[data-v-9c44b8ac],.v-leave-from[data-v-9c44b8ac]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-9c44b8ac]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-9c44b8ac]{min-height:0}.error-list[data-v-9c44b8ac]{list-style-position:inside}div.error-list[data-v-9c44b8ac]{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-9c44b8ac]{grid-template-columns:auto 1fr}.error-link[data-v-9c44b8ac]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-9c44b8ac]{grid-template-columns:1fr}.error-message[data-v-9c44b8ac]{grid-column:1 / -1}}.error-item[data-v-9c44b8ac]{display:contents}a[data-v-9c44b8ac]{min-width:min-content}.error-link[data-v-9c44b8ac]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(t),window.customElements){const a=window.customElements.define;window.customElements.define=function(c,e){const i=e.prototype.connectedCallback;return e.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-9c44b8ac],.v-leave-to[data-v-9c44b8ac]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-9c44b8ac],.v-leave-active[data-v-9c44b8ac]{display:grid;transition:all .15s}.v-enter-to[data-v-9c44b8ac],.v-leave-from[data-v-9c44b8ac]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-9c44b8ac]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-9c44b8ac]{min-height:0}.error-list[data-v-9c44b8ac]{list-style-position:inside}div.error-list[data-v-9c44b8ac]{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-9c44b8ac]{grid-template-columns:auto 1fr}.error-link[data-v-9c44b8ac]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-9c44b8ac]{grid-template-columns:1fr}.error-message[data-v-9c44b8ac]{grid-column:1 / -1}}.error-item[data-v-9c44b8ac]{display:contents}a[data-v-9c44b8ac]{min-width:min-content}.error-link[data-v-9c44b8ac]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},a.call(window.customElements,c,e)}}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import o from "./vue-components.es16.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-69817219]{display:contents}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const o=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(o&&o.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode("fieldset[data-v-69817219]{display:contents}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es13.js";
3
3
 
4
- import r from "./vue-components.es14.js";
5
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9c44b8ac"]]);
4
+ import r from "./vue-components.es15.js";
5
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-69817219"]]);
6
6
  export {
7
- c as default
7
+ m as default
8
8
  };
@@ -1,113 +1,8 @@
1
- import { defineComponent as w, computed as f, onBeforeMount as E, watch as j, createElementBlock as v, openBlock as b, withModifiers as F, createElementVNode as M, unref as c, renderSlot as p, createCommentVNode as k, Fragment as V } from "vue";
2
- import { useStore as g } from "@tanstack/vue-form";
3
- import { getOmegaStore as B } from "./vue-components.es24.js";
4
- import { provideOmegaErrors as C } from "./vue-components.es7.js";
5
- import { useOmegaForm as I } from "./vue-components.es8.js";
6
- const $ = ["disabled"], N = /* @__PURE__ */ w({
7
- __name: "OmegaWrapper",
8
- props: {
9
- omegaConfig: {},
10
- subscribe: {},
11
- showErrorsOn: {},
12
- defaultValues: {},
13
- defaultState: {},
14
- asyncAlways: { type: Boolean },
15
- asyncDebounceMs: {},
16
- validators: {},
17
- onSubmitMeta: {},
18
- onSubmitInvalid: { type: Function },
19
- transform: {},
20
- onSubmit: { type: Function },
21
- form: {},
22
- schema: {}
23
- },
24
- setup(O) {
25
- const o = O, m = f(() => {
26
- if (!(o.form || !o.schema))
27
- return I(o.schema, o, o.omegaConfig);
28
- }), t = f(() => o.form ?? m.value);
29
- E(() => {
30
- if (!o.form) return;
31
- const e = Object.keys(o.form.options || {}), s = /* @__PURE__ */ new Set([
32
- "omegaConfig",
33
- "subscribe",
34
- "showErrorsOn",
35
- "asyncAlways",
36
- "form",
37
- "schema"
38
- ]), i = Object.fromEntries(
39
- Object.entries(o).filter(
40
- ([a, u]) => !s.has(a) && u !== void 0
41
- )
42
- ), r = Object.keys(i), n = e.filter(
43
- (a) => r.includes(a) && i[a] !== void 0
44
- );
45
- n.length > 0 && console.warn(
46
- `[OmegaWrapper] Overlapping keys found between form options and filtered props:
47
- ${n.join(
48
- `,
49
- `
50
- )}.
51
- Props will overwrite existing form options. This might indicate a configuration issue.`
52
- );
53
- const S = {
54
- ...t.value.options,
55
- ...i
56
- };
57
- t.value.options = Object.fromEntries(
58
- // TODO
59
- Object.entries(S).filter(
60
- ([a, u]) => u !== void 0
61
- )
62
- );
63
- });
64
- const h = g(
65
- t.value.store,
66
- (e) => e.isSubmitting
67
- ), d = B(
68
- t.value,
69
- o.subscribe
70
- ), y = g(
71
- t.value.store,
72
- (e) => e.submissionAttempts
73
- ), l = f(() => t.value.useStore((e) => e.errors));
74
- return j(
75
- () => [t.value.filterItems, l.value.value],
76
- () => {
77
- const e = t.value.filterItems, s = l.value.value;
78
- return e ? s ? (Object.values(s).filter(
79
- (r) => !!r
80
- ).flatMap(
81
- (r) => Object.values(r).flat().map((n) => n.message)
82
- ).some((r) => r === e.message) && e.items.forEach((r) => {
83
- const n = t.value.getFieldMeta(r);
84
- n && t.value.setFieldMeta(r, {
85
- ...n,
86
- errorMap: {
87
- onSubmit: [
88
- { path: [r], message: e.message }
89
- ]
90
- }
91
- });
92
- }), {}) : {} : {};
93
- }
94
- ), C(y, l.value, o.showErrorsOn), (e, s) => (b(), v("form", {
95
- novalidate: "",
96
- onSubmit: s[0] || (s[0] = F((i) => t.value.handleSubmit(), ["prevent", "stop"]))
97
- }, [
98
- M("fieldset", { disabled: c(h) }, [
99
- o.form ? (b(), v(V, { key: 0 }, [
100
- p(e.$slots, "externalForm", { subscribedValues: c(d) }, void 0, !0),
101
- p(e.$slots, "default", {}, void 0, !0)
102
- ], 64)) : m.value ? p(e.$slots, "internalForm", {
103
- key: 1,
104
- form: m.value,
105
- subscribedValues: c(d)
106
- }, void 0, !0) : k("", !0)
107
- ], 8, $)
108
- ], 32));
109
- }
110
- });
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-9c44b8ac],.v-leave-to[data-v-9c44b8ac]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-9c44b8ac],.v-leave-active[data-v-9c44b8ac]{display:grid;transition:all .15s}.v-enter-to[data-v-9c44b8ac],.v-leave-from[data-v-9c44b8ac]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-9c44b8ac]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-9c44b8ac]{min-height:0}.error-list[data-v-9c44b8ac]{list-style-position:inside}div.error-list[data-v-9c44b8ac]{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-9c44b8ac]{grid-template-columns:auto 1fr}.error-link[data-v-9c44b8ac]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-9c44b8ac]{grid-template-columns:1fr}.error-message[data-v-9c44b8ac]{grid-column:1 / -1}}.error-item[data-v-9c44b8ac]{display:contents}a[data-v-9c44b8ac]{min-width:min-content}.error-link[data-v-9c44b8ac]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(t),window.customElements){const a=window.customElements.define;window.customElements.define=function(c,e){const i=e.prototype.connectedCallback;return e.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-9c44b8ac],.v-leave-to[data-v-9c44b8ac]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-9c44b8ac],.v-leave-active[data-v-9c44b8ac]{display:grid;transition:all .15s}.v-enter-to[data-v-9c44b8ac],.v-leave-from[data-v-9c44b8ac]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-9c44b8ac]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-9c44b8ac]{min-height:0}.error-list[data-v-9c44b8ac]{list-style-position:inside}div.error-list[data-v-9c44b8ac]{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-9c44b8ac]{grid-template-columns:auto 1fr}.error-link[data-v-9c44b8ac]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-9c44b8ac]{grid-template-columns:1fr}.error-message[data-v-9c44b8ac]{grid-column:1 / -1}}.error-item[data-v-9c44b8ac]{display:contents}a[data-v-9c44b8ac]{min-width:min-content}.error-link[data-v-9c44b8ac]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},a.call(window.customElements,c,e)}}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ import o from "./vue-components.es18.js";
3
+
4
+ import r from "./vue-components.es15.js";
5
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9c44b8ac"]]);
111
6
  export {
112
- N as default
7
+ c as default
113
8
  };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as w, computed as f, onBeforeMount as E, watch as j, createElementBlock as v, openBlock as b, withModifiers as F, createElementVNode as M, unref as c, renderSlot as p, createCommentVNode as k, Fragment as V } from "vue";
2
+ import { useStore as g } from "@tanstack/vue-form";
3
+ import { getOmegaStore as B } from "./vue-components.es25.js";
4
+ import { provideOmegaErrors as C } from "./vue-components.es8.js";
5
+ import { useOmegaForm as I } from "./vue-components.es9.js";
6
+ const $ = ["disabled"], N = /* @__PURE__ */ w({
7
+ __name: "OmegaWrapper",
8
+ props: {
9
+ omegaConfig: {},
10
+ subscribe: {},
11
+ showErrorsOn: {},
12
+ defaultValues: {},
13
+ defaultState: {},
14
+ asyncAlways: { type: Boolean },
15
+ asyncDebounceMs: {},
16
+ validators: {},
17
+ onSubmitMeta: {},
18
+ onSubmitInvalid: { type: Function },
19
+ transform: {},
20
+ onSubmit: { type: Function },
21
+ form: {},
22
+ schema: {}
23
+ },
24
+ setup(O) {
25
+ const o = O, m = f(() => {
26
+ if (!(o.form || !o.schema))
27
+ return I(o.schema, o, o.omegaConfig);
28
+ }), t = f(() => o.form ?? m.value);
29
+ E(() => {
30
+ if (!o.form) return;
31
+ const e = Object.keys(o.form.options || {}), s = /* @__PURE__ */ new Set([
32
+ "omegaConfig",
33
+ "subscribe",
34
+ "showErrorsOn",
35
+ "asyncAlways",
36
+ "form",
37
+ "schema"
38
+ ]), i = Object.fromEntries(
39
+ Object.entries(o).filter(
40
+ ([a, u]) => !s.has(a) && u !== void 0
41
+ )
42
+ ), r = Object.keys(i), n = e.filter(
43
+ (a) => r.includes(a) && i[a] !== void 0
44
+ );
45
+ n.length > 0 && console.warn(
46
+ `[OmegaWrapper] Overlapping keys found between form options and filtered props:
47
+ ${n.join(
48
+ `,
49
+ `
50
+ )}.
51
+ Props will overwrite existing form options. This might indicate a configuration issue.`
52
+ );
53
+ const S = {
54
+ ...t.value.options,
55
+ ...i
56
+ };
57
+ t.value.options = Object.fromEntries(
58
+ // TODO
59
+ Object.entries(S).filter(
60
+ ([a, u]) => u !== void 0
61
+ )
62
+ );
63
+ });
64
+ const h = g(
65
+ t.value.store,
66
+ (e) => e.isSubmitting
67
+ ), d = B(
68
+ t.value,
69
+ o.subscribe
70
+ ), y = g(
71
+ t.value.store,
72
+ (e) => e.submissionAttempts
73
+ ), l = f(() => t.value.useStore((e) => e.errors));
74
+ return j(
75
+ () => [t.value.filterItems, l.value.value],
76
+ () => {
77
+ const e = t.value.filterItems, s = l.value.value;
78
+ return e ? s ? (Object.values(s).filter(
79
+ (r) => !!r
80
+ ).flatMap(
81
+ (r) => Object.values(r).flat().map((n) => n.message)
82
+ ).some((r) => r === e.message) && e.items.forEach((r) => {
83
+ const n = t.value.getFieldMeta(r);
84
+ n && t.value.setFieldMeta(r, {
85
+ ...n,
86
+ errorMap: {
87
+ onSubmit: [
88
+ { path: [r], message: e.message }
89
+ ]
90
+ }
91
+ });
92
+ }), {}) : {} : {};
93
+ }
94
+ ), C(y, l.value, o.showErrorsOn), (e, s) => (b(), v("form", {
95
+ novalidate: "",
96
+ onSubmit: s[0] || (s[0] = F((i) => t.value.handleSubmit(), ["prevent", "stop"]))
97
+ }, [
98
+ M("fieldset", { disabled: c(h) }, [
99
+ o.form ? (b(), v(V, { key: 0 }, [
100
+ p(e.$slots, "externalForm", { subscribedValues: c(d) }, void 0, !0),
101
+ p(e.$slots, "default", {}, void 0, !0)
102
+ ], 64)) : m.value ? p(e.$slots, "internalForm", {
103
+ key: 1,
104
+ form: m.value,
105
+ subscribedValues: c(d)
106
+ }, void 0, !0) : k("", !0)
107
+ ], 8, $)
108
+ ], 32));
109
+ }
110
+ });
111
+ export {
112
+ N as default
113
+ };
@@ -1,4 +1,9 @@
1
- import f from "./vue-components.es4.js";
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
2
7
  export {
3
- f as default
8
+ s as default
4
9
  };
@@ -1,91 +1,4 @@
1
- import { defineComponent as E, getCurrentInstance as C, computed as x, createBlock as o, openBlock as r, Transition as B, withCtx as n, createElementBlock as d, createCommentVNode as b, unref as e, renderSlot as w, normalizeProps as I, guardReactiveProps as V, resolveDynamicComponent as a, normalizeClass as N, createElementVNode as u, toDisplayString as c, Fragment as v, renderList as g, createTextVNode as k } from "vue";
2
- import { useOmegaErrors as O } from "./vue-components.es7.js";
3
- import { mdiLink as z } from "@mdi/js";
4
- import { useIntl as D } from "./vue-components.es3.js";
5
- const G = {
6
- key: 0,
7
- class: "error-alert"
8
- }, L = { class: "text-h6 mb-3" }, M = { class: "font-weight-medium" }, P = { class: "error-message" }, S = ["href"], T = { key: 1 }, H = /* @__PURE__ */ E({
9
- __name: "OmegaErrors",
10
- setup($) {
11
- const m = C()?.appContext.components.VAlert, { errors: s, generalErrors: p, showErrors: y } = O(), { trans: _ } = D(), f = x(() => p.value ? p.value.filter(
12
- (i) => !!i
13
- ).flatMap(
14
- (i) => Object.values(i).filter((l) => !!l).flatMap(
15
- (l) => l.filter(
16
- (t) => !!t?.message
17
- ).map((t) => t.message)
18
- )
19
- ) : []);
20
- return (i, l) => (r(), o(B, null, {
21
- default: n(() => [
22
- e(y) && (e(s).length || f.value.length) ? (r(), d("div", G, [
23
- w(i.$slots, "default", I(V({ errors: e(s), showedGeneralErrors: f.value })), () => [
24
- (r(), o(a(e(m) ? "v-alert" : "div"), {
25
- class: N([e(m) ? "mb-4" : "error-alert-content", "mb-4"]),
26
- type: "error",
27
- variant: "tonal",
28
- role: "alert",
29
- "aria-live": "polite"
30
- }, {
31
- default: n(() => [
32
- u("div", L, c(e(_)("form.includes_error")) + ":", 1),
33
- e(s).length ? (r(), o(a(e(s).length > 1 ? "ul" : "div"), {
34
- key: 0,
35
- class: "error-list"
36
- }, {
37
- default: n(() => [
38
- (r(!0), d(v, null, g(e(s), (t) => (r(), o(a(e(s).length > 1 ? "li" : "div"), {
39
- key: t.inputId,
40
- class: "error-item"
41
- }, {
42
- default: n(() => [
43
- u("div", M, c(t.label), 1),
44
- u("div", P, [
45
- (r(), o(a(t.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
46
- default: n(() => [
47
- (r(!0), d(v, null, g(t.errors, (h) => (r(), o(a(t.errors.length > 1 ? "li" : "span"), { key: h }, {
48
- default: n(() => [
49
- k(c(h), 1)
50
- ]),
51
- _: 2
52
- }, 1024))), 128))
53
- ]),
54
- _: 2
55
- }, 1024))
56
- ]),
57
- u("a", {
58
- href: `#${t.inputId}`,
59
- class: "error-link"
60
- }, [
61
- (r(), o(a(e(m) ? "v-icon" : "i"), {
62
- icon: e(z),
63
- "aria-hidden": "true"
64
- }, {
65
- default: n(() => l[0] || (l[0] = [
66
- u("i", null, "🔗", -1)
67
- ])),
68
- _: 1,
69
- __: [0]
70
- }, 8, ["icon"])),
71
- k(" " + c(e(_)("form.fix_input")), 1)
72
- ], 8, S)
73
- ]),
74
- _: 2
75
- }, 1024))), 128))
76
- ]),
77
- _: 1
78
- })) : (r(), d("span", T, c(f.value[0]), 1))
79
- ]),
80
- _: 1
81
- }, 8, ["class"]))
82
- ], !0)
83
- ])) : b("", !0)
84
- ]),
85
- _: 3
86
- }));
87
- }
88
- });
1
+ import f from "./vue-components.es4.js";
89
2
  export {
90
- H as default
3
+ f as default
91
4
  };
@@ -0,0 +1,4 @@
1
+ import f from "./vue-components.es5.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,91 @@
1
- import f from "./vue-components.es5.js";
1
+ import { defineComponent as E, getCurrentInstance as C, computed as x, createBlock as o, openBlock as r, Transition as B, withCtx as n, createElementBlock as d, createCommentVNode as b, unref as e, renderSlot as w, normalizeProps as I, guardReactiveProps as V, resolveDynamicComponent as a, normalizeClass as N, createElementVNode as u, toDisplayString as c, Fragment as v, renderList as g, createTextVNode as k } from "vue";
2
+ import { useOmegaErrors as O } from "./vue-components.es8.js";
3
+ import { mdiLink as z } from "@mdi/js";
4
+ import { useIntl as D } from "./vue-components.es3.js";
5
+ const G = {
6
+ key: 0,
7
+ class: "error-alert"
8
+ }, L = { class: "text-h6 mb-3" }, M = { class: "font-weight-medium" }, P = { class: "error-message" }, S = ["href"], T = { key: 1 }, H = /* @__PURE__ */ E({
9
+ __name: "OmegaErrors",
10
+ setup($) {
11
+ const m = C()?.appContext.components.VAlert, { errors: s, generalErrors: p, showErrors: y } = O(), { trans: _ } = D(), f = x(() => p.value ? p.value.filter(
12
+ (i) => !!i
13
+ ).flatMap(
14
+ (i) => Object.values(i).filter((l) => !!l).flatMap(
15
+ (l) => l.filter(
16
+ (t) => !!t?.message
17
+ ).map((t) => t.message)
18
+ )
19
+ ) : []);
20
+ return (i, l) => (r(), o(B, null, {
21
+ default: n(() => [
22
+ e(y) && (e(s).length || f.value.length) ? (r(), d("div", G, [
23
+ w(i.$slots, "default", I(V({ errors: e(s), showedGeneralErrors: f.value })), () => [
24
+ (r(), o(a(e(m) ? "v-alert" : "div"), {
25
+ class: N([e(m) ? "mb-4" : "error-alert-content", "mb-4"]),
26
+ type: "error",
27
+ variant: "tonal",
28
+ role: "alert",
29
+ "aria-live": "polite"
30
+ }, {
31
+ default: n(() => [
32
+ u("div", L, c(e(_)("form.includes_error")) + ":", 1),
33
+ e(s).length ? (r(), o(a(e(s).length > 1 ? "ul" : "div"), {
34
+ key: 0,
35
+ class: "error-list"
36
+ }, {
37
+ default: n(() => [
38
+ (r(!0), d(v, null, g(e(s), (t) => (r(), o(a(e(s).length > 1 ? "li" : "div"), {
39
+ key: t.inputId,
40
+ class: "error-item"
41
+ }, {
42
+ default: n(() => [
43
+ u("div", M, c(t.label), 1),
44
+ u("div", P, [
45
+ (r(), o(a(t.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
46
+ default: n(() => [
47
+ (r(!0), d(v, null, g(t.errors, (h) => (r(), o(a(t.errors.length > 1 ? "li" : "span"), { key: h }, {
48
+ default: n(() => [
49
+ k(c(h), 1)
50
+ ]),
51
+ _: 2
52
+ }, 1024))), 128))
53
+ ]),
54
+ _: 2
55
+ }, 1024))
56
+ ]),
57
+ u("a", {
58
+ href: `#${t.inputId}`,
59
+ class: "error-link"
60
+ }, [
61
+ (r(), o(a(e(m) ? "v-icon" : "i"), {
62
+ icon: e(z),
63
+ "aria-hidden": "true"
64
+ }, {
65
+ default: n(() => l[0] || (l[0] = [
66
+ u("i", null, "🔗", -1)
67
+ ])),
68
+ _: 1,
69
+ __: [0]
70
+ }, 8, ["icon"])),
71
+ k(" " + c(e(_)("form.fix_input")), 1)
72
+ ], 8, S)
73
+ ]),
74
+ _: 2
75
+ }, 1024))), 128))
76
+ ]),
77
+ _: 1
78
+ })) : (r(), d("span", T, c(f.value[0]), 1))
79
+ ]),
80
+ _: 1
81
+ }, 8, ["class"]))
82
+ ], !0)
83
+ ])) : b("", !0)
84
+ ]),
85
+ _: 3
86
+ }));
87
+ }
88
+ });
2
89
  export {
3
- f as default
90
+ H as default
4
91
  };
@@ -1,22 +1,24 @@
1
- import { default as t } from "./vue-components.es10.js";
1
+ import { default as t } from "./vue-components.es11.js";
2
2
  import { default as m } from "./vue-components.es4.js";
3
- import { default as p } from "./vue-components.es11.js";
4
- import { default as l } from "./vue-components.es5.js";
3
+ import { default as p } from "./vue-components.es5.js";
4
+ import { default as l } from "./vue-components.es12.js";
5
5
  import { default as g } from "./vue-components.es6.js";
6
- import * as e from "./vue-components.es7.js";
7
- import { createMeta as s, duplicateSchema as x, generateInputStandardSchemaFromFieldMeta as O, generateMetaFromSchema as c, nullableInput as F } from "./vue-components.es9.js";
8
- import { useOmegaForm as h } from "./vue-components.es8.js";
6
+ import { default as s } from "./vue-components.es7.js";
7
+ import * as e from "./vue-components.es8.js";
8
+ import { createMeta as O, duplicateSchema as F, generateInputStandardSchemaFromFieldMeta as c, generateMetaFromSchema as I, nullableInput as S } from "./vue-components.es10.js";
9
+ import { useOmegaForm as i } from "./vue-components.es9.js";
9
10
  export {
10
- g as OmegaArray,
11
- l as OmegaAutoGen,
12
- p as OmegaErrors,
11
+ s as OmegaArray,
12
+ g as OmegaAutoGen,
13
+ l as OmegaErrors,
13
14
  e as OmegaErrorsContext,
14
15
  t as OmegaForm,
16
+ p as OmegaFormInput,
15
17
  m as OmegaInput,
16
- s as createMeta,
17
- x as duplicateSchema,
18
- O as generateInputStandardSchemaFromFieldMeta,
19
- c as generateMetaFromSchema,
20
- F as nullableInput,
21
- h as useOmegaForm
18
+ O as createMeta,
19
+ F as duplicateSchema,
20
+ c as generateInputStandardSchemaFromFieldMeta,
21
+ I as generateMetaFromSchema,
22
+ S as nullableInput,
23
+ i as useOmegaForm
22
24
  };
@@ -1,7 +1,4 @@
1
- import { isFunction as c } from "./vue-components.es22.js";
2
- const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
1
+ import f from "./vue-components.es6.js";
3
2
  export {
4
- s as isFunction,
5
- i as isObject,
6
- t as isRecordOrArray
3
+ f as default
7
4
  };
@@ -1,34 +1,4 @@
1
- import { defineComponent as a, inject as t, createBlock as n, openBlock as m, mergeProps as p, unref as s, withCtx as i, renderSlot as l, normalizeProps as f, guardReactiveProps as u } from "vue";
2
- import d from "./vue-components.es4.js";
3
- import { OmegaFormKey as c } from "./vue-components.es8.js";
4
- const w = /* @__PURE__ */ a({
5
- __name: "OmegaFormInput",
6
- props: {
7
- name: {},
8
- label: {},
9
- validators: {},
10
- options: {},
11
- type: {}
12
- },
13
- setup(g) {
14
- const o = t(c);
15
- if (!o)
16
- throw new Error("OmegaFormInput must be used within an OmegaForm context");
17
- return (e, b) => (m(), n(d, p(e.$props, {
18
- form: s(o),
19
- name: e.name,
20
- label: e.label,
21
- validators: e.validators,
22
- options: e.options,
23
- type: e.type
24
- }), {
25
- default: i((r) => [
26
- l(e.$slots, "default", f(u(r)))
27
- ]),
28
- _: 3
29
- }, 16, ["form", "name", "label", "validators", "options", "type"]));
30
- }
31
- });
1
+ import f from "./vue-components.es7.js";
32
2
  export {
33
- w as default
3
+ f as default
34
4
  };
@@ -1,4 +1,7 @@
1
- const o = (n) => typeof n == "function";
1
+ import { isFunction as c } from "./vue-components.es23.js";
2
+ const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
2
3
  export {
3
- o as isFunction
4
+ s as isFunction,
5
+ i as isObject,
6
+ t as isRecordOrArray
4
7
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es21.js";
1
+ const o = (n) => typeof n == "function";
2
2
  export {
3
- f as default
3
+ o as isFunction
4
4
  };