@effect-app/vue-components 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, resolveComponent as i, createElementBlock as g, openBlock as o, createBlock as n, createCommentVNode as
|
|
1
|
+
import { defineComponent as P, resolveComponent as i, createElementBlock as g, openBlock as o, createBlock as n, createCommentVNode as l, mergeProps as s } from "vue";
|
|
2
2
|
const b = /* @__PURE__ */ P({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "OmegaInputVuetify",
|
|
@@ -6,27 +6,27 @@ const b = /* @__PURE__ */ P({
|
|
|
6
6
|
inputProps: {}
|
|
7
7
|
},
|
|
8
8
|
emits: ["focus", "blur"],
|
|
9
|
-
setup(
|
|
9
|
+
setup(v) {
|
|
10
10
|
return (e, r) => {
|
|
11
11
|
const a = i("v-checkbox"), u = i("v-text-field"), t = i("v-textarea"), m = i("v-select"), d = i("v-autocomplete");
|
|
12
12
|
return o(), g("div", {
|
|
13
13
|
class: "omega-input",
|
|
14
|
-
onFocusout: r[
|
|
15
|
-
onFocusin: r[
|
|
14
|
+
onFocusout: r[4] || (r[4] = (p) => e.$emit("blur", p)),
|
|
15
|
+
onFocusin: r[5] || (r[5] = (p) => e.$emit("focus", p))
|
|
16
16
|
}, [
|
|
17
|
-
e.inputProps.type === "boolean" ? (o(), n(a,
|
|
17
|
+
e.inputProps.type === "boolean" ? (o(), n(a, s({
|
|
18
18
|
key: 0,
|
|
19
19
|
id: e.inputProps.id,
|
|
20
20
|
name: e.inputProps.name,
|
|
21
21
|
label: e.inputProps.label,
|
|
22
|
-
"model-value": e.inputProps.field.state.value,
|
|
23
22
|
"error-messages": e.inputProps.errorMessages,
|
|
24
|
-
error: e.inputProps.error
|
|
23
|
+
error: e.inputProps.error,
|
|
24
|
+
ripple: ""
|
|
25
25
|
}, e.$attrs, {
|
|
26
|
-
|
|
26
|
+
"model-value": e.inputProps.field.state.value,
|
|
27
27
|
onChange: r[0] || (r[0] = (p) => e.inputProps.field.handleChange(p.target.checked))
|
|
28
|
-
}), null, 16, ["id", "name", "label", "
|
|
29
|
-
e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(u,
|
|
28
|
+
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
29
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" ? (o(), n(u, s({
|
|
30
30
|
key: 1,
|
|
31
31
|
id: e.inputProps.id,
|
|
32
32
|
required: e.inputProps.required,
|
|
@@ -35,13 +35,14 @@ const b = /* @__PURE__ */ P({
|
|
|
35
35
|
type: e.inputProps.type,
|
|
36
36
|
name: e.inputProps.name,
|
|
37
37
|
label: e.inputProps.label,
|
|
38
|
-
"model-value": e.inputProps.field.state.value,
|
|
39
38
|
"error-messages": e.inputProps.errorMessages,
|
|
40
39
|
error: e.inputProps.error
|
|
41
40
|
}, e.$attrs, {
|
|
41
|
+
"model-value": e.inputProps.field.state.value,
|
|
42
42
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
43
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "
|
|
44
|
-
e.inputProps.type === "text" ? (o(), n(t,
|
|
43
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
44
|
+
e.inputProps.type === "text" ? (o(), n(t, s({
|
|
45
|
+
key: 2,
|
|
45
46
|
id: e.inputProps.id,
|
|
46
47
|
required: e.inputProps.required,
|
|
47
48
|
"min-length": e.inputProps.minLength,
|
|
@@ -49,12 +50,13 @@ const b = /* @__PURE__ */ P({
|
|
|
49
50
|
type: e.inputProps.type,
|
|
50
51
|
name: e.inputProps.name,
|
|
51
52
|
label: e.inputProps.label,
|
|
52
|
-
"model-value": e.inputProps.field.state.value,
|
|
53
53
|
"error-messages": e.inputProps.errorMessages,
|
|
54
|
-
error: e.inputProps.error
|
|
54
|
+
error: e.inputProps.error
|
|
55
|
+
}, e.$attrs, {
|
|
56
|
+
"model-value": e.inputProps.field.state.value,
|
|
55
57
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
56
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "
|
|
57
|
-
e.inputProps.type === "number" ? (o(), n(u,
|
|
58
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
59
|
+
e.inputProps.type === "number" ? (o(), n(u, s({
|
|
58
60
|
key: 3,
|
|
59
61
|
id: e.inputProps.id,
|
|
60
62
|
required: e.inputProps.required,
|
|
@@ -63,15 +65,15 @@ const b = /* @__PURE__ */ P({
|
|
|
63
65
|
type: e.inputProps.type,
|
|
64
66
|
name: e.inputProps.name,
|
|
65
67
|
label: e.inputProps.label,
|
|
66
|
-
"model-value": e.inputProps.field.state.value,
|
|
67
68
|
"error-messages": e.inputProps.errorMessages,
|
|
68
69
|
error: e.inputProps.error
|
|
69
70
|
}, e.$attrs, {
|
|
71
|
+
"model-value": e.inputProps.field.state.value,
|
|
70
72
|
"onUpdate:modelValue": r[1] || (r[1] = (p) => {
|
|
71
73
|
e.inputProps.field.handleChange(Number(p));
|
|
72
74
|
})
|
|
73
|
-
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "
|
|
74
|
-
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(m,
|
|
75
|
+
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
76
|
+
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(m, s({
|
|
75
77
|
key: 4,
|
|
76
78
|
id: e.inputProps.id,
|
|
77
79
|
clearable: e.inputProps.type === "select",
|
|
@@ -79,30 +81,32 @@ const b = /* @__PURE__ */ P({
|
|
|
79
81
|
multiple: e.inputProps.type === "multiple",
|
|
80
82
|
chips: e.inputProps.type === "multiple",
|
|
81
83
|
name: e.inputProps.name,
|
|
82
|
-
"model-value": e.inputProps.field.state.value,
|
|
83
84
|
label: e.inputProps.label,
|
|
84
85
|
items: e.inputProps.options,
|
|
85
86
|
"error-messages": e.inputProps.errorMessages,
|
|
86
87
|
error: e.inputProps.error
|
|
87
88
|
}, e.$attrs, {
|
|
89
|
+
"model-value": e.inputProps.field.state.value,
|
|
90
|
+
onClear: r[2] || (r[2] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
88
91
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
89
|
-
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "
|
|
90
|
-
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(d,
|
|
92
|
+
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
93
|
+
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(d, s({
|
|
91
94
|
key: 5,
|
|
92
95
|
id: e.inputProps.id,
|
|
93
96
|
clearable: e.inputProps.type === "autocomplete",
|
|
94
97
|
multiple: e.inputProps.type === "autocompletemultiple",
|
|
95
98
|
required: e.inputProps.required,
|
|
96
99
|
name: e.inputProps.name,
|
|
97
|
-
"model-value": e.inputProps.field.state.value,
|
|
98
100
|
label: e.inputProps.label,
|
|
99
101
|
items: e.inputProps.options,
|
|
100
102
|
"error-messages": e.inputProps.errorMessages,
|
|
101
103
|
error: e.inputProps.error,
|
|
102
104
|
chips: e.inputProps.type === "autocompletemultiple"
|
|
103
105
|
}, e.$attrs, {
|
|
106
|
+
"model-value": e.inputProps.field.state.value,
|
|
107
|
+
onClear: r[3] || (r[3] = (p) => e.inputProps.field.handleChange(void 0)),
|
|
104
108
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
105
|
-
}), null, 16, ["id", "clearable", "multiple", "required", "name", "
|
|
109
|
+
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : l("", !0)
|
|
106
110
|
], 32);
|
|
107
111
|
};
|
|
108
112
|
}
|
package/package.json
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
:id="inputProps.id"
|
|
10
10
|
:name="inputProps.name"
|
|
11
11
|
:label="inputProps.label"
|
|
12
|
-
:model-value="inputProps.field.state.value"
|
|
13
12
|
:error-messages="inputProps.errorMessages"
|
|
14
13
|
:error="inputProps.error"
|
|
15
|
-
v-bind="$attrs"
|
|
16
14
|
ripple
|
|
15
|
+
v-bind="$attrs"
|
|
16
|
+
:model-value="inputProps.field.state.value"
|
|
17
17
|
@change="(e: any) => inputProps.field.handleChange(e.target.checked)"
|
|
18
18
|
/>
|
|
19
19
|
<v-text-field
|
|
@@ -25,15 +25,14 @@
|
|
|
25
25
|
:type="inputProps.type"
|
|
26
26
|
:name="inputProps.name"
|
|
27
27
|
:label="inputProps.label"
|
|
28
|
-
:model-value="inputProps.field.state.value"
|
|
29
28
|
:error-messages="inputProps.errorMessages"
|
|
30
29
|
:error="inputProps.error"
|
|
31
30
|
v-bind="$attrs"
|
|
31
|
+
:model-value="inputProps.field.state.value"
|
|
32
32
|
@update:model-value="inputProps.field.handleChange"
|
|
33
33
|
/>
|
|
34
34
|
<v-textarea
|
|
35
35
|
v-if="inputProps.type === 'text'"
|
|
36
|
-
v-bind="$attrs"
|
|
37
36
|
:id="inputProps.id"
|
|
38
37
|
:required="inputProps.required"
|
|
39
38
|
:min-length="inputProps.minLength"
|
|
@@ -41,9 +40,10 @@
|
|
|
41
40
|
:type="inputProps.type"
|
|
42
41
|
:name="inputProps.name"
|
|
43
42
|
:label="inputProps.label"
|
|
44
|
-
:model-value="inputProps.field.state.value"
|
|
45
43
|
:error-messages="inputProps.errorMessages"
|
|
46
44
|
:error="inputProps.error"
|
|
45
|
+
v-bind="$attrs"
|
|
46
|
+
:model-value="inputProps.field.state.value"
|
|
47
47
|
@update:model-value="inputProps.field.handleChange"
|
|
48
48
|
/>
|
|
49
49
|
<v-text-field
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
:type="inputProps.type"
|
|
56
56
|
:name="inputProps.name"
|
|
57
57
|
:label="inputProps.label"
|
|
58
|
-
:model-value="inputProps.field.state.value"
|
|
59
58
|
:error-messages="inputProps.errorMessages"
|
|
60
59
|
:error="inputProps.error"
|
|
61
60
|
v-bind="$attrs"
|
|
61
|
+
:model-value="inputProps.field.state.value"
|
|
62
62
|
@update:model-value="
|
|
63
63
|
(e: any) => {
|
|
64
64
|
inputProps.field.handleChange(Number(e))
|
|
@@ -73,12 +73,13 @@
|
|
|
73
73
|
:multiple="inputProps.type === 'multiple'"
|
|
74
74
|
:chips="inputProps.type === 'multiple'"
|
|
75
75
|
:name="inputProps.name"
|
|
76
|
-
:model-value="inputProps.field.state.value"
|
|
77
76
|
:label="inputProps.label"
|
|
78
77
|
:items="inputProps.options"
|
|
79
78
|
:error-messages="inputProps.errorMessages"
|
|
80
79
|
:error="inputProps.error"
|
|
81
80
|
v-bind="$attrs"
|
|
81
|
+
:model-value="inputProps.field.state.value"
|
|
82
|
+
@clear="inputProps.field.handleChange(undefined)"
|
|
82
83
|
@update:model-value="inputProps.field.handleChange"
|
|
83
84
|
/>
|
|
84
85
|
|
|
@@ -92,13 +93,14 @@
|
|
|
92
93
|
:multiple="inputProps.type === 'autocompletemultiple'"
|
|
93
94
|
:required="inputProps.required"
|
|
94
95
|
:name="inputProps.name"
|
|
95
|
-
:model-value="inputProps.field.state.value"
|
|
96
96
|
:label="inputProps.label"
|
|
97
97
|
:items="inputProps.options"
|
|
98
98
|
:error-messages="inputProps.errorMessages"
|
|
99
99
|
:error="inputProps.error"
|
|
100
100
|
:chips="inputProps.type === 'autocompletemultiple'"
|
|
101
101
|
v-bind="$attrs"
|
|
102
|
+
:model-value="inputProps.field.state.value"
|
|
103
|
+
@clear="inputProps.field.handleChange(undefined)"
|
|
102
104
|
@update:model-value="inputProps.field.handleChange"
|
|
103
105
|
/>
|
|
104
106
|
</div>
|