@effect-app/vue-components 4.0.0-beta.2 → 4.0.0-beta.200
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/README.md +36 -8
- package/dist/reset.css +52 -0
- package/dist/types/components/CommandButton.vue.d.ts +6 -4
- package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaErrorsInternal.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +2 -1
- package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/createUseFormWithCustomInput.d.ts +2 -2
- package/dist/types/components/OmegaForm/errors.d.ts +33 -0
- package/dist/types/components/OmegaForm/getOmegaStore.d.ts +1 -1
- package/dist/types/components/OmegaForm/hocs.d.ts +3 -0
- package/dist/types/components/OmegaForm/index.d.ts +13 -3
- package/dist/types/components/OmegaForm/inputs.d.ts +4 -0
- package/dist/types/components/OmegaForm/meta/checks.d.ts +4 -0
- package/dist/types/components/OmegaForm/meta/createMeta.d.ts +32 -0
- package/dist/types/components/OmegaForm/meta/defaults.d.ts +2 -0
- package/dist/types/components/OmegaForm/meta/redacted.d.ts +2 -0
- package/dist/types/components/OmegaForm/meta/types.d.ts +56 -0
- package/dist/types/components/OmegaForm/meta/walker.d.ts +18 -0
- package/dist/types/components/OmegaForm/persistency.d.ts +58 -0
- package/dist/types/components/OmegaForm/submit.d.ts +60 -0
- package/dist/types/components/OmegaForm/types.d.ts +281 -0
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +7 -215
- package/dist/types/components/OmegaForm/validation/localized.d.ts +10 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/utils/index.d.ts +6 -7
- package/dist/vue-components.es.js +29 -44
- package/dist/vue-components10.es.js +5 -0
- package/dist/vue-components11.es.js +20 -0
- package/dist/vue-components12.es.js +49 -0
- package/dist/vue-components13.es.js +128 -0
- package/dist/vue-components14.es.js +65 -0
- package/dist/vue-components15.es.js +60 -0
- package/dist/vue-components16.es.js +22 -0
- package/dist/vue-components17.es.js +5 -0
- package/dist/vue-components18.es.js +80 -0
- package/dist/vue-components19.es.js +92 -0
- package/dist/vue-components2.es.js +11 -0
- package/dist/vue-components20.es.js +73 -0
- package/dist/vue-components21.es.js +12 -0
- package/dist/vue-components22.es.js +56 -0
- package/dist/vue-components23.es.js +5 -0
- package/dist/vue-components24.es.js +44 -0
- package/dist/vue-components25.es.js +5 -0
- package/dist/vue-components26.es.js +84 -0
- package/dist/vue-components28.es.js +8 -0
- package/dist/vue-components29.es.js +9 -0
- package/dist/vue-components3.es.js +86 -0
- package/dist/vue-components30.es.js +269 -0
- package/dist/vue-components32.es.js +8 -0
- package/dist/vue-components33.es.js +73 -0
- package/dist/vue-components34.es.js +5 -0
- package/dist/vue-components35.es.js +52 -0
- package/dist/vue-components36.es.js +5 -0
- package/dist/vue-components37.es.js +24 -0
- package/dist/vue-components38.es.js +5 -0
- package/dist/vue-components39.es.js +59 -0
- package/dist/vue-components4.es.js +5 -0
- package/dist/vue-components40.es.js +5 -0
- package/dist/vue-components41.es.js +12 -0
- package/dist/vue-components42.es.js +22 -0
- package/dist/vue-components44.es.js +9 -0
- package/dist/vue-components45.es.js +4 -0
- package/dist/vue-components46.es.js +38 -0
- package/dist/vue-components47.es.js +27 -0
- package/dist/vue-components48.es.js +28 -0
- package/dist/vue-components49.es.js +7 -0
- package/dist/vue-components5.es.js +24 -0
- package/dist/vue-components50.es.js +18 -0
- package/dist/vue-components51.es.js +36 -0
- package/dist/vue-components52.es.js +18 -0
- package/dist/vue-components53.es.js +21 -0
- package/dist/vue-components54.es.js +30 -0
- package/dist/vue-components55.es.js +7 -0
- package/dist/vue-components56.es.js +9 -0
- package/dist/vue-components57.es.js +38 -0
- package/dist/vue-components58.es.js +25 -0
- package/dist/vue-components59.es.js +128 -0
- package/dist/vue-components6.es.js +13 -0
- package/dist/vue-components60.es.js +24 -0
- package/dist/vue-components61.es.js +21 -0
- package/dist/vue-components62.es.js +9 -0
- package/dist/vue-components63.es.js +19 -0
- package/dist/vue-components64.es.js +5 -0
- package/dist/vue-components65.es.js +29 -0
- package/dist/vue-components66.es.js +5 -0
- package/dist/vue-components67.es.js +29 -0
- package/dist/vue-components68.es.js +6 -0
- package/dist/vue-components69.es.js +18 -0
- package/dist/vue-components7.es.js +13 -0
- package/dist/vue-components70.es.js +40 -0
- package/dist/vue-components71.es.js +81 -0
- package/dist/vue-components72.es.js +33 -0
- package/dist/vue-components73.es.js +19 -0
- package/dist/vue-components74.es.js +48 -0
- package/dist/vue-components8.es.js +35 -0
- package/dist/vue-components9.es.js +47 -0
- package/package.json +35 -31
- package/src/components/CommandButton.vue +55 -7
- package/src/components/OmegaForm/OmegaArray.vue +2 -4
- package/src/components/OmegaForm/OmegaAutoGen.vue +27 -31
- package/src/components/OmegaForm/OmegaErrorsInternal.vue +3 -4
- package/src/components/OmegaForm/OmegaFormInput.vue +1 -1
- package/src/components/OmegaForm/OmegaInput.vue +7 -36
- package/src/components/OmegaForm/OmegaInputVuetify.vue +5 -2
- package/src/components/OmegaForm/OmegaInternalInput.vue +21 -11
- package/src/components/OmegaForm/OmegaTaggedUnion.vue +2 -1
- package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +1 -1
- package/src/components/OmegaForm/OmegaWrapper.vue +1 -1
- package/src/components/OmegaForm/blockDialog.ts +18 -6
- package/src/components/OmegaForm/createUseFormWithCustomInput.ts +2 -1
- package/src/components/OmegaForm/errors.ts +136 -0
- package/src/components/OmegaForm/getOmegaStore.ts +1 -1
- package/src/components/OmegaForm/hocs.ts +19 -0
- package/src/components/OmegaForm/index.ts +16 -4
- package/src/components/OmegaForm/inputs.ts +22 -0
- package/src/components/OmegaForm/meta/checks.ts +81 -0
- package/src/components/OmegaForm/meta/createMeta.ts +138 -0
- package/src/components/OmegaForm/meta/defaults.ts +132 -0
- package/src/components/OmegaForm/meta/redacted.ts +66 -0
- package/src/components/OmegaForm/meta/types.ts +78 -0
- package/src/components/OmegaForm/meta/walker.ts +248 -0
- package/src/components/OmegaForm/persistency.ts +247 -0
- package/src/components/OmegaForm/submit.ts +128 -0
- package/src/components/OmegaForm/types.ts +751 -0
- package/src/components/OmegaForm/useOmegaForm.ts +58 -895
- package/src/components/OmegaForm/validation/localized.ts +202 -0
- package/src/index.ts +0 -1
- package/src/reset.css +52 -0
- package/src/utils/index.ts +9 -10
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +0 -157
- package/dist/types/constants/index.d.ts +0 -1
- package/dist/vue-components.es10.js +0 -237
- package/dist/vue-components.es100.js +0 -4
- package/dist/vue-components.es11.js +0 -32
- package/dist/vue-components.es12.js +0 -439
- package/dist/vue-components.es13.js +0 -49
- package/dist/vue-components.es14.js +0 -4
- package/dist/vue-components.es15.js +0 -4
- package/dist/vue-components.es16.js +0 -725
- package/dist/vue-components.es17.js +0 -143
- package/dist/vue-components.es18.js +0 -6
- package/dist/vue-components.es19.js +0 -13
- package/dist/vue-components.es2.js +0 -30
- package/dist/vue-components.es20.js +0 -5
- package/dist/vue-components.es21.js +0 -26
- package/dist/vue-components.es22.js +0 -6
- package/dist/vue-components.es23.js +0 -10
- package/dist/vue-components.es24.js +0 -57
- package/dist/vue-components.es25.js +0 -71
- package/dist/vue-components.es26.js +0 -8
- package/dist/vue-components.es27.js +0 -8
- package/dist/vue-components.es28.js +0 -5
- package/dist/vue-components.es29.js +0 -5
- package/dist/vue-components.es3.js +0 -16
- package/dist/vue-components.es30.js +0 -4
- package/dist/vue-components.es31.js +0 -4
- package/dist/vue-components.es32.js +0 -4
- package/dist/vue-components.es33.js +0 -4
- package/dist/vue-components.es34.js +0 -19
- package/dist/vue-components.es35.js +0 -13
- package/dist/vue-components.es36.js +0 -320
- package/dist/vue-components.es37.js +0 -563
- package/dist/vue-components.es38.js +0 -29
- package/dist/vue-components.es39.js +0 -54
- package/dist/vue-components.es4.js +0 -52
- package/dist/vue-components.es40.js +0 -66
- package/dist/vue-components.es41.js +0 -6
- package/dist/vue-components.es42.js +0 -6
- package/dist/vue-components.es43.js +0 -26
- package/dist/vue-components.es44.js +0 -77
- package/dist/vue-components.es45.js +0 -42
- package/dist/vue-components.es46.js +0 -316
- package/dist/vue-components.es47.js +0 -101
- package/dist/vue-components.es48.js +0 -33
- package/dist/vue-components.es49.js +0 -4
- package/dist/vue-components.es5.js +0 -52
- package/dist/vue-components.es50.js +0 -4
- package/dist/vue-components.es51.js +0 -4
- package/dist/vue-components.es52.js +0 -113
- package/dist/vue-components.es54.js +0 -9
- package/dist/vue-components.es55.js +0 -34
- package/dist/vue-components.es57.js +0 -194
- package/dist/vue-components.es59.js +0 -40
- package/dist/vue-components.es6.js +0 -69
- package/dist/vue-components.es60.js +0 -85
- package/dist/vue-components.es61.js +0 -43
- package/dist/vue-components.es62.js +0 -7
- package/dist/vue-components.es63.js +0 -6
- 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.es7.js +0 -83
- 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.es75.js +0 -28
- 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.es8.js +0 -63
- 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.es9.js +0 -21
- 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.es93.js +0 -58
- package/dist/vue-components.es94.js +0 -19
- package/dist/vue-components.es95.js +0 -35
- 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
- package/src/components/OmegaForm/OmegaFormStuff.ts +0 -1174
- package/src/constants/index.ts +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useIntl as e } from "./vue-components6.es.js";
|
|
2
|
+
import { computed as t, h as n, onUnmounted as r, ref as i, watch as a } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/errors.ts
|
|
4
|
+
var o = (t) => {
|
|
5
|
+
let { formatMessage: n } = e(), r = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase()).trim(), i = (e) => n ? n({
|
|
6
|
+
id: `general.fields.${e}`,
|
|
7
|
+
defaultMessage: r(e)
|
|
8
|
+
}) : r(e);
|
|
9
|
+
return (e) => t.i18nNamespace ? n({
|
|
10
|
+
id: `${t.i18nNamespace}.fields.${e}`,
|
|
11
|
+
defaultMessage: i(e)
|
|
12
|
+
}) : i(e);
|
|
13
|
+
}, s = (e) => function(r) {
|
|
14
|
+
return {
|
|
15
|
+
setup() {
|
|
16
|
+
let { fieldMap: n, form: r } = e, i = r.useStore((e) => e.errors), a = r.useStore((e) => e.fieldMeta), s = r.useStore((e) => e.errorMap), c = o(r);
|
|
17
|
+
return {
|
|
18
|
+
generalErrors: i,
|
|
19
|
+
errors: t(() => {
|
|
20
|
+
let e = Object.entries(a.value).reduce((e, [t, r]) => {
|
|
21
|
+
let i = r?.errors ?? [];
|
|
22
|
+
if (!i.length) return e;
|
|
23
|
+
let a = n.value.get(t);
|
|
24
|
+
return a && e.push({
|
|
25
|
+
label: a.label,
|
|
26
|
+
inputId: a.id,
|
|
27
|
+
errors: [i[0]?.message].filter(Boolean)
|
|
28
|
+
}), e;
|
|
29
|
+
}, []), t = [], r = [s.value.onDynamic, s.value.onSubmit].filter(Boolean), i = /* @__PURE__ */ new Set();
|
|
30
|
+
for (let e of r) for (let [r, a] of Object.entries(e)) if (Array.isArray(a) && a.length) for (let e of a) {
|
|
31
|
+
let r = e;
|
|
32
|
+
if (r?.path && Array.isArray(r.path) && r.path.length) {
|
|
33
|
+
let e = r.path.join(".");
|
|
34
|
+
if (!n.value.has(e) && !i.has(e)) {
|
|
35
|
+
i.add(e), t.push({
|
|
36
|
+
label: c(e),
|
|
37
|
+
inputId: e,
|
|
38
|
+
errors: [r.message].filter(Boolean)
|
|
39
|
+
});
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return [...e, ...t];
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render({ errors: e, generalErrors: t }) {
|
|
49
|
+
return n(r, {
|
|
50
|
+
errors: e,
|
|
51
|
+
generalErrors: t,
|
|
52
|
+
...this.$attrs
|
|
53
|
+
}, this.$slots);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, c = () => {
|
|
57
|
+
let e = i(/* @__PURE__ */ new Map());
|
|
58
|
+
return {
|
|
59
|
+
fieldMap: e,
|
|
60
|
+
registerField: (t) => {
|
|
61
|
+
a(t, (t) => {
|
|
62
|
+
e.value.set(t.name, {
|
|
63
|
+
label: t.label,
|
|
64
|
+
id: t.id
|
|
65
|
+
});
|
|
66
|
+
}, { immediate: !0 }), r(() => {
|
|
67
|
+
e.value.get(t.value.name)?.id === t.value.id && e.value.delete(t.value.name);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { s as eHoc, c as makeFieldMap, o as useErrorLabel };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createElementBlock as r, defineComponent as i, guardReactiveProps as a, mergeProps as o, normalizeProps as s, onMounted as c, openBlock as l, provide as u, renderList as d, renderSlot as f, resolveDynamicComponent as p, withCtx as m } from "vue";
|
|
2
|
+
//#region src/components/OmegaForm/OmegaArray.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var h = /* @__PURE__ */ i({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "OmegaArray",
|
|
6
|
+
props: {
|
|
7
|
+
form: {},
|
|
8
|
+
inputClass: {},
|
|
9
|
+
name: {},
|
|
10
|
+
defaultItems: {},
|
|
11
|
+
items: {}
|
|
12
|
+
},
|
|
13
|
+
setup(i) {
|
|
14
|
+
let h = i, g = h.form.useStore((e) => e.values), _ = t(() => {
|
|
15
|
+
let e = h.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
16
|
+
try {
|
|
17
|
+
return e.split(".").reduce((e, t) => e && e[t], g.value);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
return console.error(e), [];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return c(async () => {
|
|
23
|
+
h.defaultItems && !_.value && h.form.setFieldValue(h.name, h.defaultItems);
|
|
24
|
+
}), u("getMetaFromArray", t(() => (e) => {
|
|
25
|
+
let t = e.replace(/\[\d+\]/g, "");
|
|
26
|
+
return h.form.meta[t];
|
|
27
|
+
})), (t, c) => (l(), n(p(i.form.Field), { name: i.name }, {
|
|
28
|
+
default: m(({ field: c, state: u }) => [
|
|
29
|
+
f(t.$slots, "pre-array", s(a({
|
|
30
|
+
field: c,
|
|
31
|
+
state: u
|
|
32
|
+
}))),
|
|
33
|
+
(l(!0), r(e, null, d(_.value, (e, r) => (l(), n(p(i.form.Field), {
|
|
34
|
+
key: `${i.name}[${Number(r)}]`,
|
|
35
|
+
name: `${i.name}[${Number(r)}]`
|
|
36
|
+
}, {
|
|
37
|
+
default: m(({ field: e, state: n }) => [f(t.$slots, "default", o({ ref_for: !0 }, {
|
|
38
|
+
subField: e,
|
|
39
|
+
subState: n,
|
|
40
|
+
index: Number(r),
|
|
41
|
+
field: c
|
|
42
|
+
}))]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["name"]))), 128)),
|
|
45
|
+
f(t.$slots, "post-array", s(a({
|
|
46
|
+
field: c,
|
|
47
|
+
state: u
|
|
48
|
+
}))),
|
|
49
|
+
f(t.$slots, "field", s(a({ field: c })))
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 8, ["name"]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { h as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createElementBlock as n, createVNode as r, defineComponent as i, mergeProps as a, openBlock as o, renderList as s, renderSlot as c, unref as l } from "vue";
|
|
2
|
+
import { Order as u } from "effect-app";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaAutoGen.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var d = /* @__PURE__ */ i({
|
|
5
|
+
__name: "OmegaAutoGen",
|
|
6
|
+
props: {
|
|
7
|
+
form: {},
|
|
8
|
+
pick: {},
|
|
9
|
+
omit: {},
|
|
10
|
+
labelMap: { type: Function },
|
|
11
|
+
filterMap: { type: Function },
|
|
12
|
+
order: {},
|
|
13
|
+
sort: {}
|
|
14
|
+
},
|
|
15
|
+
setup(i) {
|
|
16
|
+
let d = (e) => (t) => Object.fromEntries(Object.entries(t).map(([t, n]) => [t, e(n, t)])), f = (e) => (t) => Object.fromEntries(Object.entries(t).filter(([t, n]) => e(n, t))), p = (e) => (t) => Object.entries(t).reduce((t, [n, r]) => {
|
|
17
|
+
let i = e(r, n);
|
|
18
|
+
return i !== !1 && (t[n] = i), t;
|
|
19
|
+
}, {}), m = i, h = (e, t) => {
|
|
20
|
+
let n = t?.indexOf(e) ?? -1;
|
|
21
|
+
return n === -1 ? 2 ** 53 - 1 : n;
|
|
22
|
+
}, g = u.mapInput(u.Number, (e) => h(e.name, m.order || [])), _ = t(() => {
|
|
23
|
+
let e = f((e, t) => !!e && (m.pick ? m.pick.includes(t) && !m.omit?.includes(t) : !m.omit?.includes(t)))(m.form.meta), t = d((e, t) => ({
|
|
24
|
+
name: t,
|
|
25
|
+
label: m.labelMap?.(t) || t,
|
|
26
|
+
...e
|
|
27
|
+
}))(e), n = m.filterMap ? p((e) => {
|
|
28
|
+
let t = m.filterMap?.(e.name, e);
|
|
29
|
+
return t === void 0 || t === !0 ? e : t;
|
|
30
|
+
})(t) : t, r = [...Object.values(n)].sort(g);
|
|
31
|
+
return m.sort ? r.sort(m.sort) : r;
|
|
32
|
+
});
|
|
33
|
+
return (t, u) => (o(!0), n(e, null, s(_.value, ({ name: e, label: n, ...o }) => c(t.$slots, "default", { child: {
|
|
34
|
+
name: e,
|
|
35
|
+
label: n,
|
|
36
|
+
...o
|
|
37
|
+
} }, () => [r(l(i.form).Input, a({
|
|
38
|
+
name: e,
|
|
39
|
+
label: n
|
|
40
|
+
}, { ref_for: !0 }, o), null, 16, ["name", "label"])])), 256));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { d as default };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { useIntl as e } from "./vue-components6.es.js";
|
|
2
|
+
import { Fragment as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, getCurrentInstance as u, guardReactiveProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaErrorsInternal.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var x = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "error-alert"
|
|
7
|
+
}, S = { class: "container" }, C = {
|
|
8
|
+
key: 0,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
}, w = { class: "text-h6" }, T = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "error-list"
|
|
15
|
+
}, E = ["for"], D = { key: 1 }, O = /* @__PURE__ */ l({
|
|
16
|
+
__name: "OmegaErrorsInternal",
|
|
17
|
+
props: {
|
|
18
|
+
generalErrors: {},
|
|
19
|
+
errors: {},
|
|
20
|
+
hideErrorDetails: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(l) {
|
|
23
|
+
let O = u()?.appContext.components.VAlert, k = l, { trans: A } = e(), j = r(() => k.generalErrors ? k.generalErrors.filter((e) => !!e).flatMap((e) => Object.values(e).filter((e) => !!e).flatMap((e) => e.filter((e) => !!e?.message).map((e) => e.message))) : []);
|
|
24
|
+
return (e, r) => (m(), i(n, null, {
|
|
25
|
+
default: b(() => [l.errors.length || j.value.length ? (m(), o("div", x, [g(e.$slots, "default", p(d({
|
|
26
|
+
errors: l.errors,
|
|
27
|
+
showedGeneralErrors: j.value
|
|
28
|
+
})), () => [(m(), i(_(y(O) ? "v-alert" : "div"), {
|
|
29
|
+
class: f([y(O) ? "mb-4" : "error-alert-content", "mb-4"]),
|
|
30
|
+
type: "error",
|
|
31
|
+
variant: "tonal",
|
|
32
|
+
role: "alert",
|
|
33
|
+
"aria-live": "polite"
|
|
34
|
+
}, {
|
|
35
|
+
default: b(() => [s("div", S, [g(e.$slots, "icon", {}, () => [y(O) ? a("", !0) : (m(), o("svg", C, [...r[0] ||= [
|
|
36
|
+
s("path", {
|
|
37
|
+
d: "M16 2H8L2 8V16L8 22H16L22 16V8L16 2Z",
|
|
38
|
+
stroke: "currentColor",
|
|
39
|
+
"stroke-width": "2",
|
|
40
|
+
"stroke-linecap": "round",
|
|
41
|
+
"stroke-linejoin": "round"
|
|
42
|
+
}, null, -1),
|
|
43
|
+
s("path", {
|
|
44
|
+
d: "M12 8V12",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
"stroke-width": "2",
|
|
47
|
+
"stroke-linecap": "round",
|
|
48
|
+
"stroke-linejoin": "round"
|
|
49
|
+
}, null, -1),
|
|
50
|
+
s("path", {
|
|
51
|
+
d: "M12 16.0195V16",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
"stroke-width": "2",
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-linejoin": "round"
|
|
56
|
+
}, null, -1)
|
|
57
|
+
]]))], !0), s("div", null, [s("div", w, v(y(A)("form.includes_error")) + ": ", 1), l.errors.length ? (m(), o("ul", T, [(m(!0), o(t, null, h(l.errors, (e) => (m(), o("li", {
|
|
58
|
+
key: e.inputId,
|
|
59
|
+
class: "error-item"
|
|
60
|
+
}, [s("div", null, [
|
|
61
|
+
s("label", {
|
|
62
|
+
for: e.inputId,
|
|
63
|
+
class: "error-link"
|
|
64
|
+
}, v(e.label), 9, E),
|
|
65
|
+
r[1] ||= c(" " + v(" ") + " ", -1),
|
|
66
|
+
l.hideErrorDetails ? a("", !0) : (m(), o("div", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: f(["error-message", e.errors.length < 2 && "single-error"])
|
|
69
|
+
}, [(m(), i(_(e.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
|
|
70
|
+
default: b(() => [(m(!0), o(t, null, h(e.errors, (t) => (m(), i(_(e.errors.length > 1 ? "li" : "span"), { key: t }, {
|
|
71
|
+
default: b(() => [c(v(t), 1)]),
|
|
72
|
+
_: 2
|
|
73
|
+
}, 1024))), 128))]),
|
|
74
|
+
_: 2
|
|
75
|
+
}, 1024))], 2))
|
|
76
|
+
])]))), 128))])) : (m(), o("span", D, v(j.value[0]), 1))])])]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["class"]))], !0)])) : a("", !0)]),
|
|
79
|
+
_: 3
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { O as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.v-enter-from[data-v-5278f8d3],.v-leave-to[data-v-5278f8d3]{opacity:0;grid-template-rows:0fr;max-height:0}.v-enter-active[data-v-5278f8d3],.v-leave-active[data-v-5278f8d3]{transition:all .15s;display:grid}.v-enter-to[data-v-5278f8d3],.v-leave-from[data-v-5278f8d3]{opacity:1;grid-template-rows:1fr;max-height:50vh}.error-alert[data-v-5278f8d3]{transition-behavior:allow-discrete;min-height:0;display:grid;overflow:hidden}.error-alert>[data-v-5278f8d3]{min-height:0}.error-list[data-v-5278f8d3]{list-style-position:inside}.error-list [data-v-5278f8d3]::marker{margin:0;padding:0}.error-alert-content[data-v-5278f8d3]{background-color:var(--error-background,#fff5f5);color:var(--error-color,#c92a2a);padding:1em}.error-link[data-v-5278f8d3]{color:var(--error-color,#c92a2a);cursor:pointer;font-weight:700;position:relative}.error-link[data-v-5278f8d3]:after{content:"";background:rgba(from var(--error-color,#c92a2a) r g b / .5);height:1px;position:absolute;bottom:0;left:0;right:0}.text-h6[data-v-5278f8d3]{font-size:1.25em;font-weight:700}.error-message[data-v-5278f8d3]{font-style:italic}.error-item[data-v-5278f8d3]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-5278f8d3]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-5278f8d3]{gap:1.5em;display:flex}.container svg[data-v-5278f8d3]{width:3em}.container .single-error[data-v-5278f8d3]{display:inline-block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
3
|
+
import e from "./vue-components26.es.js";
|
|
4
|
+
|
|
5
|
+
import t from "./vue-components28.es.js";
|
|
6
|
+
//#region src/components/OmegaForm/OmegaErrorsInternal.vue
|
|
7
|
+
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-5278f8d3"]]);
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as default };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementVNode as r, createSlots as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, openBlock as l, renderSlot as u, resolveComponent as d, toDisplayString as f, withCtx as p } from "vue";
|
|
2
|
+
//#region src/components/CommandButton.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var m = { class: "ml-2" }, h = { class: "ml-2" }, g = /* @__PURE__ */ s({
|
|
4
|
+
name: "CommandButton",
|
|
5
|
+
props: {
|
|
6
|
+
input: {},
|
|
7
|
+
command: {},
|
|
8
|
+
empty: { type: Boolean },
|
|
9
|
+
disabled: {},
|
|
10
|
+
title: {},
|
|
11
|
+
mapProgress: { type: Function }
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
let g = s, _ = e(() => g.command.blocked || g.disabled), v = e(() => {
|
|
15
|
+
if (g.mapProgress) {
|
|
16
|
+
let e = g.command.result;
|
|
17
|
+
return e === void 0 ? void 0 : g.mapProgress(e);
|
|
18
|
+
}
|
|
19
|
+
return g.command.progress;
|
|
20
|
+
}), y = e(() => {
|
|
21
|
+
let e = v.value;
|
|
22
|
+
if (e !== void 0) return typeof e == "string" ? e : e.text;
|
|
23
|
+
}), b = e(() => {
|
|
24
|
+
let e = v.value;
|
|
25
|
+
return typeof e == "object" && e ? e.percentage : void 0;
|
|
26
|
+
}), x = () => {
|
|
27
|
+
if (_.value) return;
|
|
28
|
+
let e = "input" in g && g.input ? g.input : void 0, t = g.command.handle;
|
|
29
|
+
t(e);
|
|
30
|
+
};
|
|
31
|
+
return (e, g) => {
|
|
32
|
+
let v = d("v-progress-circular"), S = d("v-btn");
|
|
33
|
+
return s.command.allowed && !s.empty ? (l(), t(S, c({ key: 0 }, e.$attrs, {
|
|
34
|
+
loading: s.command.waiting,
|
|
35
|
+
"aria-disabled": _.value,
|
|
36
|
+
title: s.title ?? s.command.action,
|
|
37
|
+
class: { "v-btn--disabled": _.value },
|
|
38
|
+
onClick: x
|
|
39
|
+
}), i({
|
|
40
|
+
default: p(() => [u(e.$slots, "default", {
|
|
41
|
+
loading: s.command.waiting,
|
|
42
|
+
disabled: _.value,
|
|
43
|
+
label: s.command.label,
|
|
44
|
+
title: s.title ?? s.command.action
|
|
45
|
+
}, () => [a(f(s.command.label), 1)])]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, [y.value === void 0 ? void 0 : {
|
|
48
|
+
name: "loader",
|
|
49
|
+
fn: p(() => [o(v, {
|
|
50
|
+
indeterminate: b.value === void 0,
|
|
51
|
+
"model-value": b.value,
|
|
52
|
+
size: "20",
|
|
53
|
+
width: "2"
|
|
54
|
+
}, null, 8, ["indeterminate", "model-value"]), r("span", m, f(y.value), 1)]),
|
|
55
|
+
key: "0"
|
|
56
|
+
}]), 1040, [
|
|
57
|
+
"loading",
|
|
58
|
+
"aria-disabled",
|
|
59
|
+
"title",
|
|
60
|
+
"class"
|
|
61
|
+
])) : s.command.allowed ? (l(), t(S, c({ key: 1 }, e.$attrs, {
|
|
62
|
+
loading: s.command.waiting,
|
|
63
|
+
"aria-disabled": _.value,
|
|
64
|
+
title: s.title ?? s.command.action,
|
|
65
|
+
class: { "v-btn--disabled": _.value },
|
|
66
|
+
onClick: x
|
|
67
|
+
}), i({ _: 2 }, [y.value === void 0 ? void 0 : {
|
|
68
|
+
name: "loader",
|
|
69
|
+
fn: p(() => [o(v, {
|
|
70
|
+
indeterminate: b.value === void 0,
|
|
71
|
+
"model-value": b.value,
|
|
72
|
+
size: "20",
|
|
73
|
+
width: "2"
|
|
74
|
+
}, null, 8, ["indeterminate", "model-value"]), r("span", h, f(y.value), 1)]),
|
|
75
|
+
key: "0"
|
|
76
|
+
}]), 1040, [
|
|
77
|
+
"loading",
|
|
78
|
+
"aria-disabled",
|
|
79
|
+
"title",
|
|
80
|
+
"class"
|
|
81
|
+
])) : n("", !0);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
//#endregion
|
|
86
|
+
export { g as default };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { getInputType as e } from "./vue-components11.es.js";
|
|
2
|
+
import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createSlots as a, defineComponent as o, guardReactiveProps as s, mergeProps as c, normalizeProps as l, openBlock as u, renderList as d, renderSlot as f, resolveComponent as p, resolveDynamicComponent as m, unref as h, withCtx as g } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaInputVuetify.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _ = /* @__PURE__ */ o({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "OmegaInputVuetify",
|
|
7
|
+
props: {
|
|
8
|
+
inputProps: {},
|
|
9
|
+
field: {},
|
|
10
|
+
state: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["focus", "blur"],
|
|
13
|
+
setup(o) {
|
|
14
|
+
return (_, v) => {
|
|
15
|
+
let y = p("v-text-field"), b = p("v-textarea"), x = p("v-radio"), S = p("v-radio-group"), C = p("v-select"), w = p("v-autocomplete");
|
|
16
|
+
return u(), i("div", {
|
|
17
|
+
class: "omega-input",
|
|
18
|
+
onFocusout: v[4] ||= (e) => {
|
|
19
|
+
_.$emit("blur", e), o.field.handleBlur();
|
|
20
|
+
},
|
|
21
|
+
onFocusin: v[5] ||= (e) => _.$emit("focus", e)
|
|
22
|
+
}, [
|
|
23
|
+
o.inputProps.type === "boolean" || o.inputProps.type === "switch" ? (u(), n(m(o.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), c({
|
|
24
|
+
key: 0,
|
|
25
|
+
id: o.inputProps.id,
|
|
26
|
+
name: o.field.name,
|
|
27
|
+
label: o.inputProps.label,
|
|
28
|
+
"error-messages": o.inputProps.errorMessages,
|
|
29
|
+
error: o.inputProps.error,
|
|
30
|
+
ripple: ""
|
|
31
|
+
}, _.$attrs, {
|
|
32
|
+
"model-value": o.state.value,
|
|
33
|
+
onChange: v[0] ||= (e) => o.field.handleChange(e.target.checked)
|
|
34
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
35
|
+
name: "label",
|
|
36
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
37
|
+
required: o.inputProps.required,
|
|
38
|
+
id: o.inputProps.id,
|
|
39
|
+
label: o.inputProps.label
|
|
40
|
+
})))]),
|
|
41
|
+
key: "0"
|
|
42
|
+
} : void 0]), 1040, [
|
|
43
|
+
"id",
|
|
44
|
+
"name",
|
|
45
|
+
"label",
|
|
46
|
+
"error-messages",
|
|
47
|
+
"error",
|
|
48
|
+
"model-value"
|
|
49
|
+
])) : r("", !0),
|
|
50
|
+
o.inputProps.type === "email" || o.inputProps.type === "string" || o.inputProps.type === "password" || o.inputProps.type === "date" ? (u(), n(y, c({
|
|
51
|
+
key: 1,
|
|
52
|
+
id: o.inputProps.id,
|
|
53
|
+
required: o.inputProps.required,
|
|
54
|
+
"min-length": o.inputProps.minLength,
|
|
55
|
+
"max-length": o.inputProps.maxLength,
|
|
56
|
+
type: h(e)(o.inputProps.type),
|
|
57
|
+
name: o.field.name,
|
|
58
|
+
label: o.inputProps.label,
|
|
59
|
+
"error-messages": o.inputProps.errorMessages,
|
|
60
|
+
error: o.inputProps.error
|
|
61
|
+
}, _.$attrs, {
|
|
62
|
+
"model-value": o.state.value,
|
|
63
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
64
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
65
|
+
name: "label",
|
|
66
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
67
|
+
required: o.inputProps.required,
|
|
68
|
+
id: o.inputProps.id,
|
|
69
|
+
label: o.inputProps.label
|
|
70
|
+
})))]),
|
|
71
|
+
key: "0"
|
|
72
|
+
} : void 0]), 1040, [
|
|
73
|
+
"id",
|
|
74
|
+
"required",
|
|
75
|
+
"min-length",
|
|
76
|
+
"max-length",
|
|
77
|
+
"type",
|
|
78
|
+
"name",
|
|
79
|
+
"label",
|
|
80
|
+
"error-messages",
|
|
81
|
+
"error",
|
|
82
|
+
"model-value",
|
|
83
|
+
"onUpdate:modelValue"
|
|
84
|
+
])) : r("", !0),
|
|
85
|
+
o.inputProps.type === "text" ? (u(), n(b, c({
|
|
86
|
+
key: 2,
|
|
87
|
+
id: o.inputProps.id,
|
|
88
|
+
required: o.inputProps.required,
|
|
89
|
+
"min-length": o.inputProps.minLength,
|
|
90
|
+
"max-length": o.inputProps.maxLength,
|
|
91
|
+
name: o.field.name,
|
|
92
|
+
label: o.inputProps.label,
|
|
93
|
+
"error-messages": o.inputProps.errorMessages,
|
|
94
|
+
error: o.inputProps.error
|
|
95
|
+
}, _.$attrs, {
|
|
96
|
+
"model-value": o.state.value,
|
|
97
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
98
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
99
|
+
name: "label",
|
|
100
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
101
|
+
required: o.inputProps.required,
|
|
102
|
+
id: o.inputProps.id,
|
|
103
|
+
label: o.inputProps.label
|
|
104
|
+
})))]),
|
|
105
|
+
key: "0"
|
|
106
|
+
} : void 0]), 1040, [
|
|
107
|
+
"id",
|
|
108
|
+
"required",
|
|
109
|
+
"min-length",
|
|
110
|
+
"max-length",
|
|
111
|
+
"name",
|
|
112
|
+
"label",
|
|
113
|
+
"error-messages",
|
|
114
|
+
"error",
|
|
115
|
+
"model-value",
|
|
116
|
+
"onUpdate:modelValue"
|
|
117
|
+
])) : r("", !0),
|
|
118
|
+
o.inputProps.type === "number" || o.inputProps.type === "range" ? (u(), n(m(o.inputProps.type === "range" ? "v-slider" : "v-text-field"), c({
|
|
119
|
+
key: 3,
|
|
120
|
+
id: o.inputProps.id,
|
|
121
|
+
required: o.inputProps.required,
|
|
122
|
+
min: o.inputProps.min,
|
|
123
|
+
max: o.inputProps.max,
|
|
124
|
+
type: o.inputProps.type,
|
|
125
|
+
name: o.field.name,
|
|
126
|
+
label: o.inputProps.label,
|
|
127
|
+
"error-messages": o.inputProps.errorMessages,
|
|
128
|
+
error: o.inputProps.error
|
|
129
|
+
}, _.$attrs, {
|
|
130
|
+
"model-value": o.state.value,
|
|
131
|
+
"onUpdate:modelValue": v[1] ||= (e) => {
|
|
132
|
+
e || e === 0 ? o.field.handleChange(Number(e)) : o.field.handleChange(void 0);
|
|
133
|
+
}
|
|
134
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
135
|
+
name: "label",
|
|
136
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
137
|
+
required: o.inputProps.required,
|
|
138
|
+
id: o.inputProps.id,
|
|
139
|
+
label: o.inputProps.label
|
|
140
|
+
})))]),
|
|
141
|
+
key: "0"
|
|
142
|
+
} : void 0]), 1040, [
|
|
143
|
+
"id",
|
|
144
|
+
"required",
|
|
145
|
+
"min",
|
|
146
|
+
"max",
|
|
147
|
+
"type",
|
|
148
|
+
"name",
|
|
149
|
+
"label",
|
|
150
|
+
"error-messages",
|
|
151
|
+
"error",
|
|
152
|
+
"model-value"
|
|
153
|
+
])) : r("", !0),
|
|
154
|
+
o.inputProps.type === "radio" ? (u(), n(S, c({
|
|
155
|
+
key: 4,
|
|
156
|
+
id: o.inputProps.id,
|
|
157
|
+
name: o.field.name,
|
|
158
|
+
label: o.inputProps.label,
|
|
159
|
+
"error-messages": o.inputProps.errorMessages,
|
|
160
|
+
error: o.inputProps.error
|
|
161
|
+
}, _.$attrs, {
|
|
162
|
+
"model-value": o.state.value,
|
|
163
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
164
|
+
}), a({
|
|
165
|
+
default: g(() => [(u(!0), i(t, null, d(o.inputProps.options, (e) => (u(), n(x, {
|
|
166
|
+
key: e.value,
|
|
167
|
+
label: e.title,
|
|
168
|
+
value: e.value
|
|
169
|
+
}, null, 8, ["label", "value"]))), 128))]),
|
|
170
|
+
_: 2
|
|
171
|
+
}, [_.$slots.label ? {
|
|
172
|
+
name: "label",
|
|
173
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
174
|
+
required: o.inputProps.required,
|
|
175
|
+
id: o.inputProps.id,
|
|
176
|
+
label: o.inputProps.label
|
|
177
|
+
})))]),
|
|
178
|
+
key: "0"
|
|
179
|
+
} : void 0]), 1040, [
|
|
180
|
+
"id",
|
|
181
|
+
"name",
|
|
182
|
+
"label",
|
|
183
|
+
"error-messages",
|
|
184
|
+
"error",
|
|
185
|
+
"model-value",
|
|
186
|
+
"onUpdate:modelValue"
|
|
187
|
+
])) : r("", !0),
|
|
188
|
+
o.inputProps.type === "select" || o.inputProps.type === "multiple" ? (u(), n(C, c({
|
|
189
|
+
key: 5,
|
|
190
|
+
id: o.inputProps.id,
|
|
191
|
+
clearable: o.inputProps.type === "select",
|
|
192
|
+
required: o.inputProps.required,
|
|
193
|
+
multiple: o.inputProps.type === "multiple",
|
|
194
|
+
chips: o.inputProps.type === "multiple",
|
|
195
|
+
name: o.field.name,
|
|
196
|
+
label: o.inputProps.label,
|
|
197
|
+
items: o.inputProps.options,
|
|
198
|
+
"error-messages": o.inputProps.errorMessages,
|
|
199
|
+
error: o.inputProps.error
|
|
200
|
+
}, _.$attrs, {
|
|
201
|
+
"model-value": o.state.value,
|
|
202
|
+
onClear: v[2] ||= (e) => o.field.handleChange(void 0),
|
|
203
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
204
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
205
|
+
name: "label",
|
|
206
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
207
|
+
required: o.inputProps.required,
|
|
208
|
+
id: o.inputProps.id,
|
|
209
|
+
label: o.inputProps.label
|
|
210
|
+
})))]),
|
|
211
|
+
key: "0"
|
|
212
|
+
} : void 0]), 1040, [
|
|
213
|
+
"id",
|
|
214
|
+
"clearable",
|
|
215
|
+
"required",
|
|
216
|
+
"multiple",
|
|
217
|
+
"chips",
|
|
218
|
+
"name",
|
|
219
|
+
"label",
|
|
220
|
+
"items",
|
|
221
|
+
"error-messages",
|
|
222
|
+
"error",
|
|
223
|
+
"model-value",
|
|
224
|
+
"onUpdate:modelValue"
|
|
225
|
+
])) : r("", !0),
|
|
226
|
+
o.inputProps.type === "autocomplete" || o.inputProps.type === "autocompletemultiple" ? (u(), n(w, c({
|
|
227
|
+
key: 6,
|
|
228
|
+
id: o.inputProps.id,
|
|
229
|
+
clearable: o.inputProps.type === "autocomplete",
|
|
230
|
+
multiple: o.inputProps.type === "autocompletemultiple",
|
|
231
|
+
required: o.inputProps.required,
|
|
232
|
+
name: o.field.name,
|
|
233
|
+
label: o.inputProps.label,
|
|
234
|
+
items: o.inputProps.options,
|
|
235
|
+
"error-messages": o.inputProps.errorMessages,
|
|
236
|
+
error: o.inputProps.error,
|
|
237
|
+
chips: o.inputProps.type === "autocompletemultiple"
|
|
238
|
+
}, _.$attrs, {
|
|
239
|
+
"model-value": o.state.value,
|
|
240
|
+
onClear: v[3] ||= (e) => o.field.handleChange(void 0),
|
|
241
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
242
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
243
|
+
name: "label",
|
|
244
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
245
|
+
required: o.inputProps.required,
|
|
246
|
+
id: o.inputProps.id,
|
|
247
|
+
label: o.inputProps.label
|
|
248
|
+
})))]),
|
|
249
|
+
key: "0"
|
|
250
|
+
} : void 0]), 1040, [
|
|
251
|
+
"id",
|
|
252
|
+
"clearable",
|
|
253
|
+
"multiple",
|
|
254
|
+
"required",
|
|
255
|
+
"name",
|
|
256
|
+
"label",
|
|
257
|
+
"items",
|
|
258
|
+
"error-messages",
|
|
259
|
+
"error",
|
|
260
|
+
"chips",
|
|
261
|
+
"model-value",
|
|
262
|
+
"onUpdate:modelValue"
|
|
263
|
+
])) : r("", !0)
|
|
264
|
+
], 32);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
//#endregion
|
|
269
|
+
export { _ as default };
|