@verdnatura/vn-front-lib 0.0.5 → 0.0.7
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/components-CIN_fGVX.cjs +1 -0
- package/dist/components-DrW3NFA9.js +2525 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/stores.cjs +1 -1
- package/dist/{useRequired-BviE2qpV.cjs → useRequired-BqsSq8Mw.cjs} +1 -1
- package/dist/useValidationsStore-8JX1-oLO.cjs +1 -0
- package/dist/utils-DEjhADAQ.js +19 -0
- package/dist/utils-lBWNXW70.cjs +1 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.js +2 -0
- package/dist/vn-front-lib.cjs +1 -1
- package/dist/vn-front-lib.js +1928 -6
- package/lib/components/inputs/VnInput.vue +19 -13
- package/lib/main.js +3 -0
- package/lib/utils/defaults/qInput.js +4 -0
- package/lib/utils/defaults/qSelect.js +4 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/setDefault.js +18 -0
- package/package.json +6 -2
- package/dist/components-BMPrf_CF.cjs +0 -1
- package/dist/components-BRH_TJed.js +0 -316
- package/dist/useValidationsStore-BZZg24ZP.cjs +0 -1
|
@@ -9,7 +9,10 @@ const { t } = useI18n();
|
|
|
9
9
|
const emit = defineEmits(['remove']);
|
|
10
10
|
|
|
11
11
|
const $props = defineProps({
|
|
12
|
-
isOutlined: {
|
|
12
|
+
isOutlined: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false,
|
|
15
|
+
},
|
|
13
16
|
info: {
|
|
14
17
|
type: String,
|
|
15
18
|
default: '',
|
|
@@ -163,6 +166,9 @@ onMounted(() => {
|
|
|
163
166
|
hide-bottom-space
|
|
164
167
|
:data-cy="($attrs['data-cy'] ?? $attrs.label) + '_input'"
|
|
165
168
|
>
|
|
169
|
+
<template #hint v-if="$slots.hint">
|
|
170
|
+
<slot name="hint" />
|
|
171
|
+
</template>
|
|
166
172
|
<template #prepend v-if="$slots.prepend">
|
|
167
173
|
<slot name="prepend" />
|
|
168
174
|
</template>
|
|
@@ -228,16 +234,16 @@ onMounted(() => {
|
|
|
228
234
|
transform: scale(1.2);
|
|
229
235
|
}
|
|
230
236
|
</style>
|
|
231
|
-
<i18n
|
|
232
|
-
en:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
es:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
<i18n>
|
|
238
|
+
en:
|
|
239
|
+
inputMin: Must be more than {value}
|
|
240
|
+
maxLength: The value exceeds {value} characters
|
|
241
|
+
inputMax: Must be less than {value}
|
|
242
|
+
|
|
243
|
+
es:
|
|
244
|
+
inputMin: Debe ser mayor a {value}
|
|
245
|
+
maxLength: El valor excede los {value} carácteres
|
|
246
|
+
inputMax: Debe ser menor a {value}
|
|
247
|
+
Convert to uppercase: Convertir a mayúsculas
|
|
248
|
+
Remove: Eliminar
|
|
243
249
|
</i18n>
|
package/lib/main.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './composables';
|
|
3
|
+
export * from './utils';
|
|
3
4
|
import * as components from './components';
|
|
5
|
+
import './utils/defaults/qInput';
|
|
6
|
+
import './utils/defaults/qSelect';
|
|
4
7
|
|
|
5
8
|
function install(app) {
|
|
6
9
|
for (const name in components) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as setDefault } from './setDefault';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default function (component, key, value) {
|
|
2
|
+
const prop = component.props[key];
|
|
3
|
+
switch (typeof prop) {
|
|
4
|
+
case 'object':
|
|
5
|
+
prop.default = value;
|
|
6
|
+
break;
|
|
7
|
+
case 'function':
|
|
8
|
+
component.props[key] = {
|
|
9
|
+
type: prop,
|
|
10
|
+
default: value,
|
|
11
|
+
};
|
|
12
|
+
break;
|
|
13
|
+
case 'undefined':
|
|
14
|
+
throw new Error(`unknown prop: ${key}`);
|
|
15
|
+
default:
|
|
16
|
+
throw new Error(`unhandled type: ${typeof prop}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdnatura/vn-front-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Vue 3 component and composable library",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"author": "Verdnatura Levante SL",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"import": "./dist/stores.js",
|
|
33
33
|
"require": "./dist/stores.cjs"
|
|
34
34
|
},
|
|
35
|
+
"./utils": {
|
|
36
|
+
"vnSource": "./lib/utils/index.js",
|
|
37
|
+
"import": "./dist/utils.js",
|
|
38
|
+
"require": "./dist/utils.cjs"
|
|
39
|
+
},
|
|
35
40
|
"./style.css": "./dist/vn-front-lib.css"
|
|
36
41
|
},
|
|
37
42
|
"scripts": {
|
|
@@ -52,7 +57,6 @@
|
|
|
52
57
|
"oxfmt": "^0.61.0",
|
|
53
58
|
"oxlint": "^1.76.0",
|
|
54
59
|
"pinia": "2.3.1",
|
|
55
|
-
"unplugin-vue-components": "^32.1.0",
|
|
56
60
|
"validator": "^13.15.35",
|
|
57
61
|
"vite": "^8.1.1",
|
|
58
62
|
"vitest": "^4.1.10",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./useValidationsStore-BZZg24ZP.cjs"),t=require("./useRequired-BviE2qpV.cjs");let n=require("quasar"),r=require("vue"),i=require("vue-i18n");function a(e){let t=e;t.__i18n=t.__i18n||[],t.__i18n.push({locale:``,resource:{en:{inputMin:{t:0,b:{t:2,i:[{t:3,v:`Must be more than `},{t:4,k:`value`}]}},maxLength:{t:0,b:{t:2,i:[{t:3,v:`The value exceeds `},{t:4,k:`value`},{t:3,v:` characters`}]}},inputMax:{t:0,b:{t:2,i:[{t:3,v:`Must be less than `},{t:4,k:`value`}]}}},es:{inputMin:{t:0,b:{t:2,i:[{t:3,v:`Debe ser mayor a `},{t:4,k:`value`}]}},maxLength:{t:0,b:{t:2,i:[{t:3,v:`El valor excede los `},{t:4,k:`value`},{t:3,v:` carácteres`}]}},inputMax:{t:0,b:{t:2,i:[{t:3,v:`Debe ser menor a `},{t:4,k:`value`}]}},"Convert to uppercase":{t:0,b:{t:2,i:[{t:3}],s:`Convertir a mayúsculas`}},Remove:{t:0,b:{t:2,i:[{t:3}],s:`Eliminar`}}}}})}var o={__name:`VnInput`,props:(0,r.mergeModels)({isOutlined:{type:Boolean,default:!1},info:{type:String,default:``},clearable:{type:Boolean,default:!0},emptyToNull:{type:Boolean,default:!0},insertable:{type:Boolean,default:!1},maxlength:{type:Number,default:null},uppercase:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:(0,r.mergeModels)([`remove`],[`update:modelValue`]),setup(e,{expose:a,emit:o}){let s=(0,r.useAttrs)(),{isRequired:c,requiredFieldRule:l}=t.t(s),{t:u}=(0,i.useI18n)(),d=o,f=e,p=(0,r.useModel)(e,`modelValue`),m=[`number`,`search`,`tel`,`url`,`password`],h=e=>{let t=e;f.emptyToNull&&t===``&&(t=null),p.value=t},g=(0,r.ref)(null),_=(0,r.ref)(!1),v=(0,r.computed)(()=>f.isOutlined?{dense:!0,outlined:!0,rounded:!0}:{}),y=e=>{g.value?.focus(e)},b=e=>{(0,r.nextTick)(()=>{let t=e.target||g.value?.$el?.querySelector(`input`),n=e.target.type||t?.getAttribute(`type`);if(n!==`email`){if(!m.includes(n)){if(t?.setSelectionRange){let e=t.value?.length??0;t.setSelectionRange(e,e)}return}t?.select?.()}})};a({focus:y,vnInputRef:g});let x=(0,r.computed)(()=>[l,...s.rules??[],e=>{let t=f.maxlength;if(t&&+e?.length>t)return u(`maxLength`,{value:t});let{min:n,max:r}=s,i=n===void 0?void 0:Number(n),a=r===void 0?void 0:Number(r);return i!==void 0&&i>=0&&Math.floor(e)<i?u(`inputMin`,{value:i}):a!==void 0&&a>0&&Math.floor(e)>a?u(`inputMax`,{value:a}):!0}]),S=e=>{e.key!==`Backspace`&&f.insertable&&e.key.match(/[0-9]/)&&C(e)},C=e=>{e.preventDefault();let t=e.target,n=t.selectionStart,i=f.maxlength,a=p.value;a||=e.key;let o=e.key;o&&!isNaN(o)&&n<i&&h(a.substring(0,n)+o+a.substring(n+1)),(0,r.nextTick)(()=>{t.setSelectionRange(n+1,n+1)})},w=()=>{p.value=p.value?.toUpperCase()||``};return(0,r.onMounted)(()=>{s.autofocus&&y()}),(t,i)=>{let a=n.QTooltip,o=n.QIcon,l=n.QInput;return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{onMouseover:i[1]||=e=>_.value=!0,onMouseleave:i[2]||=e=>_.value=!1},[(0,r.createVNode)(l,(0,r.mergeProps)({ref_key:`vnInputRef`,ref:g,"model-value":(0,r.unref)(p),"onUpdate:modelValue":h},{...(0,r.unref)(s),...v.value},{class:{required:(0,r.unref)(c)},onKeydown:S,onFocus:b,clearable:!1,rules:x.value,"lazy-rules":!0,"hide-bottom-space":``,"data-cy":((0,r.unref)(s)[`data-cy`]??(0,r.unref)(s).label)+`_input`}),(0,r.createSlots)({append:(0,r.withCtx)(()=>[(0,r.createVNode)(o,{name:`close`,size:`xs`,class:`cursor-pointer`,style:(0,r.normalizeStyle)({visibility:_.value&&(0,r.unref)(p)&&!(0,r.unref)(s).disabled&&!(0,r.unref)(s).readonly&&f.clearable?`visible`:`hidden`}),onClick:i[0]||=()=>{h(null),g.value?.focus(),d(`remove`)}},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(a,null,{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(u)(`Remove`)),1)]),_:1})]),_:1},8,[`style`]),!(0,r.unref)(s).disabled&&!(0,r.unref)(s).readonly&&f.uppercase?((0,r.openBlock)(),(0,r.createBlock)(o,{key:0,name:`match_case`,size:`xs`,onClick:w,class:`uppercase-icon`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(a,null,{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(u)(`Convert to uppercase`)),1)]),_:1})]),_:1})):(0,r.createCommentVNode)(``,!0),t.$slots.append&&!(0,r.unref)(s).disabled?(0,r.renderSlot)(t.$slots,`append`,{},void 0,void 0,1):(0,r.createCommentVNode)(``,!0),e.info?((0,r.openBlock)(),(0,r.createBlock)(o,{key:2,name:`info`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(a,{"max-width":`350px`},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(e.info),1)]),_:1})]),_:1})):(0,r.createCommentVNode)(``,!0)]),_:2},[t.$slots.prepend?{name:`prepend`,fn:(0,r.withCtx)(()=>[(0,r.renderSlot)(t.$slots,`prepend`)]),key:`0`}:void 0]),1040,[`model-value`,`class`,`rules`,`data-cy`])],32)}}};typeof a==`function`&&a(o);var s=e.n({VnInput:()=>o});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./useRequired-CTxBp3qy.js";
|
|
2
|
-
import { QIcon as t, QInput as n, QTooltip as r } from "quasar";
|
|
3
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createSlots as c, createTextVNode as l, createVNode as u, mergeModels as d, mergeProps as f, nextTick as p, normalizeStyle as m, onMounted as h, openBlock as g, ref as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as x, useModel as S, withCtx as C } from "vue";
|
|
4
|
-
import { useI18n as w } from "vue-i18n";
|
|
5
|
-
//#region \0rolldown/runtime.js
|
|
6
|
-
var T = Object.defineProperty, E = (e, t) => {
|
|
7
|
-
let n = {};
|
|
8
|
-
for (var r in e) T(n, r, {
|
|
9
|
-
get: e[r],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
return t || T(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region lib/components/inputs/VnInput.vue?vue&type=i18n&index=0&lang.yaml
|
|
16
|
-
function D(e) {
|
|
17
|
-
let t = e;
|
|
18
|
-
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
19
|
-
locale: "",
|
|
20
|
-
resource: {
|
|
21
|
-
en: {
|
|
22
|
-
inputMin: {
|
|
23
|
-
t: 0,
|
|
24
|
-
b: {
|
|
25
|
-
t: 2,
|
|
26
|
-
i: [{
|
|
27
|
-
t: 3,
|
|
28
|
-
v: "Must be more than "
|
|
29
|
-
}, {
|
|
30
|
-
t: 4,
|
|
31
|
-
k: "value"
|
|
32
|
-
}]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
maxLength: {
|
|
36
|
-
t: 0,
|
|
37
|
-
b: {
|
|
38
|
-
t: 2,
|
|
39
|
-
i: [
|
|
40
|
-
{
|
|
41
|
-
t: 3,
|
|
42
|
-
v: "The value exceeds "
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
t: 4,
|
|
46
|
-
k: "value"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
t: 3,
|
|
50
|
-
v: " characters"
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
inputMax: {
|
|
56
|
-
t: 0,
|
|
57
|
-
b: {
|
|
58
|
-
t: 2,
|
|
59
|
-
i: [{
|
|
60
|
-
t: 3,
|
|
61
|
-
v: "Must be less than "
|
|
62
|
-
}, {
|
|
63
|
-
t: 4,
|
|
64
|
-
k: "value"
|
|
65
|
-
}]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
es: {
|
|
70
|
-
inputMin: {
|
|
71
|
-
t: 0,
|
|
72
|
-
b: {
|
|
73
|
-
t: 2,
|
|
74
|
-
i: [{
|
|
75
|
-
t: 3,
|
|
76
|
-
v: "Debe ser mayor a "
|
|
77
|
-
}, {
|
|
78
|
-
t: 4,
|
|
79
|
-
k: "value"
|
|
80
|
-
}]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
maxLength: {
|
|
84
|
-
t: 0,
|
|
85
|
-
b: {
|
|
86
|
-
t: 2,
|
|
87
|
-
i: [
|
|
88
|
-
{
|
|
89
|
-
t: 3,
|
|
90
|
-
v: "El valor excede los "
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
t: 4,
|
|
94
|
-
k: "value"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
t: 3,
|
|
98
|
-
v: " carácteres"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
inputMax: {
|
|
104
|
-
t: 0,
|
|
105
|
-
b: {
|
|
106
|
-
t: 2,
|
|
107
|
-
i: [{
|
|
108
|
-
t: 3,
|
|
109
|
-
v: "Debe ser menor a "
|
|
110
|
-
}, {
|
|
111
|
-
t: 4,
|
|
112
|
-
k: "value"
|
|
113
|
-
}]
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"Convert to uppercase": {
|
|
117
|
-
t: 0,
|
|
118
|
-
b: {
|
|
119
|
-
t: 2,
|
|
120
|
-
i: [{ t: 3 }],
|
|
121
|
-
s: "Convertir a mayúsculas"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
Remove: {
|
|
125
|
-
t: 0,
|
|
126
|
-
b: {
|
|
127
|
-
t: 2,
|
|
128
|
-
i: [{ t: 3 }],
|
|
129
|
-
s: "Eliminar"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region lib/components/inputs/VnInput.vue
|
|
138
|
-
var O = {
|
|
139
|
-
__name: "VnInput",
|
|
140
|
-
props: /*@__PURE__*/ d({
|
|
141
|
-
isOutlined: {
|
|
142
|
-
type: Boolean,
|
|
143
|
-
default: !1
|
|
144
|
-
},
|
|
145
|
-
info: {
|
|
146
|
-
type: String,
|
|
147
|
-
default: ""
|
|
148
|
-
},
|
|
149
|
-
clearable: {
|
|
150
|
-
type: Boolean,
|
|
151
|
-
default: !0
|
|
152
|
-
},
|
|
153
|
-
emptyToNull: {
|
|
154
|
-
type: Boolean,
|
|
155
|
-
default: !0
|
|
156
|
-
},
|
|
157
|
-
insertable: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: !1
|
|
160
|
-
},
|
|
161
|
-
maxlength: {
|
|
162
|
-
type: Number,
|
|
163
|
-
default: null
|
|
164
|
-
},
|
|
165
|
-
uppercase: {
|
|
166
|
-
type: Boolean,
|
|
167
|
-
default: !1
|
|
168
|
-
}
|
|
169
|
-
}, {
|
|
170
|
-
modelValue: { default: null },
|
|
171
|
-
modelModifiers: {}
|
|
172
|
-
}),
|
|
173
|
-
emits: /*@__PURE__*/ d(["remove"], ["update:modelValue"]),
|
|
174
|
-
setup(d, { expose: T, emit: E }) {
|
|
175
|
-
let D = x(), { isRequired: O, requiredFieldRule: k } = e(D), { t: A } = w(), j = E, M = d, N = S(d, "modelValue"), P = [
|
|
176
|
-
"number",
|
|
177
|
-
"search",
|
|
178
|
-
"tel",
|
|
179
|
-
"url",
|
|
180
|
-
"password"
|
|
181
|
-
], F = (e) => {
|
|
182
|
-
let t = e;
|
|
183
|
-
M.emptyToNull && t === "" && (t = null), N.value = t;
|
|
184
|
-
}, I = _(null), L = _(!1), R = i(() => M.isOutlined ? {
|
|
185
|
-
dense: !0,
|
|
186
|
-
outlined: !0,
|
|
187
|
-
rounded: !0
|
|
188
|
-
} : {}), z = (e) => {
|
|
189
|
-
I.value?.focus(e);
|
|
190
|
-
}, B = (e) => {
|
|
191
|
-
p(() => {
|
|
192
|
-
let t = e.target || I.value?.$el?.querySelector("input"), n = e.target.type || t?.getAttribute("type");
|
|
193
|
-
if (n !== "email") {
|
|
194
|
-
if (!P.includes(n)) {
|
|
195
|
-
if (t?.setSelectionRange) {
|
|
196
|
-
let e = t.value?.length ?? 0;
|
|
197
|
-
t.setSelectionRange(e, e);
|
|
198
|
-
}
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
t?.select?.();
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
T({
|
|
206
|
-
focus: z,
|
|
207
|
-
vnInputRef: I
|
|
208
|
-
});
|
|
209
|
-
let V = i(() => [
|
|
210
|
-
k,
|
|
211
|
-
...D.rules ?? [],
|
|
212
|
-
(e) => {
|
|
213
|
-
let t = M.maxlength;
|
|
214
|
-
if (t && +e?.length > t) return A("maxLength", { value: t });
|
|
215
|
-
let { min: n, max: r } = D, i = n === void 0 ? void 0 : Number(n), a = r === void 0 ? void 0 : Number(r);
|
|
216
|
-
return i !== void 0 && i >= 0 && Math.floor(e) < i ? A("inputMin", { value: i }) : a !== void 0 && a > 0 && Math.floor(e) > a ? A("inputMax", { value: a }) : !0;
|
|
217
|
-
}
|
|
218
|
-
]), H = (e) => {
|
|
219
|
-
e.key !== "Backspace" && M.insertable && e.key.match(/[0-9]/) && U(e);
|
|
220
|
-
}, U = (e) => {
|
|
221
|
-
e.preventDefault();
|
|
222
|
-
let t = e.target, n = t.selectionStart, r = M.maxlength, i = N.value;
|
|
223
|
-
i ||= e.key;
|
|
224
|
-
let a = e.key;
|
|
225
|
-
a && !isNaN(a) && n < r && F(i.substring(0, n) + a + i.substring(n + 1)), p(() => {
|
|
226
|
-
t.setSelectionRange(n + 1, n + 1);
|
|
227
|
-
});
|
|
228
|
-
}, W = () => {
|
|
229
|
-
N.value = N.value?.toUpperCase() || "";
|
|
230
|
-
};
|
|
231
|
-
return h(() => {
|
|
232
|
-
D.autofocus && z();
|
|
233
|
-
}), (e, i) => {
|
|
234
|
-
let p = r, h = t, _ = n;
|
|
235
|
-
return g(), s("div", {
|
|
236
|
-
onMouseover: i[1] ||= (e) => L.value = !0,
|
|
237
|
-
onMouseleave: i[2] ||= (e) => L.value = !1
|
|
238
|
-
}, [u(_, f({
|
|
239
|
-
ref_key: "vnInputRef",
|
|
240
|
-
ref: I,
|
|
241
|
-
"model-value": b(N),
|
|
242
|
-
"onUpdate:modelValue": F
|
|
243
|
-
}, {
|
|
244
|
-
...b(D),
|
|
245
|
-
...R.value
|
|
246
|
-
}, {
|
|
247
|
-
class: { required: b(O) },
|
|
248
|
-
onKeydown: H,
|
|
249
|
-
onFocus: B,
|
|
250
|
-
clearable: !1,
|
|
251
|
-
rules: V.value,
|
|
252
|
-
"lazy-rules": !0,
|
|
253
|
-
"hide-bottom-space": "",
|
|
254
|
-
"data-cy": (b(D)["data-cy"] ?? b(D).label) + "_input"
|
|
255
|
-
}), c({
|
|
256
|
-
append: C(() => [
|
|
257
|
-
u(h, {
|
|
258
|
-
name: "close",
|
|
259
|
-
size: "xs",
|
|
260
|
-
class: "cursor-pointer",
|
|
261
|
-
style: m({ visibility: L.value && b(N) && !b(D).disabled && !b(D).readonly && M.clearable ? "visible" : "hidden" }),
|
|
262
|
-
onClick: i[0] ||= () => {
|
|
263
|
-
F(null), I.value?.focus(), j("remove");
|
|
264
|
-
}
|
|
265
|
-
}, {
|
|
266
|
-
default: C(() => [u(p, null, {
|
|
267
|
-
default: C(() => [l(y(b(A)("Remove")), 1)]),
|
|
268
|
-
_: 1
|
|
269
|
-
})]),
|
|
270
|
-
_: 1
|
|
271
|
-
}, 8, ["style"]),
|
|
272
|
-
!b(D).disabled && !b(D).readonly && M.uppercase ? (g(), a(h, {
|
|
273
|
-
key: 0,
|
|
274
|
-
name: "match_case",
|
|
275
|
-
size: "xs",
|
|
276
|
-
onClick: W,
|
|
277
|
-
class: "uppercase-icon"
|
|
278
|
-
}, {
|
|
279
|
-
default: C(() => [u(p, null, {
|
|
280
|
-
default: C(() => [l(y(b(A)("Convert to uppercase")), 1)]),
|
|
281
|
-
_: 1
|
|
282
|
-
})]),
|
|
283
|
-
_: 1
|
|
284
|
-
})) : o("", !0),
|
|
285
|
-
e.$slots.append && !b(D).disabled ? v(e.$slots, "append", {}, void 0, void 0, 1) : o("", !0),
|
|
286
|
-
d.info ? (g(), a(h, {
|
|
287
|
-
key: 2,
|
|
288
|
-
name: "info"
|
|
289
|
-
}, {
|
|
290
|
-
default: C(() => [u(p, { "max-width": "350px" }, {
|
|
291
|
-
default: C(() => [l(y(d.info), 1)]),
|
|
292
|
-
_: 1
|
|
293
|
-
})]),
|
|
294
|
-
_: 1
|
|
295
|
-
})) : o("", !0)
|
|
296
|
-
]),
|
|
297
|
-
_: 2
|
|
298
|
-
}, [e.$slots.prepend ? {
|
|
299
|
-
name: "prepend",
|
|
300
|
-
fn: C(() => [v(e.$slots, "prepend")]),
|
|
301
|
-
key: "0"
|
|
302
|
-
} : void 0]), 1040, [
|
|
303
|
-
"model-value",
|
|
304
|
-
"class",
|
|
305
|
-
"rules",
|
|
306
|
-
"data-cy"
|
|
307
|
-
])], 32);
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
typeof D == "function" && D(O);
|
|
312
|
-
//#endregion
|
|
313
|
-
//#region lib/components/index.js
|
|
314
|
-
var k = /* @__PURE__ */ E({ VnInput: () => O });
|
|
315
|
-
//#endregion
|
|
316
|
-
export { O as n, k as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("pinia"),u=require("axios");u=c(u,1);var d=(0,l.defineStore)(`validationsStore`,{state:()=>({validations:null}),actions:{async fetchModels(){let{data:e}=await u.default.get(`Schemas/modelinfo`);this.validations=e}}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
|