adverich-kun-ui 0.1.292 → 0.1.294
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,24 +1,24 @@
|
|
|
1
|
-
import { mergeModels as A, useModel as R, onMounted as
|
|
1
|
+
import { mergeModels as A, useModel as R, onMounted as re, ref as $, watch as ae, createElementBlock as w, openBlock as r, createVNode as i, unref as l, isRef as z, createSlots as se, withCtx as n, createCommentVNode as k, Fragment as ue, renderList as de, createBlock as d, createElementVNode as ce, createTextVNode as v, toDisplayString as F, withModifiers as me } from "vue";
|
|
2
2
|
import { icons as m } from "../../../../icons/index.js";
|
|
3
|
-
import { isNotEmpty as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { isNotEmpty as fe, isArray as B } from "../../../../utils/utils.js";
|
|
4
|
+
import pe from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
|
|
5
|
+
import he from "../../../KunList/src/components/KunList.vue.js";
|
|
6
6
|
import V from "../../../KunListItem/src/components/KunListItem.vue.js";
|
|
7
7
|
import E from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
8
8
|
import ke from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import { useAutocomplete as
|
|
11
|
-
import { KunAutocompleteProps as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
9
|
+
import ve from "../../../kunMenu/src/components/kunMenu.vue.js";
|
|
10
|
+
import { useAutocomplete as ye } from "../composables/useAutocomplete.js";
|
|
11
|
+
import { KunAutocompleteProps as ge } from "../composables/KunAutocompleteProps.js";
|
|
12
|
+
import be from "../../../KunTextField/src/components/KunTextField.vue.js";
|
|
13
|
+
import Ce from "../../../KunBtn/src/components/KunBtn.vue.js";
|
|
14
|
+
import we from "../../../KunChip/src/components/KunChip.vue.js";
|
|
15
15
|
import y from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
16
|
-
const
|
|
16
|
+
const Ve = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "flex justify-center align-center"
|
|
19
|
-
},
|
|
19
|
+
}, Ie = { class: "flex justify-center align-center" }, Le = {
|
|
20
20
|
__name: "KunAutocomplete",
|
|
21
|
-
props: /* @__PURE__ */ A(
|
|
21
|
+
props: /* @__PURE__ */ A(ge, {
|
|
22
22
|
modelValue: { default: null },
|
|
23
23
|
modelModifiers: {},
|
|
24
24
|
items: { default: [], type: Array, required: !0 },
|
|
@@ -31,26 +31,25 @@ const Ie = {
|
|
|
31
31
|
listRef: _,
|
|
32
32
|
menuModel: s,
|
|
33
33
|
search: c,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
lightReset: H,
|
|
34
|
+
removeItem: T,
|
|
35
|
+
clearSelection: L,
|
|
36
|
+
lightReset: U,
|
|
38
37
|
openMenu: C,
|
|
39
|
-
closeMenu:
|
|
40
|
-
toggleMenu:
|
|
41
|
-
onMenuKeydown:
|
|
42
|
-
getSelectedItem:
|
|
43
|
-
textArr:
|
|
44
|
-
getItemText:
|
|
45
|
-
isAlphanumeric:
|
|
46
|
-
createItem:
|
|
47
|
-
checkDisabled:
|
|
38
|
+
closeMenu: H,
|
|
39
|
+
toggleMenu: O,
|
|
40
|
+
onMenuKeydown: j,
|
|
41
|
+
getSelectedItem: q,
|
|
42
|
+
textArr: P,
|
|
43
|
+
getItemText: W,
|
|
44
|
+
isAlphanumeric: G,
|
|
45
|
+
createItem: J,
|
|
46
|
+
checkDisabled: Q,
|
|
48
47
|
itemToString: S,
|
|
49
|
-
placeholder:
|
|
50
|
-
hasCreateItem:
|
|
51
|
-
} =
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
placeholder: X,
|
|
49
|
+
hasCreateItem: Y
|
|
50
|
+
} = ye(u, f, a, I);
|
|
51
|
+
re(() => {
|
|
52
|
+
u.focusOnRender && b.value.focus();
|
|
54
53
|
});
|
|
55
54
|
const D = $(null), p = $(""), K = (e) => {
|
|
56
55
|
for (const o of u.rules) {
|
|
@@ -60,43 +59,43 @@ const Ie = {
|
|
|
60
59
|
}
|
|
61
60
|
return p.value = "", f("validation", !0), !0;
|
|
62
61
|
};
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
ae(() => a.value, (e, o) => {
|
|
63
|
+
fe(u.rules) && K(e);
|
|
65
64
|
});
|
|
66
|
-
function
|
|
65
|
+
function Z() {
|
|
67
66
|
var e;
|
|
68
67
|
s.value = !1, (e = b.value.inputField) == null || e.focus();
|
|
69
68
|
}
|
|
70
|
-
function
|
|
69
|
+
function ee(e) {
|
|
71
70
|
var t, h;
|
|
72
71
|
const o = e.key;
|
|
73
72
|
if (o === "Tab" || o === "Shift") {
|
|
74
|
-
|
|
73
|
+
H();
|
|
75
74
|
return;
|
|
76
75
|
}
|
|
77
|
-
(
|
|
76
|
+
(G(o) || o === "Backspace") && C(), ["ArrowUp", "ArrowDown"].includes(o) && (e.preventDefault(), s.value || C(), (h = (t = _.value) == null ? void 0 : t.focusWithKey) == null || h.call(t, o));
|
|
78
77
|
}
|
|
79
|
-
function
|
|
78
|
+
function le(e) {
|
|
80
79
|
f("search", c);
|
|
81
80
|
}
|
|
82
|
-
function
|
|
81
|
+
function te() {
|
|
83
82
|
K(a);
|
|
84
83
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
84
|
+
function oe(e) {
|
|
85
|
+
j(e);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
87
|
+
function ne() {
|
|
89
88
|
}
|
|
90
89
|
return (e, o) => (r(), w("div", {
|
|
91
90
|
class: "w-full h-fit",
|
|
92
91
|
ref_key: "parentRef",
|
|
93
92
|
ref: D
|
|
94
93
|
}, [
|
|
95
|
-
i(
|
|
94
|
+
i(be, {
|
|
96
95
|
modelValue: l(c),
|
|
97
96
|
"onUpdate:modelValue": [
|
|
98
97
|
o[1] || (o[1] = (t) => z(c) ? c.value = t : null),
|
|
99
|
-
|
|
98
|
+
le
|
|
100
99
|
],
|
|
101
100
|
label: e.label,
|
|
102
101
|
dirty: "",
|
|
@@ -105,40 +104,40 @@ const Ie = {
|
|
|
105
104
|
ref_key: "textFieldRef",
|
|
106
105
|
ref: b,
|
|
107
106
|
autocomplete: "off",
|
|
108
|
-
onFocusInput:
|
|
109
|
-
onHandleClick: l(
|
|
107
|
+
onFocusInput: te,
|
|
108
|
+
onHandleClick: l(O),
|
|
110
109
|
rounded: l(s) ? "rounded-t" : "rounded",
|
|
111
|
-
onBlur:
|
|
112
|
-
onKeyDown:
|
|
113
|
-
placeholder: u.multiple && l(B)(a.value) && a.value.length ? "" : l(
|
|
110
|
+
onBlur: ne,
|
|
111
|
+
onKeyDown: ee,
|
|
112
|
+
placeholder: u.multiple && l(B)(a.value) && a.value.length ? "" : l(X),
|
|
114
113
|
error: !!p.value,
|
|
115
114
|
"error-messages": p.value
|
|
116
|
-
},
|
|
115
|
+
}, se({
|
|
117
116
|
default: n(() => [
|
|
118
|
-
l(B)(a.value) ? (r(), w("div",
|
|
119
|
-
(r(!0), w(
|
|
117
|
+
l(B)(a.value) ? (r(), w("div", Ve, [
|
|
118
|
+
(r(!0), w(ue, null, de(a.value, (t) => (r(), d(we, {
|
|
120
119
|
key: t.id ?? t.name,
|
|
121
120
|
size: "small",
|
|
122
121
|
class: "ml-1"
|
|
123
122
|
}, {
|
|
124
123
|
default: n(() => [
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
ce("div", Ie, [
|
|
125
|
+
v(F(l(W)(t, e.itemTitle)) + " ", 1),
|
|
127
126
|
i(y, {
|
|
128
127
|
color: "error",
|
|
129
128
|
icon: l(m).close,
|
|
130
129
|
size: "small",
|
|
131
130
|
class: "ml-1",
|
|
132
|
-
onClick: (h) => l(
|
|
131
|
+
onClick: (h) => l(T)(t)
|
|
133
132
|
}, null, 8, ["icon", "onClick"])
|
|
134
133
|
])
|
|
135
134
|
]),
|
|
136
135
|
_: 2
|
|
137
136
|
}, 1024))), 128))
|
|
138
|
-
])) :
|
|
139
|
-
i(
|
|
137
|
+
])) : k("", !0),
|
|
138
|
+
i(ve, {
|
|
140
139
|
transition: "fade",
|
|
141
|
-
"onClick:outside": l(
|
|
140
|
+
"onClick:outside": l(U),
|
|
142
141
|
modelValue: l(s),
|
|
143
142
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => z(s) ? s.value = t : null),
|
|
144
143
|
activator: "parent",
|
|
@@ -146,38 +145,38 @@ const Ie = {
|
|
|
146
145
|
"parent-ref": D.value,
|
|
147
146
|
location: "bottom",
|
|
148
147
|
origin: "bottom left",
|
|
149
|
-
onHandleEscape:
|
|
148
|
+
onHandleEscape: Z,
|
|
150
149
|
"close-on-content-click": e.closeOnSelect,
|
|
151
150
|
width: "w-full",
|
|
152
151
|
"max-height": e.maxHeight,
|
|
153
152
|
"hide-details": e.hideDetails
|
|
154
153
|
}, {
|
|
155
154
|
default: n(() => [
|
|
156
|
-
i(
|
|
157
|
-
"onClick:select": l(
|
|
155
|
+
i(he, {
|
|
156
|
+
"onClick:select": l(q),
|
|
158
157
|
ref_key: "listRef",
|
|
159
158
|
ref: _,
|
|
160
|
-
onKeyDown:
|
|
159
|
+
onKeyDown: oe,
|
|
161
160
|
selectable: !0
|
|
162
161
|
}, {
|
|
163
162
|
default: n(() => [
|
|
164
|
-
l(
|
|
163
|
+
l(Y) ? (r(), d(V, { key: 0 }, {
|
|
165
164
|
default: n(() => [
|
|
166
|
-
i(
|
|
167
|
-
onClick: l(
|
|
165
|
+
i(Ce, {
|
|
166
|
+
onClick: l(J),
|
|
168
167
|
class: "w-full",
|
|
169
168
|
bgColor: "bg-green-500"
|
|
170
169
|
}, {
|
|
171
170
|
default: n(() => o[2] || (o[2] = [
|
|
172
|
-
|
|
171
|
+
v(" Crear item ")
|
|
173
172
|
])),
|
|
174
173
|
_: 1,
|
|
175
174
|
__: [2]
|
|
176
175
|
}, 8, ["onClick"])
|
|
177
176
|
]),
|
|
178
177
|
_: 1
|
|
179
|
-
})) :
|
|
180
|
-
i(
|
|
178
|
+
})) : k("", !0),
|
|
179
|
+
i(pe, {
|
|
181
180
|
items: I.value,
|
|
182
181
|
search: l(c),
|
|
183
182
|
"searchable-keys": u.searchableKeys,
|
|
@@ -186,13 +185,13 @@ const Ie = {
|
|
|
186
185
|
enabled: l(s),
|
|
187
186
|
"item-height": 48
|
|
188
187
|
}, {
|
|
189
|
-
default: n(({ item: t, index: h, empty:
|
|
188
|
+
default: n(({ item: t, index: h, empty: ie }) => {
|
|
190
189
|
var M, x;
|
|
191
190
|
return [
|
|
192
|
-
!
|
|
191
|
+
!ie && t ? (r(), d(V, {
|
|
193
192
|
value: t,
|
|
194
193
|
key: ((M = t.id) == null ? void 0 : M.toString()) ?? t.name,
|
|
195
|
-
disabled: l(
|
|
194
|
+
disabled: l(Q)(t),
|
|
196
195
|
"bg-items": e.bgItemListColor,
|
|
197
196
|
"hover-bg": e.hoverItemListColor,
|
|
198
197
|
activeClass: e.selectedItemListColor,
|
|
@@ -203,7 +202,7 @@ const Ie = {
|
|
|
203
202
|
default: n(() => [
|
|
204
203
|
i(E, { class: "text-wrap" }, {
|
|
205
204
|
default: n(() => [
|
|
206
|
-
|
|
205
|
+
v(F(l(S)(t, e.itemTitle ?? l(P), "hasDefault")), 1)
|
|
207
206
|
]),
|
|
208
207
|
_: 2
|
|
209
208
|
}, 1024),
|
|
@@ -219,7 +218,7 @@ const Ie = {
|
|
|
219
218
|
default: n(() => [
|
|
220
219
|
i(E, { class: "text-center w-full text-gray-500" }, {
|
|
221
220
|
default: n(() => o[3] || (o[3] = [
|
|
222
|
-
|
|
221
|
+
v(" No hay elementos disponibles ")
|
|
223
222
|
])),
|
|
224
223
|
_: 1,
|
|
225
224
|
__: [3]
|
|
@@ -245,18 +244,18 @@ const Ie = {
|
|
|
245
244
|
fn: n(() => [
|
|
246
245
|
e.clearable && a.value ? (r(), d(y, {
|
|
247
246
|
key: 0,
|
|
248
|
-
onClick: l(
|
|
247
|
+
onClick: l(L),
|
|
249
248
|
size: "small",
|
|
250
249
|
color: "error",
|
|
251
250
|
icon: l(m).close,
|
|
252
251
|
class: "mr-1 mt-1"
|
|
253
|
-
}, null, 8, ["onClick", "icon"])) :
|
|
252
|
+
}, null, 8, ["onClick", "icon"])) : k("", !0),
|
|
254
253
|
i(y, {
|
|
255
254
|
color: "teal-darken-1",
|
|
256
255
|
size: "large",
|
|
257
256
|
class: "cursor-pointer",
|
|
258
257
|
icon: l(s) ? l(m).menuUpOutline : l(m).menuDownOutline,
|
|
259
|
-
onClick:
|
|
258
|
+
onClick: me(l(C), ["stop"])
|
|
260
259
|
}, null, 8, ["icon", "onClick"]),
|
|
261
260
|
e.required ? (r(), d(y, {
|
|
262
261
|
key: 1,
|
|
@@ -264,7 +263,7 @@ const Ie = {
|
|
|
264
263
|
size: "x-small",
|
|
265
264
|
class: "mb-4",
|
|
266
265
|
icon: l(m).asterisk
|
|
267
|
-
}, null, 8, ["icon"])) :
|
|
266
|
+
}, null, 8, ["icon"])) : k("", !0)
|
|
268
267
|
]),
|
|
269
268
|
key: "0"
|
|
270
269
|
} : void 0
|
|
@@ -273,5 +272,5 @@ const Ie = {
|
|
|
273
272
|
}
|
|
274
273
|
};
|
|
275
274
|
export {
|
|
276
|
-
|
|
275
|
+
Le as default
|
|
277
276
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as a, computed as
|
|
2
|
-
import { isArray as
|
|
3
|
-
function Q(n, h,
|
|
4
|
-
const
|
|
1
|
+
import { ref as a, computed as E, watch as G, nextTick as M } from "vue";
|
|
2
|
+
import { isArray as b, isObject as v, fullCopy as H } from "../../../../utils/utils.js";
|
|
3
|
+
function Q(n, h, c, o) {
|
|
4
|
+
const i = a(null), s = a(null), g = a(null), r = a(!1), d = a(""), F = (e, t) => t.split(".").reduce((u, l) => u && u[l] !== void 0 ? u[l] : null, e), N = E(() => i.value ? b(i.value) ? i.value.length ? x(i.value, n.itemTitle, "hasDefault") : n.placeholderText : v(i.value) ? x(i.value, n.itemTitle, "hasDefault") : i.value.toString() : o.value.length ? n.placeholderText : n.textNoItems), V = E(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
|
|
5
5
|
function x(e, t, u) {
|
|
6
6
|
if (v(e)) {
|
|
7
7
|
if (t) {
|
|
8
|
-
if (
|
|
8
|
+
if (b(t))
|
|
9
9
|
return t.map((l) => e[l] ?? "No definido").join(" - ");
|
|
10
10
|
if (t.includes(","))
|
|
11
11
|
return t.split(",").map((l) => e[l]).join(" - ");
|
|
12
12
|
if (t.includes(".")) {
|
|
13
13
|
const l = t.split(".");
|
|
14
14
|
let f = e;
|
|
15
|
-
for (const
|
|
16
|
-
f = f[
|
|
15
|
+
for (const O of l)
|
|
16
|
+
f = f[O];
|
|
17
17
|
return f;
|
|
18
18
|
}
|
|
19
19
|
return !n.returnObject && typeof e[t] == "number" || e[t] !== void 0 && e[t] !== null ? e[t].toString() : "";
|
|
@@ -21,43 +21,46 @@ function Q(n, h, i, o) {
|
|
|
21
21
|
if (u)
|
|
22
22
|
return Object.values(e)[0];
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return b(e) ? n.returnObject ? e.map((l) => l[t]).join(" - ") : e.map((l) => l).join(" - ") : u && typeof e != "number" && e.includes(",") ? e.split(",") : e;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function B(e) {
|
|
27
27
|
try {
|
|
28
28
|
let t = null;
|
|
29
|
-
if (
|
|
30
|
-
n.returnObject ? t = e : v(e) ? n.itemValue ? t = e[n.itemValue] : t = Object.values(e)[0] : t = e,
|
|
31
|
-
else if (
|
|
32
|
-
e &&
|
|
29
|
+
if (i.value = H(e), !n.multiple)
|
|
30
|
+
n.returnObject ? t = e : v(e) ? n.itemValue ? t = e[n.itemValue] : t = Object.values(e)[0] : t = e, r.value = !1;
|
|
31
|
+
else if (j(e))
|
|
32
|
+
e && y(e);
|
|
33
33
|
else {
|
|
34
34
|
const u = n.returnObject ? e : v(e) ? n.itemValue ? e[n.itemValue] : Object.values(e)[0] : e;
|
|
35
|
-
t = [...
|
|
35
|
+
t = [...c.value || [], u];
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
c.value === t ? h("update:modelValue", t) : c.value = t, h("selectedItem", i.value);
|
|
38
38
|
} catch (t) {
|
|
39
39
|
console.log(t);
|
|
40
40
|
} finally {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
M(() => {
|
|
42
|
+
S();
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
G(
|
|
47
|
+
[() => c.value, () => o.value],
|
|
48
|
+
([e]) => {
|
|
49
|
+
const t = R(e);
|
|
50
|
+
JSON.stringify(i.value) !== JSON.stringify(t) && (i.value = t);
|
|
51
|
+
},
|
|
52
|
+
{ immediate: !0 }
|
|
53
|
+
);
|
|
54
|
+
function R(e) {
|
|
52
55
|
return e == null ? null : n.returnObject ? e : n.multiple && Array.isArray(e) ? e.map((u) => o.value.find((l) => l[n.itemValue] === u)).filter(Boolean) : o.value.find((u) => u[n.itemValue] === e) || null;
|
|
53
56
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
57
|
+
function j(e) {
|
|
58
|
+
return c.value === null ? !1 : e ? c.value.some(
|
|
56
59
|
(t) => n.returnObject ? t[n.itemValue] === e[n.itemValue] : t === e[n.itemValue]
|
|
57
60
|
) : !0;
|
|
58
61
|
}
|
|
59
|
-
function
|
|
60
|
-
let t =
|
|
62
|
+
function y(e) {
|
|
63
|
+
let t = c.value;
|
|
61
64
|
if (n.returnObject) {
|
|
62
65
|
const u = t.find(
|
|
63
66
|
(f) => f[n.itemValue] === e[n.itemValue]
|
|
@@ -68,75 +71,75 @@ function Q(n, h, i, o) {
|
|
|
68
71
|
t.splice(u, 1);
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
function
|
|
72
|
-
n.clearSearchOnSelect && (d.value = ""), n.clearOnSelect &&
|
|
74
|
+
function S(e) {
|
|
75
|
+
n.clearSearchOnSelect && (d.value = ""), n.clearOnSelect && A(), n.focusOnSelect && m();
|
|
73
76
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
77
|
+
function T() {
|
|
78
|
+
r.value || (r.value = !0);
|
|
76
79
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
80
|
+
function C() {
|
|
81
|
+
r.value && (r.value = !1);
|
|
79
82
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
83
|
+
function D() {
|
|
84
|
+
r.value = !r.value;
|
|
82
85
|
}
|
|
83
|
-
function
|
|
86
|
+
function I(e) {
|
|
84
87
|
return e.length === 1 && e.match(/\w/);
|
|
85
88
|
}
|
|
86
|
-
function
|
|
89
|
+
function m() {
|
|
87
90
|
s.value.inputField.focus();
|
|
88
91
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
92
|
+
function J() {
|
|
93
|
+
r.value = !0, g.value && s.value.$el.focus();
|
|
91
94
|
}
|
|
92
|
-
function
|
|
95
|
+
function K(e) {
|
|
93
96
|
const t = e.key;
|
|
94
|
-
(
|
|
97
|
+
(I(t) || t === "Backspace") && (T(), m(), M(() => {
|
|
95
98
|
var l;
|
|
96
99
|
const u = (l = s.value) == null ? void 0 : l.inputField;
|
|
97
100
|
if (u) {
|
|
98
|
-
const f = u.selectionStart,
|
|
99
|
-
u.value =
|
|
101
|
+
const f = u.selectionStart, O = u.selectionEnd, k = u.value, w = e.key.length === 1 ? e.key : "";
|
|
102
|
+
u.value = k.slice(0, f) + w + k.slice(O), u.selectionStart = u.selectionEnd = f + w.length, u.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
100
103
|
}
|
|
101
104
|
}));
|
|
102
105
|
}
|
|
103
|
-
function
|
|
104
|
-
|
|
106
|
+
function $() {
|
|
107
|
+
r.value = !1, h("createItem");
|
|
105
108
|
}
|
|
106
|
-
function
|
|
107
|
-
let t =
|
|
108
|
-
|
|
109
|
+
function q(e) {
|
|
110
|
+
let t = c.value.indexOf(e);
|
|
111
|
+
c.value.splice(t, 1);
|
|
109
112
|
}
|
|
110
|
-
function
|
|
111
|
-
console.log(
|
|
113
|
+
function A() {
|
|
114
|
+
console.log(c.value), d.value !== "" && (d.value = ""), c.value !== null && (c.value = null), i.value !== null && (i.value = null);
|
|
112
115
|
}
|
|
113
|
-
function
|
|
116
|
+
function z(e) {
|
|
114
117
|
return !!e.disabled;
|
|
115
118
|
}
|
|
116
119
|
return {
|
|
117
|
-
selectedItem:
|
|
120
|
+
selectedItem: i,
|
|
118
121
|
textFieldRef: s,
|
|
119
122
|
listRef: g,
|
|
120
|
-
menuModel:
|
|
123
|
+
menuModel: r,
|
|
121
124
|
search: d,
|
|
122
|
-
getItemText:
|
|
123
|
-
placeholder:
|
|
124
|
-
textArr:
|
|
125
|
+
getItemText: F,
|
|
126
|
+
placeholder: N,
|
|
127
|
+
textArr: V,
|
|
125
128
|
itemToString: x,
|
|
126
|
-
getSelectedItem:
|
|
127
|
-
checkIfValueExist:
|
|
128
|
-
removeFromArray:
|
|
129
|
-
lightReset:
|
|
130
|
-
openMenu:
|
|
131
|
-
closeMenu:
|
|
132
|
-
toggleMenu:
|
|
133
|
-
focusOnMenu:
|
|
134
|
-
onMenuKeydown:
|
|
135
|
-
createItem:
|
|
136
|
-
removeItem:
|
|
137
|
-
clearSelection:
|
|
138
|
-
checkDisabled:
|
|
139
|
-
isAlphanumeric:
|
|
129
|
+
getSelectedItem: B,
|
|
130
|
+
checkIfValueExist: j,
|
|
131
|
+
removeFromArray: y,
|
|
132
|
+
lightReset: S,
|
|
133
|
+
openMenu: T,
|
|
134
|
+
closeMenu: C,
|
|
135
|
+
toggleMenu: D,
|
|
136
|
+
focusOnMenu: J,
|
|
137
|
+
onMenuKeydown: K,
|
|
138
|
+
createItem: $,
|
|
139
|
+
removeItem: q,
|
|
140
|
+
clearSelection: A,
|
|
141
|
+
checkDisabled: z,
|
|
142
|
+
isAlphanumeric: I
|
|
140
143
|
};
|
|
141
144
|
}
|
|
142
145
|
export {
|