@effect-app/vue-components 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/OmegaForm/InputProps.d.ts +24 -0
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaTaggedUnion.vue.d.ts +34 -0
- package/dist/types/components/OmegaForm/OmegaTaggedUnionInternal.vue.d.ts +32 -0
- package/dist/types/components/OmegaForm/index.d.ts +3 -1
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +26 -0
- package/dist/vue-components.es.js +30 -26
- package/dist/vue-components.es10.js +223 -341
- package/dist/vue-components.es11.js +29 -33
- package/dist/vue-components.es12.js +357 -2
- package/dist/vue-components.es13.js +34 -2
- package/dist/vue-components.es14.js +2 -10
- package/dist/vue-components.es15.js +2 -5
- package/dist/vue-components.es16.js +10 -54
- package/dist/vue-components.es17.js +5 -68
- package/dist/vue-components.es18.js +54 -6
- package/dist/vue-components.es19.js +68 -6
- package/dist/vue-components.es2.js +20 -16
- package/dist/vue-components.es20.js +6 -3
- package/dist/vue-components.es21.js +6 -3
- package/dist/vue-components.es22.js +3 -2
- package/dist/vue-components.es23.js +3 -2
- package/dist/vue-components.es24.js +2 -17
- package/dist/vue-components.es25.js +2 -11
- package/dist/vue-components.es26.js +2 -136
- package/dist/vue-components.es27.js +4 -0
- package/dist/vue-components.es28.js +17 -42
- package/dist/vue-components.es29.js +11 -2
- package/dist/vue-components.es30.js +136 -2
- package/dist/vue-components.es32.js +44 -0
- package/dist/vue-components.es33.js +2 -7
- package/dist/vue-components.es34.js +2 -32
- package/dist/vue-components.es37.js +7 -23
- package/dist/vue-components.es38.js +32 -5
- package/dist/vue-components.es40.js +4 -30
- package/dist/vue-components.es41.js +20 -19
- package/dist/vue-components.es42.js +5 -12
- package/dist/vue-components.es43.js +21 -5
- package/dist/vue-components.es44.js +29 -18
- package/dist/vue-components.es45.js +22 -9
- package/dist/vue-components.es46.js +7 -26
- package/dist/vue-components.es47.js +5 -48
- package/dist/vue-components.es48.js +19 -26
- package/dist/vue-components.es49.js +9 -11
- package/dist/vue-components.es5.js +2 -2
- package/dist/vue-components.es50.js +26 -60
- package/dist/vue-components.es51.js +37 -45
- package/dist/vue-components.es52.js +26 -17
- package/dist/vue-components.es53.js +10 -32
- package/dist/vue-components.es54.js +65 -29
- package/dist/vue-components.es55.js +45 -31
- package/dist/vue-components.es56.js +17 -2
- package/dist/vue-components.es57.js +29 -40
- package/dist/vue-components.es58.js +29 -2
- package/dist/vue-components.es59.js +44 -0
- package/dist/vue-components.es6.js +9 -9
- package/dist/vue-components.es60.js +4 -0
- package/dist/vue-components.es61.js +46 -0
- package/dist/vue-components.es62.js +4 -0
- package/dist/vue-components.es7.js +26 -25
- package/dist/vue-components.es8.js +51 -198
- package/dist/vue-components.es9.js +17 -30
- package/package.json +1 -1
- package/src/components/OmegaForm/InputProps.ts +32 -0
- package/src/components/OmegaForm/OmegaFormStuff.ts +22 -3
- package/src/components/OmegaForm/OmegaInput.vue +4 -1
- package/src/components/OmegaForm/OmegaInternalInput.vue +35 -13
- package/src/components/OmegaForm/OmegaTaggedUnion.vue +73 -0
- package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +38 -0
- package/src/components/OmegaForm/index.ts +3 -1
- package/src/components/OmegaForm/useOmegaForm.ts +178 -11
- package/dist/vue-components.es36.js +0 -6
- package/dist/vue-components.es39.js +0 -23
- /package/dist/{vue-components.es31.js → vue-components.es35.js} +0 -0
|
@@ -1,8 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
|
|
2
|
+
import { Order as l, pipe as v, Array as u } from "effect-app";
|
|
3
|
+
const I = /* @__PURE__ */ O({
|
|
4
|
+
__name: "OmegaAutoGen",
|
|
5
|
+
props: {
|
|
6
|
+
form: {},
|
|
7
|
+
pick: {},
|
|
8
|
+
omit: {},
|
|
9
|
+
labelMap: { type: Function },
|
|
10
|
+
filterMap: { type: Function },
|
|
11
|
+
order: {},
|
|
12
|
+
sort: {}
|
|
13
|
+
},
|
|
14
|
+
setup(i) {
|
|
15
|
+
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
+
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
+
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
+
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
+
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
+
(t, [o, c]) => {
|
|
21
|
+
const s = e(c, o);
|
|
22
|
+
return s !== !1 && (t[o] = s), t;
|
|
23
|
+
},
|
|
24
|
+
{}
|
|
25
|
+
), n = i, f = (e, r) => {
|
|
26
|
+
const t = r?.indexOf(e) ?? -1;
|
|
27
|
+
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
+
}, d = l.mapInput(
|
|
29
|
+
l.number,
|
|
30
|
+
(e) => f(e.name, n.order || [])
|
|
31
|
+
), b = j(
|
|
32
|
+
() => v(
|
|
33
|
+
n.form.meta,
|
|
34
|
+
// include / exclude
|
|
35
|
+
a(
|
|
36
|
+
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
|
+
),
|
|
38
|
+
(e) => e,
|
|
39
|
+
// labelMap and adding name
|
|
40
|
+
p((e, r) => ({
|
|
41
|
+
name: r,
|
|
42
|
+
label: n.labelMap?.(r) || r,
|
|
43
|
+
...e
|
|
44
|
+
})),
|
|
45
|
+
// filterMap
|
|
46
|
+
n.filterMap ? m((e) => {
|
|
47
|
+
const r = n.filterMap?.(e.name, e);
|
|
48
|
+
return r === void 0 || r === !0 ? e : r;
|
|
49
|
+
}) : (e) => e,
|
|
50
|
+
// transform to array
|
|
51
|
+
(e) => Object.values(e),
|
|
52
|
+
// order
|
|
53
|
+
u.sort(d),
|
|
54
|
+
// sort
|
|
55
|
+
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
+
child: { name: t, label: o, ...c }
|
|
60
|
+
}, () => [
|
|
61
|
+
g(h(i.form).Input, k({
|
|
62
|
+
name: t,
|
|
63
|
+
label: o
|
|
64
|
+
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
+
])), 256));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
6
68
|
export {
|
|
7
|
-
|
|
69
|
+
I as default
|
|
8
70
|
};
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { default as a } from "./vue-components.es4.js";
|
|
2
2
|
import { default as r } from "./vue-components.es5.js";
|
|
3
|
-
import { createMeta as
|
|
4
|
-
import { useOmegaForm as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { createMeta as n, duplicateSchema as u, generateInputStandardSchemaFromFieldMeta as p, generateMetaFromSchema as f, getInputType as l, nullableInput as d } from "./vue-components.es12.js";
|
|
4
|
+
import { useOmegaForm as s } from "./vue-components.es10.js";
|
|
5
|
+
import { default as i } from "./vue-components.es6.js";
|
|
6
|
+
import { default as c } from "./vue-components.es7.js";
|
|
7
|
+
import { default as F } from "./vue-components.es8.js";
|
|
8
|
+
import { default as C } from "./vue-components.es9.js";
|
|
9
|
+
import { useOnClose as M, usePreventClose as T } from "./vue-components.es11.js";
|
|
10
|
+
import { createUseFormWithCustomInput as y } from "./vue-components.es13.js";
|
|
9
11
|
export {
|
|
10
12
|
a as CommandButton,
|
|
11
13
|
r as Dialog,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
i as OmegaInput,
|
|
15
|
+
F as OmegaTaggedUnion,
|
|
16
|
+
C as OmegaTaggedUnionInternal,
|
|
17
|
+
c as OmegaVuetifyInput,
|
|
18
|
+
n as createMeta,
|
|
19
|
+
y as createUseFormWithCustomInput,
|
|
20
|
+
u as duplicateSchema,
|
|
21
|
+
p as generateInputStandardSchemaFromFieldMeta,
|
|
18
22
|
f as generateMetaFromSchema,
|
|
19
23
|
l as getInputType,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
d as nullableInput,
|
|
25
|
+
s as useOmegaForm,
|
|
26
|
+
M as useOnClose,
|
|
27
|
+
T as usePreventClose
|
|
24
28
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{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-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(r,t){const i=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{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-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,r,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import r from "./vue-components.es35.js";
|
|
3
|
+
|
|
4
|
+
import o from "./vue-components.es37.js";
|
|
5
|
+
const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-d4ffe76f"]]);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
e as default
|
|
5
8
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8a2f9d6f]{display:contents}fieldset[disabled][data-v-8a2f9d6f]>*{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-8a2f9d6f]{display:contents}fieldset[disabled][data-v-8a2f9d6f]>*{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
|
+
import o from "./vue-components.es38.js";
|
|
3
|
+
|
|
4
|
+
import m from "./vue-components.es37.js";
|
|
5
|
+
const f = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8a2f9d6f"]]);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
f as default
|
|
5
8
|
};
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
|
|
3
|
-
var i = t.get(e);
|
|
4
|
-
i ? i.push(f) : t.set(e, [f]);
|
|
5
|
-
}, off: function(e, f) {
|
|
6
|
-
var i = t.get(e);
|
|
7
|
-
i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
|
|
8
|
-
}, emit: function(e, f) {
|
|
9
|
-
var i = t.get(e);
|
|
10
|
-
i && i.slice().map(function(a) {
|
|
11
|
-
a(f);
|
|
12
|
-
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
-
a(e, f);
|
|
14
|
-
});
|
|
15
|
-
} };
|
|
16
|
-
}
|
|
1
|
+
import f from "./vue-components.es6.js";
|
|
17
2
|
export {
|
|
18
|
-
|
|
3
|
+
f as default
|
|
19
4
|
};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
function p(t) {
|
|
3
|
-
let n;
|
|
4
|
-
e(() => {
|
|
5
|
-
const o = t();
|
|
6
|
-
o && (n = o);
|
|
7
|
-
}), u(() => {
|
|
8
|
-
n && n();
|
|
9
|
-
});
|
|
10
|
-
}
|
|
1
|
+
import f from "./vue-components.es7.js";
|
|
11
2
|
export {
|
|
12
|
-
|
|
3
|
+
f as default
|
|
13
4
|
};
|
|
@@ -1,138 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getInputType as q } from "./vue-components.es10.js";
|
|
3
|
-
const U = /* @__PURE__ */ b({
|
|
4
|
-
inheritAttrs: !1,
|
|
5
|
-
__name: "OmegaInputVuetify",
|
|
6
|
-
props: {
|
|
7
|
-
inputProps: {},
|
|
8
|
-
field: {},
|
|
9
|
-
state: {}
|
|
10
|
-
},
|
|
11
|
-
emits: ["focus", "blur"],
|
|
12
|
-
setup(e) {
|
|
13
|
-
return (r, l) => {
|
|
14
|
-
const s = o("v-text-field"), P = o("v-textarea"), g = o("v-radio"), v = o("v-radio-group"), p = o("v-select"), y = o("v-autocomplete");
|
|
15
|
-
return n(), m("div", {
|
|
16
|
-
class: "omega-input",
|
|
17
|
-
onFocusout: l[4] || (l[4] = (t) => r.$emit("blur", t)),
|
|
18
|
-
onFocusin: l[5] || (l[5] = (t) => r.$emit("focus", t))
|
|
19
|
-
}, [
|
|
20
|
-
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (n(), a(d(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), u({
|
|
21
|
-
key: 0,
|
|
22
|
-
id: e.inputProps.id,
|
|
23
|
-
name: e.field.name,
|
|
24
|
-
label: e.inputProps.label,
|
|
25
|
-
"error-messages": e.inputProps.errorMessages,
|
|
26
|
-
error: e.inputProps.error,
|
|
27
|
-
ripple: ""
|
|
28
|
-
}, r.$attrs, {
|
|
29
|
-
"model-value": e.state.value,
|
|
30
|
-
onChange: l[0] || (l[0] = (t) => e.field.handleChange(t.target.checked))
|
|
31
|
-
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : i("", !0),
|
|
32
|
-
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (n(), a(s, u({
|
|
33
|
-
key: 1,
|
|
34
|
-
id: e.inputProps.id,
|
|
35
|
-
required: e.inputProps.required,
|
|
36
|
-
"min-length": e.inputProps.minLength,
|
|
37
|
-
"max-length": e.inputProps.maxLength,
|
|
38
|
-
type: f(q)(e.inputProps.type),
|
|
39
|
-
name: e.field.name,
|
|
40
|
-
label: e.inputProps.label,
|
|
41
|
-
"error-messages": e.inputProps.errorMessages,
|
|
42
|
-
error: e.inputProps.error
|
|
43
|
-
}, r.$attrs, {
|
|
44
|
-
"model-value": e.state.value,
|
|
45
|
-
"onUpdate:modelValue": e.field.handleChange
|
|
46
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
47
|
-
e.inputProps.type === "text" ? (n(), a(P, u({
|
|
48
|
-
key: 2,
|
|
49
|
-
id: e.inputProps.id,
|
|
50
|
-
required: e.inputProps.required,
|
|
51
|
-
"min-length": e.inputProps.minLength,
|
|
52
|
-
"max-length": e.inputProps.maxLength,
|
|
53
|
-
name: e.field.name,
|
|
54
|
-
label: e.inputProps.label,
|
|
55
|
-
"error-messages": e.inputProps.errorMessages,
|
|
56
|
-
error: e.inputProps.error
|
|
57
|
-
}, r.$attrs, {
|
|
58
|
-
"model-value": e.state.value,
|
|
59
|
-
"onUpdate:modelValue": e.field.handleChange
|
|
60
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
61
|
-
e.inputProps.type === "number" || e.inputProps.type === "range" ? (n(), a(d(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), u({
|
|
62
|
-
key: 3,
|
|
63
|
-
id: e.inputProps.id,
|
|
64
|
-
required: e.inputProps.required,
|
|
65
|
-
min: e.inputProps.min,
|
|
66
|
-
max: e.inputProps.max,
|
|
67
|
-
type: e.inputProps.type,
|
|
68
|
-
name: e.field.name,
|
|
69
|
-
label: e.inputProps.label,
|
|
70
|
-
"error-messages": e.inputProps.errorMessages,
|
|
71
|
-
error: e.inputProps.error
|
|
72
|
-
}, r.$attrs, {
|
|
73
|
-
"model-value": e.state.value,
|
|
74
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) => {
|
|
75
|
-
t || t === 0 ? e.field.handleChange(Number(t)) : e.field.handleChange(void 0);
|
|
76
|
-
})
|
|
77
|
-
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : i("", !0),
|
|
78
|
-
e.inputProps.type === "radio" ? (n(), a(v, u({
|
|
79
|
-
key: 4,
|
|
80
|
-
id: e.inputProps.id,
|
|
81
|
-
name: e.field.name,
|
|
82
|
-
label: e.inputProps.label,
|
|
83
|
-
"error-messages": e.inputProps.errorMessages,
|
|
84
|
-
error: e.inputProps.error
|
|
85
|
-
}, r.$attrs, {
|
|
86
|
-
"model-value": e.state.value,
|
|
87
|
-
"onUpdate:modelValue": e.field.handleChange
|
|
88
|
-
}), {
|
|
89
|
-
default: h(() => [
|
|
90
|
-
(n(!0), m(c, null, C(e.inputProps.options, (t) => (n(), a(g, {
|
|
91
|
-
key: t.value,
|
|
92
|
-
label: t.title,
|
|
93
|
-
value: t.value
|
|
94
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
98
|
-
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (n(), a(p, u({
|
|
99
|
-
key: 5,
|
|
100
|
-
id: e.inputProps.id,
|
|
101
|
-
clearable: e.inputProps.type === "select",
|
|
102
|
-
required: e.inputProps.required,
|
|
103
|
-
multiple: e.inputProps.type === "multiple",
|
|
104
|
-
chips: e.inputProps.type === "multiple",
|
|
105
|
-
name: e.field.name,
|
|
106
|
-
label: e.inputProps.label,
|
|
107
|
-
items: e.inputProps.options,
|
|
108
|
-
"error-messages": e.inputProps.errorMessages,
|
|
109
|
-
error: e.inputProps.error
|
|
110
|
-
}, r.$attrs, {
|
|
111
|
-
"model-value": e.state.value,
|
|
112
|
-
onClear: l[2] || (l[2] = (t) => e.field.handleChange(void 0)),
|
|
113
|
-
"onUpdate:modelValue": e.field.handleChange
|
|
114
|
-
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
115
|
-
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (n(), a(y, u({
|
|
116
|
-
key: 6,
|
|
117
|
-
id: e.inputProps.id,
|
|
118
|
-
clearable: e.inputProps.type === "autocomplete",
|
|
119
|
-
multiple: e.inputProps.type === "autocompletemultiple",
|
|
120
|
-
required: e.inputProps.required,
|
|
121
|
-
name: e.field.name,
|
|
122
|
-
label: e.inputProps.label,
|
|
123
|
-
items: e.inputProps.options,
|
|
124
|
-
"error-messages": e.inputProps.errorMessages,
|
|
125
|
-
error: e.inputProps.error,
|
|
126
|
-
chips: e.inputProps.type === "autocompletemultiple"
|
|
127
|
-
}, r.$attrs, {
|
|
128
|
-
"model-value": e.state.value,
|
|
129
|
-
onClear: l[3] || (l[3] = (t) => e.field.handleChange(void 0)),
|
|
130
|
-
"onUpdate:modelValue": e.field.handleChange
|
|
131
|
-
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : i("", !0)
|
|
132
|
-
], 32);
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
});
|
|
1
|
+
import f from "./vue-components.es8.js";
|
|
136
2
|
export {
|
|
137
|
-
|
|
3
|
+
f as default
|
|
138
4
|
};
|
|
@@ -1,44 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
function c(t) {
|
|
2
|
+
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
|
|
3
|
+
var i = t.get(e);
|
|
4
|
+
i ? i.push(f) : t.set(e, [f]);
|
|
5
|
+
}, off: function(e, f) {
|
|
6
|
+
var i = t.get(e);
|
|
7
|
+
i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
|
|
8
|
+
}, emit: function(e, f) {
|
|
9
|
+
var i = t.get(e);
|
|
10
|
+
i && i.slice().map(function(a) {
|
|
11
|
+
a(f);
|
|
12
|
+
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
+
a(e, f);
|
|
14
|
+
});
|
|
15
|
+
} };
|
|
16
|
+
}
|
|
41
17
|
export {
|
|
42
|
-
|
|
43
|
-
f as isFunction
|
|
18
|
+
c as default
|
|
44
19
|
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { onMounted as e, onUnmounted as u } from "vue";
|
|
2
|
+
function p(t) {
|
|
3
|
+
let n;
|
|
4
|
+
e(() => {
|
|
5
|
+
const o = t();
|
|
6
|
+
o && (n = o);
|
|
7
|
+
}), u(() => {
|
|
8
|
+
n && n();
|
|
9
|
+
});
|
|
10
|
+
}
|
|
2
11
|
export {
|
|
3
|
-
|
|
12
|
+
p as onMountedWithCleanup
|
|
4
13
|
};
|
|
@@ -1,4 +1,138 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as b, resolveComponent as o, createElementBlock as m, openBlock as n, createBlock as a, createCommentVNode as i, resolveDynamicComponent as d, mergeProps as u, unref as f, withCtx as h, Fragment as c, renderList as C } from "vue";
|
|
2
|
+
import { getInputType as q } from "./vue-components.es12.js";
|
|
3
|
+
const U = /* @__PURE__ */ b({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "OmegaInputVuetify",
|
|
6
|
+
props: {
|
|
7
|
+
inputProps: {},
|
|
8
|
+
field: {},
|
|
9
|
+
state: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["focus", "blur"],
|
|
12
|
+
setup(e) {
|
|
13
|
+
return (r, l) => {
|
|
14
|
+
const s = o("v-text-field"), P = o("v-textarea"), g = o("v-radio"), v = o("v-radio-group"), p = o("v-select"), y = o("v-autocomplete");
|
|
15
|
+
return n(), m("div", {
|
|
16
|
+
class: "omega-input",
|
|
17
|
+
onFocusout: l[4] || (l[4] = (t) => r.$emit("blur", t)),
|
|
18
|
+
onFocusin: l[5] || (l[5] = (t) => r.$emit("focus", t))
|
|
19
|
+
}, [
|
|
20
|
+
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (n(), a(d(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), u({
|
|
21
|
+
key: 0,
|
|
22
|
+
id: e.inputProps.id,
|
|
23
|
+
name: e.field.name,
|
|
24
|
+
label: e.inputProps.label,
|
|
25
|
+
"error-messages": e.inputProps.errorMessages,
|
|
26
|
+
error: e.inputProps.error,
|
|
27
|
+
ripple: ""
|
|
28
|
+
}, r.$attrs, {
|
|
29
|
+
"model-value": e.state.value,
|
|
30
|
+
onChange: l[0] || (l[0] = (t) => e.field.handleChange(t.target.checked))
|
|
31
|
+
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : i("", !0),
|
|
32
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (n(), a(s, u({
|
|
33
|
+
key: 1,
|
|
34
|
+
id: e.inputProps.id,
|
|
35
|
+
required: e.inputProps.required,
|
|
36
|
+
"min-length": e.inputProps.minLength,
|
|
37
|
+
"max-length": e.inputProps.maxLength,
|
|
38
|
+
type: f(q)(e.inputProps.type),
|
|
39
|
+
name: e.field.name,
|
|
40
|
+
label: e.inputProps.label,
|
|
41
|
+
"error-messages": e.inputProps.errorMessages,
|
|
42
|
+
error: e.inputProps.error
|
|
43
|
+
}, r.$attrs, {
|
|
44
|
+
"model-value": e.state.value,
|
|
45
|
+
"onUpdate:modelValue": e.field.handleChange
|
|
46
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
47
|
+
e.inputProps.type === "text" ? (n(), a(P, u({
|
|
48
|
+
key: 2,
|
|
49
|
+
id: e.inputProps.id,
|
|
50
|
+
required: e.inputProps.required,
|
|
51
|
+
"min-length": e.inputProps.minLength,
|
|
52
|
+
"max-length": e.inputProps.maxLength,
|
|
53
|
+
name: e.field.name,
|
|
54
|
+
label: e.inputProps.label,
|
|
55
|
+
"error-messages": e.inputProps.errorMessages,
|
|
56
|
+
error: e.inputProps.error
|
|
57
|
+
}, r.$attrs, {
|
|
58
|
+
"model-value": e.state.value,
|
|
59
|
+
"onUpdate:modelValue": e.field.handleChange
|
|
60
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
61
|
+
e.inputProps.type === "number" || e.inputProps.type === "range" ? (n(), a(d(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), u({
|
|
62
|
+
key: 3,
|
|
63
|
+
id: e.inputProps.id,
|
|
64
|
+
required: e.inputProps.required,
|
|
65
|
+
min: e.inputProps.min,
|
|
66
|
+
max: e.inputProps.max,
|
|
67
|
+
type: e.inputProps.type,
|
|
68
|
+
name: e.field.name,
|
|
69
|
+
label: e.inputProps.label,
|
|
70
|
+
"error-messages": e.inputProps.errorMessages,
|
|
71
|
+
error: e.inputProps.error
|
|
72
|
+
}, r.$attrs, {
|
|
73
|
+
"model-value": e.state.value,
|
|
74
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => {
|
|
75
|
+
t || t === 0 ? e.field.handleChange(Number(t)) : e.field.handleChange(void 0);
|
|
76
|
+
})
|
|
77
|
+
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : i("", !0),
|
|
78
|
+
e.inputProps.type === "radio" ? (n(), a(v, u({
|
|
79
|
+
key: 4,
|
|
80
|
+
id: e.inputProps.id,
|
|
81
|
+
name: e.field.name,
|
|
82
|
+
label: e.inputProps.label,
|
|
83
|
+
"error-messages": e.inputProps.errorMessages,
|
|
84
|
+
error: e.inputProps.error
|
|
85
|
+
}, r.$attrs, {
|
|
86
|
+
"model-value": e.state.value,
|
|
87
|
+
"onUpdate:modelValue": e.field.handleChange
|
|
88
|
+
}), {
|
|
89
|
+
default: h(() => [
|
|
90
|
+
(n(!0), m(c, null, C(e.inputProps.options, (t) => (n(), a(g, {
|
|
91
|
+
key: t.value,
|
|
92
|
+
label: t.title,
|
|
93
|
+
value: t.value
|
|
94
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
98
|
+
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (n(), a(p, u({
|
|
99
|
+
key: 5,
|
|
100
|
+
id: e.inputProps.id,
|
|
101
|
+
clearable: e.inputProps.type === "select",
|
|
102
|
+
required: e.inputProps.required,
|
|
103
|
+
multiple: e.inputProps.type === "multiple",
|
|
104
|
+
chips: e.inputProps.type === "multiple",
|
|
105
|
+
name: e.field.name,
|
|
106
|
+
label: e.inputProps.label,
|
|
107
|
+
items: e.inputProps.options,
|
|
108
|
+
"error-messages": e.inputProps.errorMessages,
|
|
109
|
+
error: e.inputProps.error
|
|
110
|
+
}, r.$attrs, {
|
|
111
|
+
"model-value": e.state.value,
|
|
112
|
+
onClear: l[2] || (l[2] = (t) => e.field.handleChange(void 0)),
|
|
113
|
+
"onUpdate:modelValue": e.field.handleChange
|
|
114
|
+
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : i("", !0),
|
|
115
|
+
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (n(), a(y, u({
|
|
116
|
+
key: 6,
|
|
117
|
+
id: e.inputProps.id,
|
|
118
|
+
clearable: e.inputProps.type === "autocomplete",
|
|
119
|
+
multiple: e.inputProps.type === "autocompletemultiple",
|
|
120
|
+
required: e.inputProps.required,
|
|
121
|
+
name: e.field.name,
|
|
122
|
+
label: e.inputProps.label,
|
|
123
|
+
items: e.inputProps.options,
|
|
124
|
+
"error-messages": e.inputProps.errorMessages,
|
|
125
|
+
error: e.inputProps.error,
|
|
126
|
+
chips: e.inputProps.type === "autocompletemultiple"
|
|
127
|
+
}, r.$attrs, {
|
|
128
|
+
"model-value": e.state.value,
|
|
129
|
+
onClear: l[3] || (l[3] = (t) => e.field.handleChange(void 0)),
|
|
130
|
+
"onUpdate:modelValue": e.field.handleChange
|
|
131
|
+
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : i("", !0)
|
|
132
|
+
], 32);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
2
136
|
export {
|
|
3
|
-
|
|
137
|
+
U as default
|
|
4
138
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
a as dual,
|
|
43
|
+
f as isFunction
|
|
44
|
+
};
|