@effect-app/vue-components 0.1.3 → 0.2.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.
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { mdiRefresh as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as k, resolveComponent as n, createElementBlock as m, openBlock as r, createBlock as l, createCommentVNode as p, mergeProps as i, normalizeClass as y, createVNode as u, unref as t, withCtx as v } from "vue";
|
|
2
|
+
import { mdiRefresh as a } from "@mdi/js";
|
|
3
|
+
const C = { class: "omega-input" }, U = /* @__PURE__ */ k({
|
|
4
4
|
__name: "OmegaInputVuetify",
|
|
5
5
|
props: {
|
|
6
6
|
inputProps: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
8
|
+
setup(q) {
|
|
9
9
|
return (e, o) => {
|
|
10
|
-
const d = n("v-text-field"),
|
|
11
|
-
return r(), m("div",
|
|
12
|
-
e.inputProps.type === "
|
|
10
|
+
const h = n("v-checkbox"), d = n("v-text-field"), b = n("v-textarea"), f = n("v-select"), P = n("v-icon"), g = n("v-btn"), V = n("v-autocomplete");
|
|
11
|
+
return r(), m("div", C, [
|
|
12
|
+
e.inputProps.type === "boolean" ? (r(), l(h, i({
|
|
13
13
|
key: 0,
|
|
14
14
|
id: e.inputProps.id,
|
|
15
|
+
name: e.inputProps.name,
|
|
16
|
+
label: e.inputProps.label,
|
|
17
|
+
"model-value": e.inputProps.modelValue,
|
|
18
|
+
"error-messages": e.inputProps.errorMessages,
|
|
19
|
+
error: e.inputProps.error
|
|
20
|
+
}, e.$attrs, {
|
|
21
|
+
ripple: "",
|
|
22
|
+
onChange: o[0] || (o[0] = (s) => e.inputProps.field.handleChange(s.target.checked)),
|
|
23
|
+
onBlur: e.inputProps.setRealDirty
|
|
24
|
+
}), null, 16, ["id", "name", "label", "model-value", "error-messages", "error", "onBlur"])) : p("", !0),
|
|
25
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" ? (r(), l(d, i({
|
|
26
|
+
key: 1,
|
|
27
|
+
id: e.inputProps.id,
|
|
15
28
|
required: e.inputProps.required,
|
|
16
29
|
"min-length": e.inputProps.minLength,
|
|
17
30
|
"max-length": e.inputProps.maxLength,
|
|
@@ -25,7 +38,7 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
|
|
|
25
38
|
"onUpdate:modelValue": e.inputProps.field.handleChange,
|
|
26
39
|
onBlur: e.inputProps.setRealDirty
|
|
27
40
|
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue", "onBlur"])) : p("", !0),
|
|
28
|
-
e.inputProps.type === "text" ? (r(), l(
|
|
41
|
+
e.inputProps.type === "text" ? (r(), l(b, i({ key: 2 }, e.$attrs, {
|
|
29
42
|
id: e.inputProps.id,
|
|
30
43
|
required: e.inputProps.required,
|
|
31
44
|
"min-length": e.inputProps.minLength,
|
|
@@ -40,7 +53,7 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
|
|
|
40
53
|
onBlur: e.inputProps.setRealDirty
|
|
41
54
|
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "model-value", "error-messages", "error", "onUpdate:modelValue", "onBlur"])) : p("", !0),
|
|
42
55
|
e.inputProps.type === "number" ? (r(), l(d, i({
|
|
43
|
-
key:
|
|
56
|
+
key: 3,
|
|
44
57
|
id: e.inputProps.id,
|
|
45
58
|
required: e.inputProps.required,
|
|
46
59
|
min: e.inputProps.min,
|
|
@@ -52,16 +65,16 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
|
|
|
52
65
|
"error-messages": e.inputProps.errorMessages,
|
|
53
66
|
error: e.inputProps.error
|
|
54
67
|
}, e.$attrs, {
|
|
55
|
-
"onUpdate:modelValue": o[
|
|
56
|
-
e.inputProps.field.handleChange(Number(
|
|
68
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => {
|
|
69
|
+
e.inputProps.field.handleChange(Number(s));
|
|
57
70
|
}),
|
|
58
71
|
onBlur: e.inputProps.setRealDirty
|
|
59
72
|
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "model-value", "error-messages", "error", "onBlur"])) : p("", !0),
|
|
60
73
|
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (r(), m("div", {
|
|
61
|
-
key:
|
|
62
|
-
class:
|
|
74
|
+
key: 4,
|
|
75
|
+
class: y(e.inputProps.type !== "multiple" && "d-flex")
|
|
63
76
|
}, [
|
|
64
|
-
|
|
77
|
+
u(f, i({
|
|
65
78
|
id: e.inputProps.id,
|
|
66
79
|
required: e.inputProps.required,
|
|
67
80
|
multiple: e.inputProps.type === "multiple",
|
|
@@ -76,25 +89,25 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
|
|
|
76
89
|
"onUpdate:modelValue": e.inputProps.field.handleChange,
|
|
77
90
|
onBlur: e.inputProps.setRealDirty
|
|
78
91
|
}), null, 16, ["id", "required", "multiple", "chips", "name", "model-value", "label", "items", "error-messages", "error", "onUpdate:modelValue", "onBlur"]),
|
|
79
|
-
e.inputProps.type === "select" ? (r(), l(
|
|
92
|
+
e.inputProps.type === "select" ? (r(), l(g, {
|
|
80
93
|
key: 0,
|
|
81
94
|
"variant-btn": "secondary",
|
|
82
|
-
"variant-icon": t(
|
|
95
|
+
"variant-icon": t(a),
|
|
83
96
|
class: "mr-2",
|
|
84
97
|
title: "Reset",
|
|
85
|
-
onClick: o[
|
|
98
|
+
onClick: o[2] || (o[2] = (s) => e.inputProps.field.handleChange(void 0))
|
|
86
99
|
}, {
|
|
87
100
|
default: v(() => [
|
|
88
|
-
|
|
101
|
+
u(P, { icon: t(a) }, null, 8, ["icon"])
|
|
89
102
|
]),
|
|
90
103
|
_: 1
|
|
91
104
|
}, 8, ["variant-icon"])) : p("", !0)
|
|
92
105
|
], 2)) : p("", !0),
|
|
93
106
|
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (r(), m("div", {
|
|
94
|
-
key:
|
|
95
|
-
class:
|
|
107
|
+
key: 5,
|
|
108
|
+
class: y(e.inputProps.type !== "autocompletemultiple" && "d-flex")
|
|
96
109
|
}, [
|
|
97
|
-
|
|
110
|
+
u(V, i({
|
|
98
111
|
id: e.inputProps.id,
|
|
99
112
|
multiple: e.inputProps.type === "autocompletemultiple",
|
|
100
113
|
required: e.inputProps.required,
|
|
@@ -109,16 +122,16 @@ const q = { class: "omega-input" }, U = /* @__PURE__ */ V({
|
|
|
109
122
|
"onUpdate:modelValue": e.inputProps.field.handleChange,
|
|
110
123
|
onBlur: e.inputProps.setRealDirty
|
|
111
124
|
}), null, 16, ["id", "multiple", "required", "name", "model-value", "label", "items", "error-messages", "error", "chips", "onUpdate:modelValue", "onBlur"]),
|
|
112
|
-
e.inputProps.type === "autocomplete" ? (r(), l(
|
|
125
|
+
e.inputProps.type === "autocomplete" ? (r(), l(g, {
|
|
113
126
|
key: 0,
|
|
114
127
|
"variant-btn": "secondary",
|
|
115
|
-
"variant-icon": t(
|
|
128
|
+
"variant-icon": t(a),
|
|
116
129
|
class: "mr-2",
|
|
117
130
|
title: "Reset",
|
|
118
|
-
onClick: o[
|
|
131
|
+
onClick: o[3] || (o[3] = (s) => e.inputProps.field.handleChange(void 0))
|
|
119
132
|
}, {
|
|
120
133
|
default: v(() => [
|
|
121
|
-
|
|
134
|
+
u(P, { icon: t(a) }, null, 8, ["icon"])
|
|
122
135
|
]),
|
|
123
136
|
_: 1
|
|
124
137
|
}, 8, ["variant-icon"])) : p("", !0)
|
package/package.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="omega-input">
|
|
3
|
+
<v-checkbox
|
|
4
|
+
v-if="inputProps.type === 'boolean'"
|
|
5
|
+
:id="inputProps.id"
|
|
6
|
+
:name="inputProps.name"
|
|
7
|
+
:label="inputProps.label"
|
|
8
|
+
:model-value="inputProps.modelValue"
|
|
9
|
+
:error-messages="inputProps.errorMessages"
|
|
10
|
+
:error="inputProps.error"
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
ripple
|
|
13
|
+
@change="(e: any) => inputProps.field.handleChange(e.target.checked)"
|
|
14
|
+
@blur="inputProps.setRealDirty"
|
|
15
|
+
/>
|
|
3
16
|
<v-text-field
|
|
4
17
|
v-if="inputProps.type === 'email' || inputProps.type === 'string'"
|
|
5
18
|
:id="inputProps.id"
|