adverich-kun-ui 0.1.516 → 0.1.517
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,12 +1,12 @@
|
|
|
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 h, 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 g, 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
3
|
import { isNotEmpty as R, isArray as B } 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
6
|
import N from "../../../KunListItem/src/components/KunListItem.vue.js";
|
|
7
7
|
import T from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import he from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
9
|
+
import ge from "../../../KunMenu/src/components/KunMenu.vue.js";
|
|
10
10
|
import { useAutocomplete as Ce } from "../composables/useAutocomplete.js";
|
|
11
11
|
import { KunAutocompleteProps as be } from "../composables/KunAutocompleteProps.js";
|
|
12
12
|
import we from "../../../KunTextField/src/components/KunTextField.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,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
86
86
|
function re() {
|
|
87
87
|
}
|
|
88
88
|
function ae(e) {
|
|
89
|
-
if (
|
|
89
|
+
if (!n.value) return;
|
|
90
90
|
let o = null;
|
|
91
91
|
a.returnObject ? o = m.value.find(
|
|
92
92
|
(l) => Object.values(l).some(
|
|
@@ -96,16 +96,16 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
96
96
|
(l) => String(l[a.itemValue]).toLowerCase() === String(n.value).toLowerCase()
|
|
97
97
|
) : o = m.value.find(
|
|
98
98
|
(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)),
|
|
99
|
+
), o ? K(o) : (f("notFound", n.value), a.clearOnNotFound && (n.value = "", d.value = !1)), F(() => {
|
|
100
100
|
f("keyDownEnter", e);
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
return _({
|
|
104
|
-
focus: () =>
|
|
104
|
+
focus: () => F(() => {
|
|
105
105
|
var e;
|
|
106
106
|
return (e = k.value) == null ? void 0 : e.focus();
|
|
107
107
|
})
|
|
108
|
-
}), (e, o) => (c(),
|
|
108
|
+
}), (e, o) => (c(), h("div", {
|
|
109
109
|
class: "w-full h-fit",
|
|
110
110
|
ref_key: "parentRef",
|
|
111
111
|
ref: M
|
|
@@ -129,19 +129,19 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
129
129
|
onBlur: re,
|
|
130
130
|
onKeyDown: [
|
|
131
131
|
le,
|
|
132
|
-
de(
|
|
132
|
+
de(x(ae, ["prevent"]), ["enter"])
|
|
133
133
|
],
|
|
134
134
|
placeholder: a.multiple && t(B)(u.value) && u.value.length ? "" : t(Z),
|
|
135
135
|
error: !!y.value,
|
|
136
136
|
"error-messages": y.value
|
|
137
137
|
}, ce({
|
|
138
138
|
"prepend-input-content": r(() => [
|
|
139
|
-
t(B)(u.value) && t(R)(u.value) ? (c(),
|
|
139
|
+
t(B)(u.value) && t(R)(u.value) ? (c(), h("div", {
|
|
140
140
|
key: 0,
|
|
141
141
|
class: "flex flex-nowrap items-center space-x-1 min-w-[calc(100%-56px)] overflow-x-auto overflow-y-hidden",
|
|
142
142
|
onClick: o[0] || (o[0] = (...l) => t(V) && t(V)(...l))
|
|
143
143
|
}, [
|
|
144
|
-
(c(!0),
|
|
144
|
+
(c(!0), h(me, null, pe(u.value, (l) => (c(), p(Ve, {
|
|
145
145
|
key: l.id ?? l.name,
|
|
146
146
|
size: "small",
|
|
147
147
|
variant: "pill"
|
|
@@ -160,10 +160,10 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
160
160
|
]),
|
|
161
161
|
_: 2
|
|
162
162
|
}, 1024))), 128))
|
|
163
|
-
])) :
|
|
163
|
+
])) : g("", !0)
|
|
164
164
|
]),
|
|
165
165
|
default: r(() => [
|
|
166
|
-
s(
|
|
166
|
+
s(ge, {
|
|
167
167
|
transition: "fade",
|
|
168
168
|
"onClick:outside": t(q),
|
|
169
169
|
modelValue: t(d),
|
|
@@ -180,7 +180,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
180
180
|
"hide-details": e.hideDetails
|
|
181
181
|
}, {
|
|
182
182
|
default: r(() => [
|
|
183
|
-
e.hasCreateItem ? (c(),
|
|
183
|
+
e.hasCreateItem ? (c(), h("div", Ie, [
|
|
184
184
|
s(Se, {
|
|
185
185
|
onClick: t(X),
|
|
186
186
|
bgColor: e.btnCreateBg,
|
|
@@ -191,7 +191,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
193
193
|
}, 8, ["onClick", "bgColor", "class"])
|
|
194
|
-
])) :
|
|
194
|
+
])) : g("", !0),
|
|
195
195
|
s(ye, {
|
|
196
196
|
"onClick:select": t(K),
|
|
197
197
|
ref_key: "listRef",
|
|
@@ -228,7 +228,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
228
228
|
]),
|
|
229
229
|
_: 2
|
|
230
230
|
}, 1024),
|
|
231
|
-
s(
|
|
231
|
+
s(he, {
|
|
232
232
|
text: e.itemSubtitle ? t(L)(l, e.itemSubtitle) : ""
|
|
233
233
|
}, null, 8, ["text"])
|
|
234
234
|
]),
|
|
@@ -270,13 +270,13 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
270
270
|
color: "error",
|
|
271
271
|
icon: t(v).close,
|
|
272
272
|
class: "mr-1 mt-1"
|
|
273
|
-
}, null, 8, ["onClick", "icon"])) :
|
|
273
|
+
}, null, 8, ["onClick", "icon"])) : g("", !0),
|
|
274
274
|
s(b, {
|
|
275
275
|
color: "teal-darken-1",
|
|
276
276
|
size: "large",
|
|
277
277
|
class: "cursor-pointer",
|
|
278
278
|
icon: t(d) ? t(v).menuUpOutline : t(v).menuDownOutline,
|
|
279
|
-
onClick:
|
|
279
|
+
onClick: x(t(S), ["stop"])
|
|
280
280
|
}, null, 8, ["icon", "onClick"]),
|
|
281
281
|
e.required ? (c(), p(b, {
|
|
282
282
|
key: 1,
|
|
@@ -284,7 +284,7 @@ const De = { class: "flex items-center" }, Ie = {
|
|
|
284
284
|
size: "x-small",
|
|
285
285
|
class: "mb-4",
|
|
286
286
|
icon: t(v).asterisk
|
|
287
|
-
}, null, 8, ["icon"])) :
|
|
287
|
+
}, null, 8, ["icon"])) : g("", !0)
|
|
288
288
|
]),
|
|
289
289
|
key: "0"
|
|
290
290
|
} : void 0
|