@effect-app/vue-components 0.6.3 → 0.7.1
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/OmegaArray.vue.d.ts +24 -0
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +15 -1
- package/dist/types/components/OmegaForm/index.d.ts +2 -1
- package/dist/vue-components.es.js +22 -19
- package/dist/vue-components.es10.js +5 -5
- package/dist/vue-components.es11.js +6 -108
- package/dist/vue-components.es12.js +110 -0
- package/dist/vue-components.es14.js +7 -2
- package/dist/vue-components.es15.js +2 -88
- package/dist/vue-components.es16.js +90 -0
- package/dist/vue-components.es18.js +2 -5
- package/dist/vue-components.es19.js +2 -32
- package/dist/vue-components.es2.js +14 -11
- package/dist/vue-components.es20.js +5 -2
- package/dist/vue-components.es21.js +32 -2
- package/dist/vue-components.es23.js +2 -2
- package/dist/vue-components.es24.js +2 -2
- package/dist/vue-components.es25.js +2 -115
- package/dist/vue-components.es26.js +4 -0
- package/dist/vue-components.es27.js +115 -4
- package/dist/vue-components.es29.js +6 -0
- package/dist/vue-components.es4.js +22 -18
- package/dist/vue-components.es6.js +50 -36
- package/dist/vue-components.es7.js +34 -131
- package/dist/vue-components.es8.js +128 -211
- package/dist/vue-components.es9.js +218 -6
- package/package.json +3 -3
- package/src/components/OmegaForm/OmegaArray.vue +67 -0
- package/src/components/OmegaForm/OmegaErrors.vue +7 -3
- package/src/components/OmegaForm/OmegaFormInput.vue +6 -2
- package/src/components/OmegaForm/OmegaFormStuff.ts +4 -1
- package/src/components/OmegaForm/OmegaInput.vue +11 -1
- package/src/components/OmegaForm/index.ts +2 -1
- package/dist/vue-components.es13.js +0 -9
- package/dist/vue-components.es17.js +0 -4
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { default as t } from "./vue-components.
|
|
1
|
+
import { default as t } from "./vue-components.es10.js";
|
|
2
2
|
import { default as m } from "./vue-components.es4.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as p } from "./vue-components.es11.js";
|
|
4
4
|
import { default as l } from "./vue-components.es5.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
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";
|
|
8
9
|
export {
|
|
10
|
+
g as OmegaArray,
|
|
9
11
|
l as OmegaAutoGen,
|
|
10
|
-
|
|
12
|
+
p as OmegaErrors,
|
|
11
13
|
e as OmegaErrorsContext,
|
|
12
14
|
t as OmegaForm,
|
|
13
15
|
m as OmegaInput,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
F as
|
|
16
|
+
s as createMeta,
|
|
17
|
+
x as duplicateSchema,
|
|
18
|
+
O as generateInputStandardSchemaFromFieldMeta,
|
|
19
|
+
c as generateMetaFromSchema,
|
|
20
|
+
F as nullableInput,
|
|
21
|
+
h as useOmegaForm
|
|
19
22
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { isFunction as c } from "./vue-components.es24.js";
|
|
2
|
+
const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
s as isFunction,
|
|
5
|
+
i as isObject,
|
|
6
|
+
t as isRecordOrArray
|
|
4
7
|
};
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
import f from "
|
|
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
|
+
});
|
|
2
32
|
export {
|
|
3
|
-
|
|
33
|
+
w as default
|
|
4
34
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const a=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(a&&a.call(this),this.shadowRoot){const i=document.createElement("style");i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(i)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
import { defineComponent as B, getCurrentInstance as L, useId as P, computed as n, watch as w, nextTick as S, onMounted as x, ref as T, watchEffect as z, renderSlot as A, normalizeProps as D, guardReactiveProps as F, createElementVNode as M, normalizeClass as N, createBlock as R, createCommentVNode as U, unref as j, openBlock as G, mergeProps as H } from "vue";
|
|
3
3
|
import { useStore as J } from "@tanstack/vue-form";
|
|
4
|
-
import { useOmegaErrors as K } from "./vue-components.
|
|
5
|
-
import Q from "./vue-components.
|
|
4
|
+
import { useOmegaErrors as K } from "./vue-components.es7.js";
|
|
5
|
+
import Q from "./vue-components.es27.js";
|
|
6
6
|
|
|
7
7
|
const te = /* @__PURE__ */ B({
|
|
8
8
|
inheritAttrs: !1,
|
|
@@ -1,117 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
const b = /* @__PURE__ */ d({
|
|
3
|
-
inheritAttrs: !1,
|
|
4
|
-
__name: "OmegaInputVuetify",
|
|
5
|
-
props: {
|
|
6
|
-
inputProps: {},
|
|
7
|
-
vuetifyValue: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["focus", "blur"],
|
|
10
|
-
setup(y) {
|
|
11
|
-
return (e, r) => {
|
|
12
|
-
const u = s("v-text-field"), a = s("v-textarea"), t = s("v-select"), m = s("v-autocomplete");
|
|
13
|
-
return o(), P("div", {
|
|
14
|
-
class: "omega-input",
|
|
15
|
-
onFocusout: r[4] || (r[4] = (p) => e.$emit("blur", p)),
|
|
16
|
-
onFocusin: r[5] || (r[5] = (p) => e.$emit("focus", p))
|
|
17
|
-
}, [
|
|
18
|
-
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(g(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
|
|
19
|
-
key: 0,
|
|
20
|
-
id: e.inputProps.id,
|
|
21
|
-
name: e.inputProps.name,
|
|
22
|
-
label: e.inputProps.label,
|
|
23
|
-
"error-messages": e.inputProps.errorMessages,
|
|
24
|
-
error: e.inputProps.error,
|
|
25
|
-
ripple: ""
|
|
26
|
-
}, e.$attrs, {
|
|
27
|
-
"model-value": e.vuetifyValue,
|
|
28
|
-
onChange: r[0] || (r[0] = (p) => e.inputProps.field.handleChange(p.target.checked))
|
|
29
|
-
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
30
|
-
e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(u, i({
|
|
31
|
-
key: 1,
|
|
32
|
-
id: e.inputProps.id,
|
|
33
|
-
required: e.inputProps.required,
|
|
34
|
-
"min-length": e.inputProps.minLength,
|
|
35
|
-
"max-length": e.inputProps.maxLength,
|
|
36
|
-
type: e.inputProps.type,
|
|
37
|
-
name: e.inputProps.name,
|
|
38
|
-
label: e.inputProps.label,
|
|
39
|
-
"error-messages": e.inputProps.errorMessages,
|
|
40
|
-
error: e.inputProps.error
|
|
41
|
-
}, e.$attrs, {
|
|
42
|
-
"model-value": e.vuetifyValue,
|
|
43
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
44
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
45
|
-
e.inputProps.type === "text" ? (o(), n(a, i({
|
|
46
|
-
key: 2,
|
|
47
|
-
id: e.inputProps.id,
|
|
48
|
-
required: e.inputProps.required,
|
|
49
|
-
"min-length": e.inputProps.minLength,
|
|
50
|
-
"max-length": e.inputProps.maxLength,
|
|
51
|
-
type: e.inputProps.type,
|
|
52
|
-
name: e.inputProps.name,
|
|
53
|
-
label: e.inputProps.label,
|
|
54
|
-
"error-messages": e.inputProps.errorMessages,
|
|
55
|
-
error: e.inputProps.error
|
|
56
|
-
}, e.$attrs, {
|
|
57
|
-
"model-value": e.vuetifyValue,
|
|
58
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
59
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
60
|
-
e.inputProps.type === "number" ? (o(), n(u, i({
|
|
61
|
-
key: 3,
|
|
62
|
-
id: e.inputProps.id,
|
|
63
|
-
required: e.inputProps.required,
|
|
64
|
-
min: e.inputProps.min,
|
|
65
|
-
max: e.inputProps.max,
|
|
66
|
-
type: e.inputProps.type,
|
|
67
|
-
name: e.inputProps.name,
|
|
68
|
-
label: e.inputProps.label,
|
|
69
|
-
"error-messages": e.inputProps.errorMessages,
|
|
70
|
-
error: e.inputProps.error
|
|
71
|
-
}, e.$attrs, {
|
|
72
|
-
"model-value": e.vuetifyValue,
|
|
73
|
-
"onUpdate:modelValue": r[1] || (r[1] = (p) => {
|
|
74
|
-
e.inputProps.field.handleChange(Number(p));
|
|
75
|
-
})
|
|
76
|
-
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
77
|
-
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(t, i({
|
|
78
|
-
key: 4,
|
|
79
|
-
id: e.inputProps.id,
|
|
80
|
-
clearable: e.inputProps.type === "select",
|
|
81
|
-
required: e.inputProps.required,
|
|
82
|
-
multiple: e.inputProps.type === "multiple",
|
|
83
|
-
chips: e.inputProps.type === "multiple",
|
|
84
|
-
name: e.inputProps.name,
|
|
85
|
-
label: e.inputProps.label,
|
|
86
|
-
items: e.inputProps.options,
|
|
87
|
-
"error-messages": e.inputProps.errorMessages,
|
|
88
|
-
error: e.inputProps.error
|
|
89
|
-
}, e.$attrs, {
|
|
90
|
-
"model-value": e.vuetifyValue,
|
|
91
|
-
onClear: r[2] || (r[2] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
92
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
93
|
-
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
94
|
-
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(m, i({
|
|
95
|
-
key: 5,
|
|
96
|
-
id: e.inputProps.id,
|
|
97
|
-
clearable: e.inputProps.type === "autocomplete",
|
|
98
|
-
multiple: e.inputProps.type === "autocompletemultiple",
|
|
99
|
-
required: e.inputProps.required,
|
|
100
|
-
name: e.inputProps.name,
|
|
101
|
-
label: e.inputProps.label,
|
|
102
|
-
items: e.inputProps.options,
|
|
103
|
-
"error-messages": e.inputProps.errorMessages,
|
|
104
|
-
error: e.inputProps.error,
|
|
105
|
-
chips: e.inputProps.type === "autocompletemultiple"
|
|
106
|
-
}, e.$attrs, {
|
|
107
|
-
"model-value": e.vuetifyValue,
|
|
108
|
-
onClear: r[3] || (r[3] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
109
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
110
|
-
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : l("", !0)
|
|
111
|
-
], 32);
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
});
|
|
1
|
+
import f from "./vue-components.es21.js";
|
|
115
2
|
export {
|
|
116
|
-
|
|
3
|
+
f as default
|
|
117
4
|
};
|
|
@@ -1,6 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { defineComponent as d, resolveComponent as s, createElementBlock as P, openBlock as o, createBlock as n, createCommentVNode as l, resolveDynamicComponent as g, mergeProps as i } from "vue";
|
|
2
|
+
const b = /* @__PURE__ */ d({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "OmegaInputVuetify",
|
|
5
|
+
props: {
|
|
6
|
+
inputProps: {},
|
|
7
|
+
vuetifyValue: {}
|
|
8
|
+
},
|
|
9
|
+
emits: ["focus", "blur"],
|
|
10
|
+
setup(y) {
|
|
11
|
+
return (e, r) => {
|
|
12
|
+
const u = s("v-text-field"), a = s("v-textarea"), t = s("v-select"), m = s("v-autocomplete");
|
|
13
|
+
return o(), P("div", {
|
|
14
|
+
class: "omega-input",
|
|
15
|
+
onFocusout: r[4] || (r[4] = (p) => e.$emit("blur", p)),
|
|
16
|
+
onFocusin: r[5] || (r[5] = (p) => e.$emit("focus", p))
|
|
17
|
+
}, [
|
|
18
|
+
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(g(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
|
|
19
|
+
key: 0,
|
|
20
|
+
id: e.inputProps.id,
|
|
21
|
+
name: e.inputProps.name,
|
|
22
|
+
label: e.inputProps.label,
|
|
23
|
+
"error-messages": e.inputProps.errorMessages,
|
|
24
|
+
error: e.inputProps.error,
|
|
25
|
+
ripple: ""
|
|
26
|
+
}, e.$attrs, {
|
|
27
|
+
"model-value": e.vuetifyValue,
|
|
28
|
+
onChange: r[0] || (r[0] = (p) => e.inputProps.field.handleChange(p.target.checked))
|
|
29
|
+
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
30
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(u, i({
|
|
31
|
+
key: 1,
|
|
32
|
+
id: e.inputProps.id,
|
|
33
|
+
required: e.inputProps.required,
|
|
34
|
+
"min-length": e.inputProps.minLength,
|
|
35
|
+
"max-length": e.inputProps.maxLength,
|
|
36
|
+
type: e.inputProps.type,
|
|
37
|
+
name: e.inputProps.name,
|
|
38
|
+
label: e.inputProps.label,
|
|
39
|
+
"error-messages": e.inputProps.errorMessages,
|
|
40
|
+
error: e.inputProps.error
|
|
41
|
+
}, e.$attrs, {
|
|
42
|
+
"model-value": e.vuetifyValue,
|
|
43
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
44
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
45
|
+
e.inputProps.type === "text" ? (o(), n(a, i({
|
|
46
|
+
key: 2,
|
|
47
|
+
id: e.inputProps.id,
|
|
48
|
+
required: e.inputProps.required,
|
|
49
|
+
"min-length": e.inputProps.minLength,
|
|
50
|
+
"max-length": e.inputProps.maxLength,
|
|
51
|
+
type: e.inputProps.type,
|
|
52
|
+
name: e.inputProps.name,
|
|
53
|
+
label: e.inputProps.label,
|
|
54
|
+
"error-messages": e.inputProps.errorMessages,
|
|
55
|
+
error: e.inputProps.error
|
|
56
|
+
}, e.$attrs, {
|
|
57
|
+
"model-value": e.vuetifyValue,
|
|
58
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
59
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
60
|
+
e.inputProps.type === "number" ? (o(), n(u, i({
|
|
61
|
+
key: 3,
|
|
62
|
+
id: e.inputProps.id,
|
|
63
|
+
required: e.inputProps.required,
|
|
64
|
+
min: e.inputProps.min,
|
|
65
|
+
max: e.inputProps.max,
|
|
66
|
+
type: e.inputProps.type,
|
|
67
|
+
name: e.inputProps.name,
|
|
68
|
+
label: e.inputProps.label,
|
|
69
|
+
"error-messages": e.inputProps.errorMessages,
|
|
70
|
+
error: e.inputProps.error
|
|
71
|
+
}, e.$attrs, {
|
|
72
|
+
"model-value": e.vuetifyValue,
|
|
73
|
+
"onUpdate:modelValue": r[1] || (r[1] = (p) => {
|
|
74
|
+
e.inputProps.field.handleChange(Number(p));
|
|
75
|
+
})
|
|
76
|
+
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
77
|
+
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(t, i({
|
|
78
|
+
key: 4,
|
|
79
|
+
id: e.inputProps.id,
|
|
80
|
+
clearable: e.inputProps.type === "select",
|
|
81
|
+
required: e.inputProps.required,
|
|
82
|
+
multiple: e.inputProps.type === "multiple",
|
|
83
|
+
chips: e.inputProps.type === "multiple",
|
|
84
|
+
name: e.inputProps.name,
|
|
85
|
+
label: e.inputProps.label,
|
|
86
|
+
items: e.inputProps.options,
|
|
87
|
+
"error-messages": e.inputProps.errorMessages,
|
|
88
|
+
error: e.inputProps.error
|
|
89
|
+
}, e.$attrs, {
|
|
90
|
+
"model-value": e.vuetifyValue,
|
|
91
|
+
onClear: r[2] || (r[2] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
92
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
93
|
+
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
94
|
+
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(m, i({
|
|
95
|
+
key: 5,
|
|
96
|
+
id: e.inputProps.id,
|
|
97
|
+
clearable: e.inputProps.type === "autocomplete",
|
|
98
|
+
multiple: e.inputProps.type === "autocompletemultiple",
|
|
99
|
+
required: e.inputProps.required,
|
|
100
|
+
name: e.inputProps.name,
|
|
101
|
+
label: e.inputProps.label,
|
|
102
|
+
items: e.inputProps.options,
|
|
103
|
+
"error-messages": e.inputProps.errorMessages,
|
|
104
|
+
error: e.inputProps.error,
|
|
105
|
+
chips: e.inputProps.type === "autocompletemultiple"
|
|
106
|
+
}, e.$attrs, {
|
|
107
|
+
"model-value": e.vuetifyValue,
|
|
108
|
+
onClear: r[3] || (r[3] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
109
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
110
|
+
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : l("", !0)
|
|
111
|
+
], 32);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
4
115
|
export {
|
|
5
|
-
|
|
116
|
+
b as default
|
|
6
117
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const a=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(a&&a.call(this),this.shadowRoot){const i=document.createElement("style");i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(i)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es27.js";
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
o as default
|
|
6
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { generateInputStandardSchemaFromFieldMeta as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as f, computed as r, createBlock as n, openBlock as l, resolveDynamicComponent as v, withCtx as m, createCommentVNode as c, mergeProps as h, renderSlot as y, normalizeProps as g, guardReactiveProps as C } from "vue";
|
|
2
|
+
import { generateInputStandardSchemaFromFieldMeta as b } from "./vue-components.es9.js";
|
|
3
|
+
import k from "./vue-components.es23.js";
|
|
4
|
+
const $ = /* @__PURE__ */ d({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "OmegaInput",
|
|
7
7
|
props: {
|
|
@@ -12,37 +12,41 @@ const S = /* @__PURE__ */ i({
|
|
|
12
12
|
options: {},
|
|
13
13
|
type: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
setup(s) {
|
|
16
|
+
const t = s, a = f(
|
|
17
|
+
"getMetaFromArray",
|
|
18
|
+
null
|
|
19
|
+
), o = r(() => a != null && a.value && a.value(t.name) ? a.value(t.name) : t.form.meta[t.name]), i = r(() => {
|
|
20
|
+
if (!o.value)
|
|
18
21
|
throw new Error("Meta is undefined");
|
|
19
|
-
return
|
|
22
|
+
return b(o.value);
|
|
20
23
|
});
|
|
21
|
-
return (e,
|
|
24
|
+
return (e, w) => (l(), n(v(e.form.Field), {
|
|
22
25
|
name: e.name,
|
|
23
26
|
validators: {
|
|
24
|
-
onChange:
|
|
27
|
+
onChange: i.value,
|
|
25
28
|
...e.validators
|
|
26
29
|
}
|
|
27
30
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
default: m(({ field: p }) => [
|
|
32
|
+
o.value ? (l(), n(k, h({
|
|
33
|
+
key: 0,
|
|
34
|
+
field: p,
|
|
31
35
|
label: e.label,
|
|
32
36
|
options: e.options,
|
|
33
|
-
meta:
|
|
37
|
+
meta: o.value,
|
|
34
38
|
type: e.type
|
|
35
39
|
}, e.$attrs), {
|
|
36
|
-
default:
|
|
37
|
-
|
|
40
|
+
default: m((u) => [
|
|
41
|
+
y(e.$slots, "default", g(C(u)))
|
|
38
42
|
]),
|
|
39
43
|
_: 2
|
|
40
|
-
}, 1040, ["field", "label", "options", "meta", "type"])
|
|
44
|
+
}, 1040, ["field", "label", "options", "meta", "type"])) : c("", !0)
|
|
41
45
|
]),
|
|
42
46
|
_: 3
|
|
43
47
|
}, 8, ["name", "validators"]));
|
|
44
48
|
}
|
|
45
49
|
});
|
|
46
50
|
export {
|
|
47
|
-
|
|
51
|
+
$ as default
|
|
48
52
|
};
|
|
@@ -1,38 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
1
|
+
import { defineComponent as c, computed as g, provide as M, createBlock as m, openBlock as s, resolveDynamicComponent as u, withCtx as i, createElementBlock as _, renderSlot as l, Fragment as h, renderList as k, mergeProps as v, normalizeProps as F, guardReactiveProps as S } from "vue";
|
|
2
|
+
import { createMeta as A } from "./vue-components.es9.js";
|
|
3
|
+
const C = /* @__PURE__ */ c({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "OmegaArray",
|
|
6
|
+
props: {
|
|
7
|
+
form: {},
|
|
8
|
+
name: {}
|
|
9
|
+
},
|
|
10
|
+
setup(f) {
|
|
11
|
+
const p = f, d = g(() => {
|
|
12
|
+
const e = p.form.meta[p.name];
|
|
13
|
+
if (e && e.type === "multiple") {
|
|
14
|
+
const n = e.rest.reduce(
|
|
15
|
+
(t, r) => (r.type._tag === "TypeLiteral" && t.propertySignatures.push(...r.type.propertySignatures), t),
|
|
16
|
+
{
|
|
17
|
+
propertySignatures: []
|
|
18
|
+
}
|
|
19
|
+
), a = A(n);
|
|
20
|
+
return (t) => {
|
|
21
|
+
const r = t.split("]."), o = r[r.length - 1];
|
|
22
|
+
return a[o];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return (n) => {
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
return M("getMetaFromArray", d), (e, n) => (s(), m(u(e.form.Field), { name: e.name }, {
|
|
29
|
+
default: i(({ field: a }) => [
|
|
30
|
+
(s(!0), _(h, null, k(a.state.value, (y, t) => (s(), m(u(e.form.Field), {
|
|
31
|
+
key: t,
|
|
32
|
+
name: `${e.name}[${t}]`
|
|
33
|
+
}, {
|
|
34
|
+
default: i(({ field: r, state: o }) => [
|
|
35
|
+
l(e.$slots, "default", v({ ref_for: !0 }, {
|
|
36
|
+
field: a,
|
|
37
|
+
subField: r,
|
|
38
|
+
subState: o,
|
|
39
|
+
index: t
|
|
40
|
+
}))
|
|
41
|
+
]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1032, ["name"]))), 128)),
|
|
44
|
+
l(e.$slots, "field", F(S({ field: a })))
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 8, ["name"]));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
34
50
|
export {
|
|
35
|
-
|
|
36
|
-
h as provideOmegaErrors,
|
|
37
|
-
w as useOmegaErrors
|
|
51
|
+
C as default
|
|
38
52
|
};
|