adverich-kun-ui 0.1.516 → 0.1.518
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,9 +1,9 @@
|
|
|
1
|
-
import { mergeModels as z, useModel as A, onMounted as se, ref as E, watch as ue, nextTick as
|
|
1
|
+
import { mergeModels as z, useModel as A, onMounted as se, ref as E, watch as ue, nextTick as F, createElementBlock as g, openBlock as c, createVNode as s, unref as t, withKeys as de, withModifiers as x, isRef as O, createSlots as ce, withCtx as r, createCommentVNode as h, normalizeClass as fe, createTextVNode as C, toDisplayString as D, createBlock as p, Fragment as me, renderList as pe, createElementVNode as ve } from "vue";
|
|
2
2
|
import { icons as v } from "../../../../icons/index.js";
|
|
3
|
-
import { isNotEmpty as R, isArray as
|
|
3
|
+
import { isNotEmpty as R, isArray as N } from "../../../../utils/utils.js";
|
|
4
4
|
import ke from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
|
|
5
5
|
import ye from "../../../KunList/src/components/KunList.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import B from "../../../KunListItem/src/components/KunListItem.vue.js";
|
|
7
7
|
import T from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
8
8
|
import ge from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
9
9
|
import he from "../../../KunMenu/src/components/KunMenu.vue.js";
|
|
@@ -24,7 +24,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
24
24
|
items: { default: [], type: Array, required: !0 },
|
|
25
25
|
itemsModifiers: {}
|
|
26
26
|
}),
|
|
27
|
-
emits: /* @__PURE__ */ z(["update:modelValue", "selectedItem", "createItem", "validation", "search", "keyDown", "keyDownEnter"], ["update:modelValue", "update:items"]),
|
|
27
|
+
emits: /* @__PURE__ */ z(["update:modelValue", "selectedItem", "createItem", "validation", "search", "keyDown", "keyDownEnter", "notFound"], ["update:modelValue", "update:items"]),
|
|
28
28
|
setup(w, { expose: _, emit: U }) {
|
|
29
29
|
const u = A(w, "modelValue"), m = A(w, "items"), a = w, f = U, {
|
|
30
30
|
textFieldRef: k,
|
|
@@ -86,7 +86,8 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
86
86
|
function re() {
|
|
87
87
|
}
|
|
88
88
|
function ae(e) {
|
|
89
|
-
if (console.log(
|
|
89
|
+
if (console.log(1), !n.value) return;
|
|
90
|
+
console.log(2);
|
|
90
91
|
let o = null;
|
|
91
92
|
a.returnObject ? o = m.value.find(
|
|
92
93
|
(l) => Object.values(l).some(
|
|
@@ -96,12 +97,12 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
96
97
|
(l) => String(l[a.itemValue]).toLowerCase() === String(n.value).toLowerCase()
|
|
97
98
|
) : o = m.value.find(
|
|
98
99
|
(l) => typeof l == "object" ? Object.values(l).some((i) => String(i).toLowerCase() === String(n.value).toLowerCase()) : String(l).toLowerCase() === String(n.value).toLowerCase()
|
|
99
|
-
), o ? K(o) : (f("notFound", n.value), a.clearOnNotFound && (n.value = "", d.value = !1)),
|
|
100
|
+
), o ? K(o) : (console.log("No se encontró el elemento:", n.value), f("notFound", n.value), a.clearOnNotFound && (n.value = "", d.value = !1)), F(() => {
|
|
100
101
|
f("keyDownEnter", e);
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
return _({
|
|
104
|
-
focus: () =>
|
|
105
|
+
focus: () => F(() => {
|
|
105
106
|
var e;
|
|
106
107
|
return (e = k.value) == null ? void 0 : e.focus();
|
|
107
108
|
})
|
|
@@ -129,14 +130,14 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
129
130
|
onBlur: re,
|
|
130
131
|
onKeyDown: [
|
|
131
132
|
le,
|
|
132
|
-
de(
|
|
133
|
+
de(x(ae, ["prevent"]), ["enter"])
|
|
133
134
|
],
|
|
134
|
-
placeholder: a.multiple && t(
|
|
135
|
+
placeholder: a.multiple && t(N)(u.value) && u.value.length ? "" : t(Z),
|
|
135
136
|
error: !!y.value,
|
|
136
137
|
"error-messages": y.value
|
|
137
138
|
}, ce({
|
|
138
139
|
"prepend-input-content": r(() => [
|
|
139
|
-
t(
|
|
140
|
+
t(N)(u.value) && t(R)(u.value) ? (c(), g("div", {
|
|
140
141
|
key: 0,
|
|
141
142
|
class: "flex flex-nowrap items-center space-x-1 min-w-[calc(100%-56px)] overflow-x-auto overflow-y-hidden",
|
|
142
143
|
onClick: o[0] || (o[0] = (...l) => t(V) && t(V)(...l))
|
|
@@ -210,7 +211,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
210
211
|
"item-height": 48
|
|
211
212
|
}, {
|
|
212
213
|
default: r(({ item: l, index: i, empty: ie }) => [
|
|
213
|
-
!ie && l != null ? (c(), p(
|
|
214
|
+
!ie && l != null ? (c(), p(B, {
|
|
214
215
|
value: l,
|
|
215
216
|
key: `kun-list-${i + 1}`,
|
|
216
217
|
id: `kun-item-${i + 1}`,
|
|
@@ -233,7 +234,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
233
234
|
}, null, 8, ["text"])
|
|
234
235
|
]),
|
|
235
236
|
_: 2
|
|
236
|
-
}, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (c(), p(
|
|
237
|
+
}, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (c(), p(B, {
|
|
237
238
|
key: 1,
|
|
238
239
|
disabled: ""
|
|
239
240
|
}, {
|
|
@@ -276,7 +277,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
276
277
|
size: "large",
|
|
277
278
|
class: "cursor-pointer",
|
|
278
279
|
icon: t(d) ? t(v).menuUpOutline : t(v).menuDownOutline,
|
|
279
|
-
onClick:
|
|
280
|
+
onClick: x(t(S), ["stop"])
|
|
280
281
|
}, null, 8, ["icon", "onClick"]),
|
|
281
282
|
e.required ? (c(), p(b, {
|
|
282
283
|
key: 1,
|