@jblehm/super-list 1.0.30 → 1.0.32
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/README.md +1 -1
- package/dist/index.css +1 -1
- package/dist/super-list.js +280 -274
- package/dist/super-list.js.map +1 -1
- package/dist/super-list.umd.cjs +2 -2
- package/dist/super-list.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/super-list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './index.css';class
|
|
1
|
+
import { defineComponent as G, ref as f, computed as O, createElementBlock as M, openBlock as T, withModifiers as Z, createElementVNode as F, normalizeClass as P, withKeys as h, useTemplateRef as ke, watch as A, Fragment as ce, createCommentVNode as $, renderList as Ee, createBlock as fe, toDisplayString as ve, useCssVars as Se, onMounted as we, onUnmounted as Ae, renderSlot as Le, createVNode as Y, nextTick as Fe, resolveDynamicComponent as Ne, withCtx as me } from "vue";
|
|
2
|
+
import './index.css';class Be {
|
|
3
3
|
eventsTypes = ["resize", "load", "scroll", "wheel", "touchmove"];
|
|
4
4
|
config = {
|
|
5
5
|
attributes: !0,
|
|
@@ -46,13 +46,13 @@ import './index.css';class He {
|
|
|
46
46
|
window.removeEventListener("resize", this.callbackFunction);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return s != null ? s(e) : e == null ? "" : typeof e == "object" ? e[a] : v ?
|
|
49
|
+
function He(e, s, a, v) {
|
|
50
|
+
return s != null ? s(e) : e == null ? "" : typeof e == "object" ? e[a] : v ? Re(e, v) : "" + e;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Re(e, s) {
|
|
53
53
|
return s.find((a) => a.type === e)?.label ?? "";
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class Pe {
|
|
56
56
|
constructor() {
|
|
57
57
|
this.abortController = new AbortController(), this.func = () => {
|
|
58
58
|
}, this.then = () => {
|
|
@@ -79,7 +79,7 @@ class qe {
|
|
|
79
79
|
return this.abort("New Request From Controller."), this.setFunc(s), this.setThen(a), this.execute();
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const qe = ["tabindex", "placeholder", "size"], je = /* @__PURE__ */ G({
|
|
83
83
|
__name: "ListTextInput",
|
|
84
84
|
props: {
|
|
85
85
|
enableTextFilter: {
|
|
@@ -109,76 +109,81 @@ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Y({
|
|
|
109
109
|
"update:press": null
|
|
110
110
|
},
|
|
111
111
|
setup(e, { expose: s, emit: a }) {
|
|
112
|
-
const v = a, o = e,
|
|
113
|
-
function w(
|
|
114
|
-
"sourceCapabilities" in
|
|
112
|
+
const v = a, o = e, p = f(null);
|
|
113
|
+
function w(g) {
|
|
114
|
+
"sourceCapabilities" in g && g.sourceCapabilities == null ? o.parentMethods.closeList() : o.parentMethods.openList();
|
|
115
115
|
}
|
|
116
|
-
function t(
|
|
117
|
-
o.parentMethods.unfocus(
|
|
116
|
+
function t(g) {
|
|
117
|
+
o.parentMethods.unfocus(g);
|
|
118
118
|
}
|
|
119
|
-
function i(
|
|
120
|
-
|
|
119
|
+
function i(g) {
|
|
120
|
+
g?.target?.value != null && v("update:query", g.target.value);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
return
|
|
122
|
+
const d = O(() => {
|
|
123
|
+
const g = p?.value ? p.value.length : 0, m = o.placeholder?.length || 0;
|
|
124
|
+
return g > 0 ? g : m > 0 ? m : 5;
|
|
125
125
|
}), r = O(() => o.enableButtonClick === !0 && o.enableTextFilter === !0 ? "" : "click-through"), y = O(() => o.showDropDown && !o.enableTextFilter || !o.showDropDown ? "dark-placeholder-text" : "light-placeholder-text");
|
|
126
126
|
function k() {
|
|
127
|
-
if (
|
|
128
|
-
const
|
|
129
|
-
|
|
127
|
+
if (p?.value) {
|
|
128
|
+
const g = p.value;
|
|
129
|
+
g.blur(), g.value = "";
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
function I() {
|
|
133
|
-
|
|
133
|
+
p?.value && p.value.focus();
|
|
134
134
|
}
|
|
135
|
-
return s({ blurInput: k, focusInput: I, textInputRef:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
135
|
+
return s({ blurInput: k, focusInput: I, textInputRef: p }), (g, m) => (T(), M("form", {
|
|
136
|
+
onSubmit: m[8] || (m[8] = Z(() => {
|
|
137
|
+
}, ["prevent"]))
|
|
138
|
+
}, [
|
|
139
|
+
F("input", {
|
|
140
|
+
ref_key: "textInputRef",
|
|
141
|
+
ref: p,
|
|
142
|
+
tabindex: e.enableTextFilter ? 0 : -1,
|
|
143
|
+
onKeydown: [
|
|
144
|
+
m[0] || (m[0] = h((b) => e.parentMethods.press(b), ["enter"])),
|
|
145
|
+
m[1] || (m[1] = h((b) => e.parentMethods.press(), ["space"])),
|
|
146
|
+
m[2] || (m[2] = h((b) => e.parentMethods.press(b), ["esc"])),
|
|
147
|
+
m[3] || (m[3] = h((b) => e.parentMethods.press(b), ["up"])),
|
|
148
|
+
m[4] || (m[4] = h((b) => e.parentMethods.press(b), ["down"]))
|
|
149
|
+
],
|
|
150
|
+
onFocusin: m[5] || (m[5] = (b) => w(b)),
|
|
151
|
+
onFocusout: m[6] || (m[6] = (b) => t(b)),
|
|
152
|
+
onInput: m[7] || (m[7] = (b) => i(b)),
|
|
153
|
+
type: "text",
|
|
154
|
+
"aria-autocomplete": "none",
|
|
155
|
+
autocomplete: "off",
|
|
156
|
+
placeholder: e.placeholder,
|
|
157
|
+
size: d.value,
|
|
158
|
+
class: P([[
|
|
159
|
+
r.value,
|
|
160
|
+
y.value,
|
|
161
|
+
{ "text-filter-disabled": !e.enableTextFilter }
|
|
162
|
+
], "list-filter-text-input"])
|
|
163
|
+
}, null, 42, qe)
|
|
164
|
+
], 32));
|
|
160
165
|
}
|
|
161
166
|
}), K = (e, s) => {
|
|
162
167
|
const a = e.__vccOpts || e;
|
|
163
168
|
for (const [v, o] of s)
|
|
164
169
|
a[v] = o;
|
|
165
170
|
return a;
|
|
166
|
-
},
|
|
171
|
+
}, be = /* @__PURE__ */ K(je, [["__scopeId", "data-v-97ab9870"]]), $e = {}, Ke = {
|
|
167
172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
168
173
|
fill: "currentColor",
|
|
169
174
|
"aria-hidden": "true",
|
|
170
175
|
"data-slot": "icon",
|
|
171
176
|
viewBox: "0 -16 16 17"
|
|
172
177
|
};
|
|
173
|
-
function
|
|
174
|
-
return T(), M("svg",
|
|
175
|
-
|
|
178
|
+
function Ve(e, s) {
|
|
179
|
+
return T(), M("svg", Ke, s[0] || (s[0] = [
|
|
180
|
+
F("path", {
|
|
176
181
|
"shape-rendering": "geometricPrecision",
|
|
177
182
|
d: "M 6 -2.25 L 13.75 -14 A 0.5 0.5 90 0 1 15 -13 L 6.5 -0.5 A 2 1 90 0 1 5.5 -0.5 L 1 -6 A 0.5 0.5 90 0 1 2.25 -7 Z"
|
|
178
183
|
}, null, -1)
|
|
179
184
|
]));
|
|
180
185
|
}
|
|
181
|
-
const
|
|
186
|
+
const ze = /* @__PURE__ */ K($e, [["render", Ve]]), Xe = ["onMousedown"], Ue = { class: "list-item-span" }, Je = { class: "list-item-span" }, We = /* @__PURE__ */ G({
|
|
182
187
|
__name: "ListItem",
|
|
183
188
|
props: {
|
|
184
189
|
mouseHoveringOnList: {
|
|
@@ -215,7 +220,7 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
|
|
|
215
220
|
}
|
|
216
221
|
},
|
|
217
222
|
setup(e) {
|
|
218
|
-
const s = e, a =
|
|
223
|
+
const s = e, a = ke("items"), v = O(() => {
|
|
219
224
|
if (!a?.value) return null;
|
|
220
225
|
const t = (Array.isArray(a.value) ? a.value : [a.value])[s.focusedIndex];
|
|
221
226
|
return t && typeof t == "object" && "scrollIntoView" in t && typeof t.scrollIntoView == "function" ? t : null;
|
|
@@ -225,91 +230,91 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
|
|
|
225
230
|
() => o()
|
|
226
231
|
), A(
|
|
227
232
|
() => s.listElementOpenAndVisible,
|
|
228
|
-
() =>
|
|
233
|
+
() => p()
|
|
229
234
|
), A(
|
|
230
235
|
() => v.value,
|
|
231
|
-
() =>
|
|
236
|
+
() => p()
|
|
232
237
|
);
|
|
233
238
|
function o() {
|
|
234
239
|
!s.showDropDown || !v?.value?.parentElement?.parentElement || (v.value.parentElement.parentElement.scrollTop = v.value.offsetTop);
|
|
235
240
|
}
|
|
236
|
-
function
|
|
241
|
+
function p() {
|
|
237
242
|
const w = v.value, t = w?.parentElement?.parentElement;
|
|
238
243
|
if (!s.showDropDown || !w || !t) return;
|
|
239
|
-
const i = w.offsetTop - t.scrollTop < 0,
|
|
240
|
-
i && (t.scrollTop = w.offsetTop),
|
|
244
|
+
const i = w.offsetTop - t.scrollTop < 0, d = w.offsetTop + w.offsetHeight - t.scrollTop > t.clientHeight;
|
|
245
|
+
i && (t.scrollTop = w.offsetTop), d && (t.scrollTop = w.offsetTop + w.clientHeight - t.clientHeight);
|
|
241
246
|
}
|
|
242
247
|
return (w, t) => (T(), M(ce, null, [
|
|
243
|
-
(T(!0), M(ce, null,
|
|
244
|
-
key:
|
|
248
|
+
(T(!0), M(ce, null, Ee(e.filteredListItems, (i, d) => (T(), M("li", {
|
|
249
|
+
key: d,
|
|
245
250
|
ref_for: !0,
|
|
246
251
|
ref: "items",
|
|
247
252
|
onKeyup: [
|
|
248
|
-
t[0] || (t[0] =
|
|
249
|
-
t[1] || (t[1] =
|
|
250
|
-
t[2] || (t[2] =
|
|
253
|
+
t[0] || (t[0] = h((r) => e.parentMethods.press(r), ["enter"])),
|
|
254
|
+
t[1] || (t[1] = h((r) => e.parentMethods.press(r), ["space"])),
|
|
255
|
+
t[2] || (t[2] = h((r) => e.parentMethods.press(r), ["esc"]))
|
|
251
256
|
],
|
|
252
257
|
onKeydown: [
|
|
253
|
-
t[3] || (t[3] =
|
|
254
|
-
t[4] || (t[4] =
|
|
258
|
+
t[3] || (t[3] = h((r) => e.parentMethods.press(r), ["up"])),
|
|
259
|
+
t[4] || (t[4] = h((r) => e.parentMethods.press(r), ["down"]))
|
|
255
260
|
],
|
|
256
261
|
onFocusout: t[5] || (t[5] = (r) => e.parentMethods.unfocus(r)),
|
|
257
262
|
tabindex: "-1",
|
|
258
|
-
onMousedown:
|
|
259
|
-
class:
|
|
260
|
-
{ "list-option-selected": e.selectedIndex ===
|
|
263
|
+
onMousedown: Z((r) => e.parentMethods.updatedSelected(i), ["left"]),
|
|
264
|
+
class: P([
|
|
265
|
+
{ "list-option-selected": e.selectedIndex === d },
|
|
261
266
|
{
|
|
262
|
-
"list-option-active": e.filteredListItems.length === 1 || e.focusedIndex ===
|
|
267
|
+
"list-option-active": e.filteredListItems.length === 1 || e.focusedIndex === d && !e.mouseHoveringOnList
|
|
263
268
|
},
|
|
264
269
|
"list-option"
|
|
265
270
|
])
|
|
266
271
|
}, [
|
|
267
|
-
|
|
268
|
-
e.selectedIndex ===
|
|
272
|
+
F("span", Ue, ve(e.parentMethods.getLabel(i)), 1),
|
|
273
|
+
e.selectedIndex === d ? (T(), fe(ze, {
|
|
269
274
|
key: 0,
|
|
270
275
|
class: "list-item-icon",
|
|
271
276
|
"aria-hidden": "true"
|
|
272
277
|
})) : $("", !0)
|
|
273
|
-
], 42,
|
|
278
|
+
], 42, Xe))), 128)),
|
|
274
279
|
e.filteredListItems.length === 0 ? (T(), M("li", {
|
|
275
280
|
key: 0,
|
|
276
281
|
onKeyup: [
|
|
277
|
-
t[6] || (t[6] =
|
|
278
|
-
t[7] || (t[7] =
|
|
279
|
-
t[8] || (t[8] =
|
|
282
|
+
t[6] || (t[6] = h((i) => e.parentMethods.press(i), ["enter"])),
|
|
283
|
+
t[7] || (t[7] = h((i) => e.parentMethods.press(i), ["space"])),
|
|
284
|
+
t[8] || (t[8] = h((i) => e.parentMethods.press(i), ["esc"]))
|
|
280
285
|
],
|
|
281
286
|
onKeydown: [
|
|
282
|
-
t[9] || (t[9] =
|
|
283
|
-
t[10] || (t[10] =
|
|
287
|
+
t[9] || (t[9] = h((i) => e.parentMethods.press(i), ["up"])),
|
|
288
|
+
t[10] || (t[10] = h((i) => e.parentMethods.press(i), ["down"]))
|
|
284
289
|
],
|
|
285
290
|
onFocusout: t[11] || (t[11] = (i) => e.parentMethods.unfocus(i)),
|
|
286
|
-
onMousedown: t[12] || (t[12] =
|
|
291
|
+
onMousedown: t[12] || (t[12] = Z((i) => e.parentMethods.closeList(i), ["left"])),
|
|
287
292
|
tabindex: "-1",
|
|
288
293
|
class: "list-option-message"
|
|
289
294
|
}, t[20] || (t[20] = [
|
|
290
|
-
|
|
295
|
+
F("span", { class: "list-item-span" }, "No Items To Display.", -1)
|
|
291
296
|
]), 32)) : $("", !0),
|
|
292
297
|
e.totalOptionsCount && e.totalOptionsCount > (e.filteredListItems?.length || 0) ? (T(), M("li", {
|
|
293
298
|
key: 1,
|
|
294
299
|
onKeyup: [
|
|
295
|
-
t[13] || (t[13] =
|
|
296
|
-
t[14] || (t[14] =
|
|
297
|
-
t[15] || (t[15] =
|
|
300
|
+
t[13] || (t[13] = h((i) => e.parentMethods.press(i), ["enter"])),
|
|
301
|
+
t[14] || (t[14] = h((i) => e.parentMethods.press(i), ["space"])),
|
|
302
|
+
t[15] || (t[15] = h((i) => e.parentMethods.press(i), ["esc"]))
|
|
298
303
|
],
|
|
299
304
|
onKeydown: [
|
|
300
|
-
t[16] || (t[16] =
|
|
301
|
-
t[17] || (t[17] =
|
|
305
|
+
t[16] || (t[16] = h((i) => e.parentMethods.press(i), ["up"])),
|
|
306
|
+
t[17] || (t[17] = h((i) => e.parentMethods.press(i), ["down"]))
|
|
302
307
|
],
|
|
303
308
|
onFocusout: t[18] || (t[18] = (i) => e.parentMethods.unfocus(i)),
|
|
304
|
-
onMousedown: t[19] || (t[19] =
|
|
309
|
+
onMousedown: t[19] || (t[19] = Z((i) => e.parentMethods.closeList(i), ["left"])),
|
|
305
310
|
tabindex: "-1",
|
|
306
311
|
class: "list-option-message"
|
|
307
312
|
}, [
|
|
308
|
-
|
|
313
|
+
F("span", Je, " +" + ve(e.totalOptionsCount - e.filteredListItems?.length || 0) + " More Items...", 1)
|
|
309
314
|
], 32)) : $("", !0)
|
|
310
315
|
], 64));
|
|
311
316
|
}
|
|
312
|
-
}),
|
|
317
|
+
}), Qe = /* @__PURE__ */ K(We, [["__scopeId", "data-v-e4eeb2f7"]]), Ze = /* @__PURE__ */ G({
|
|
313
318
|
__name: "ItemList",
|
|
314
319
|
props: {
|
|
315
320
|
mouseHoveringOnList: {
|
|
@@ -359,53 +364,53 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
|
|
|
359
364
|
},
|
|
360
365
|
emits: ["reverseDropDownList"],
|
|
361
366
|
setup(e, { expose: s, emit: a }) {
|
|
362
|
-
|
|
367
|
+
Se((u) => ({
|
|
363
368
|
"8d801350": k.value,
|
|
364
|
-
"2724698a":
|
|
369
|
+
"2724698a": N.value,
|
|
365
370
|
"27246d4b": se.value,
|
|
366
|
-
ffcaa9a8:
|
|
367
|
-
"414dd276":
|
|
371
|
+
ffcaa9a8: j.value,
|
|
372
|
+
"414dd276": _.value
|
|
368
373
|
}));
|
|
369
|
-
const v = a, o = e,
|
|
374
|
+
const v = a, o = e, p = f(null), w = f(null), t = f(null), i = f(0), d = f(0), r = f(0), y = f(0), k = f("0px"), I = f(!1), g = f([]), m = f(0), b = O(() => !I.value || window?.innerHeight == null ? !1 : U() && le()), V = O(() => o.maxListHeightPX >= m.value);
|
|
370
375
|
A(
|
|
371
|
-
() =>
|
|
376
|
+
() => b.value,
|
|
372
377
|
(u) => v("reverseDropDownList", u),
|
|
373
378
|
{ immediate: !0 }
|
|
374
379
|
);
|
|
375
|
-
const
|
|
380
|
+
const N = O(() => i.value + "px"), se = O(() => y.value + "px");
|
|
376
381
|
s({ listContainerRef: t });
|
|
377
|
-
const
|
|
382
|
+
const q = (u) => {
|
|
378
383
|
u?.key && u.key === " " && u.preventDefault();
|
|
379
384
|
}, ie = (u) => {
|
|
380
385
|
const L = t?.value, x = u.target;
|
|
381
386
|
(!(L && x && L.contains(x)) || L.isEqualNode(x)) && o.parentMethods.focusInput();
|
|
382
387
|
};
|
|
383
|
-
function
|
|
388
|
+
function H() {
|
|
384
389
|
return w?.value ? (w?.value).clientHeight : 0;
|
|
385
390
|
}
|
|
386
391
|
function E() {
|
|
387
|
-
if (!I.value ||
|
|
388
|
-
const u =
|
|
392
|
+
if (!I.value || H() === 0) return o.maxListHeightPX;
|
|
393
|
+
const u = H() === 0 ? o.maxListHeightPX : +H();
|
|
389
394
|
return o.maxListHeightPX && o.maxListHeightPX > u ? u : o.maxListHeightPX;
|
|
390
395
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
396
|
+
function U() {
|
|
397
|
+
return d.value > E();
|
|
393
398
|
}
|
|
394
399
|
function le() {
|
|
395
400
|
return r.value < E();
|
|
396
401
|
}
|
|
397
|
-
const
|
|
402
|
+
const _ = O(() => (o.maxListHeightPX || 0) + "px"), j = O(() => (o.listAnimationDurationMs || 0) + "ms"), ee = O(() => o.blockListChange ? g.value : o.filteredListItems);
|
|
398
403
|
A(
|
|
399
|
-
() =>
|
|
404
|
+
() => ee,
|
|
400
405
|
(u) => {
|
|
401
|
-
u && (
|
|
406
|
+
u && (g.value = u.value);
|
|
402
407
|
},
|
|
403
408
|
{ immediate: !1, deep: !0 }
|
|
404
409
|
);
|
|
405
410
|
let C = setTimeout(() => {
|
|
406
411
|
}, 0), S = null;
|
|
407
|
-
function
|
|
408
|
-
|
|
412
|
+
function B() {
|
|
413
|
+
m.value = H(), clearTimeout(C), S && S.observe(), I.value = !0, z(void 0);
|
|
409
414
|
}
|
|
410
415
|
function re() {
|
|
411
416
|
clearTimeout(C), C = setTimeout(() => {
|
|
@@ -415,78 +420,78 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
|
|
|
415
420
|
A(
|
|
416
421
|
() => o.showDropDown,
|
|
417
422
|
(u, L) => {
|
|
418
|
-
u !== L && (
|
|
423
|
+
u !== L && (J(), u ? B() : re());
|
|
419
424
|
},
|
|
420
425
|
{ immediate: !0 }
|
|
421
426
|
);
|
|
422
427
|
function z(u) {
|
|
423
|
-
|
|
428
|
+
J(), Fe(() => J()), te(u);
|
|
424
429
|
}
|
|
425
|
-
function
|
|
426
|
-
if (!o.enableScrollClose || !o.showDropDown || typeof t?.value?.contains != "function" || u?.target?.nodeType == null ||
|
|
430
|
+
function te(u) {
|
|
431
|
+
if (!o.enableScrollClose || !o.showDropDown || typeof t?.value?.contains != "function" || u?.target?.nodeType == null || ne(u)) return;
|
|
427
432
|
const x = ["scroll", "wheel", "touchmove"].includes(u?.type);
|
|
428
433
|
o.showDropDown && x && o.parentMethods.closeList();
|
|
429
434
|
}
|
|
430
|
-
function
|
|
431
|
-
const L = !!
|
|
432
|
-
return L || x ||
|
|
433
|
-
}
|
|
434
|
-
function U() {
|
|
435
|
-
J(), W();
|
|
435
|
+
function ne(u) {
|
|
436
|
+
const L = !!p.value?.contains(u?.target), x = !!t.value?.contains(u.target), X = [u?.srcElement?.id, u?.target?.id].includes("super-list-select-list");
|
|
437
|
+
return L || x || X;
|
|
436
438
|
}
|
|
437
439
|
function J() {
|
|
438
|
-
|
|
439
|
-
const u = d.value.getBoundingClientRect();
|
|
440
|
-
c.value = u.top, r.value = window.innerHeight - u.bottom, k.value = u.width + "px";
|
|
440
|
+
W(), Q();
|
|
441
441
|
}
|
|
442
442
|
function W() {
|
|
443
|
-
if (
|
|
444
|
-
const u =
|
|
445
|
-
|
|
443
|
+
if (p?.value == null) return;
|
|
444
|
+
const u = p.value.getBoundingClientRect();
|
|
445
|
+
d.value = u.top, r.value = window.innerHeight - u.bottom, k.value = u.width + "px";
|
|
446
|
+
}
|
|
447
|
+
function Q() {
|
|
448
|
+
if (p?.value == null || t?.value == null) return;
|
|
449
|
+
const u = oe().getBoundingClientRect(), L = t.value.getBoundingClientRect(), x = y.value, X = i.value;
|
|
450
|
+
b.value ? y.value = x - (u.top - L.bottom) : y.value = x - (L.top - u.bottom), i.value = X - (L.left - u.left);
|
|
446
451
|
}
|
|
447
452
|
function ue() {
|
|
448
|
-
return (
|
|
453
|
+
return (p?.value).getElementsByTagName("button")[0];
|
|
449
454
|
}
|
|
450
|
-
function
|
|
451
|
-
return
|
|
455
|
+
function oe() {
|
|
456
|
+
return p?.value;
|
|
452
457
|
}
|
|
453
|
-
return
|
|
454
|
-
S = new
|
|
455
|
-
}),
|
|
458
|
+
return we(() => {
|
|
459
|
+
S = new Be(z, ue()), setTimeout(() => z(void 0), 250);
|
|
460
|
+
}), Ae(() => {
|
|
456
461
|
S?.unobserve();
|
|
457
462
|
}), (u, L) => (T(), M(ce, null, [
|
|
458
|
-
|
|
463
|
+
F("div", {
|
|
459
464
|
ref_key: "dropDownButtonContainer",
|
|
460
|
-
ref:
|
|
465
|
+
ref: p,
|
|
461
466
|
class: "super-list-button-container"
|
|
462
467
|
}, [
|
|
463
|
-
|
|
468
|
+
Le(u.$slots, "default", {}, void 0, !0)
|
|
464
469
|
], 512),
|
|
465
|
-
|
|
470
|
+
F("div", {
|
|
466
471
|
id: "super-list-select-list",
|
|
467
472
|
ref_key: "listContainerRef",
|
|
468
473
|
ref: t,
|
|
469
474
|
onMouseenter: L[0] || (L[0] = (x) => e.parentMethods.mouseOverList()),
|
|
470
475
|
tabindex: "-1",
|
|
471
|
-
class:
|
|
476
|
+
class: P([
|
|
472
477
|
"select-list",
|
|
473
|
-
|
|
478
|
+
b.value ? "list-reverse" : "list-normal",
|
|
474
479
|
{ "select-list-open": e.showDropDown },
|
|
475
480
|
{ "no-scroll": V.value && I.value },
|
|
476
481
|
{ "select-list-fixed": I.value },
|
|
477
482
|
{ "select-list-scrollable": !V.value }
|
|
478
483
|
]),
|
|
479
|
-
onKeydown: L[1] || (L[1] =
|
|
480
|
-
onMouseup: L[2] || (L[2] =
|
|
484
|
+
onKeydown: L[1] || (L[1] = h((x) => q(x), ["space"])),
|
|
485
|
+
onMouseup: L[2] || (L[2] = Z((x) => ie(x), ["left"]))
|
|
481
486
|
}, [
|
|
482
|
-
|
|
487
|
+
F("ul", {
|
|
483
488
|
tabindex: "-1",
|
|
484
489
|
ref_key: "dropDownListUL",
|
|
485
490
|
ref: w,
|
|
486
491
|
class: "list-content"
|
|
487
492
|
}, [
|
|
488
|
-
|
|
489
|
-
filteredListItems:
|
|
493
|
+
Y(Qe, {
|
|
494
|
+
filteredListItems: g.value,
|
|
490
495
|
mouseHoveringOnList: e.mouseHoveringOnList,
|
|
491
496
|
focusedIndex: e.focusedIndex,
|
|
492
497
|
selectedIndex: e.selectedIndex,
|
|
@@ -499,25 +504,25 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
|
|
|
499
504
|
], 34)
|
|
500
505
|
], 64));
|
|
501
506
|
}
|
|
502
|
-
}),
|
|
507
|
+
}), he = /* @__PURE__ */ K(Ze, [["__scopeId", "data-v-e58cd48c"]]), Ye = {}, Ge = {
|
|
503
508
|
xmlns: "http://www.w3.org/2000/svg",
|
|
504
509
|
fill: "currentColor",
|
|
505
510
|
"aria-hidden": "true",
|
|
506
511
|
"data-slot": "icon",
|
|
507
512
|
viewBox: "0 0 12 6"
|
|
508
513
|
};
|
|
509
|
-
function
|
|
510
|
-
return T(), M("svg",
|
|
511
|
-
|
|
514
|
+
function _e(e, s) {
|
|
515
|
+
return T(), M("svg", Ge, s[0] || (s[0] = [
|
|
516
|
+
F("path", {
|
|
512
517
|
"shape-rendering": "geometricPrecision",
|
|
513
518
|
d: "M 6 4 L 10 0.25 A 0.5 0.5 90 0 1 11 1.25 L 6.5 5.75 A 15 3 90 0 1 5.5 5.75 L 1 1.25 A 0.5 0.5 90 0 1 2 0.25 Z"
|
|
514
519
|
}, null, -1)
|
|
515
520
|
]));
|
|
516
521
|
}
|
|
517
|
-
const
|
|
522
|
+
const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
|
|
518
523
|
key: 2,
|
|
519
524
|
class: "list-button-icon custom-icon"
|
|
520
|
-
},
|
|
525
|
+
}, nt = /* @__PURE__ */ G({
|
|
521
526
|
__name: "ListButton",
|
|
522
527
|
props: {
|
|
523
528
|
// eslint-disable-line
|
|
@@ -543,15 +548,15 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
|
|
|
543
548
|
}
|
|
544
549
|
},
|
|
545
550
|
setup(e, { expose: s }) {
|
|
546
|
-
const a = e, v =
|
|
551
|
+
const a = e, v = f(null);
|
|
547
552
|
function o() {
|
|
548
553
|
a.enableTextFilter || a.parentMethods.openList();
|
|
549
554
|
}
|
|
550
|
-
function d
|
|
551
|
-
a.enableTextFilter ? (a.parentMethods.focusInput(),
|
|
555
|
+
function p(d) {
|
|
556
|
+
a.enableTextFilter ? (a.parentMethods.focusInput(), d.stopPropagation(), d.preventDefault()) : a.parentMethods.press(d);
|
|
552
557
|
}
|
|
553
|
-
function w(
|
|
554
|
-
a.enableTextFilter || a.parentMethods.press(
|
|
558
|
+
function w(d) {
|
|
559
|
+
a.enableTextFilter || a.parentMethods.press(d);
|
|
555
560
|
}
|
|
556
561
|
function t() {
|
|
557
562
|
v?.value && v.value.blur();
|
|
@@ -559,48 +564,48 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
|
|
|
559
564
|
function i() {
|
|
560
565
|
v?.value && v.value.focus();
|
|
561
566
|
}
|
|
562
|
-
return s({ blurInput: t, focusInput: i, buttonRef: v }), (
|
|
567
|
+
return s({ blurInput: t, focusInput: i, buttonRef: v }), (d, r) => (T(), M("button", {
|
|
563
568
|
ref_key: "buttonRef",
|
|
564
569
|
ref: v,
|
|
565
570
|
tabindex: e.enableTextFilter ? -1 : 0,
|
|
566
571
|
onKeydown: [
|
|
567
|
-
r[0] || (r[0] =
|
|
568
|
-
r[1] || (r[1] =
|
|
569
|
-
r[2] || (r[2] =
|
|
570
|
-
r[3] || (r[3] =
|
|
571
|
-
r[4] || (r[4] =
|
|
572
|
+
r[0] || (r[0] = h((y) => p(y), ["enter"])),
|
|
573
|
+
r[1] || (r[1] = h((y) => w(y), ["space"])),
|
|
574
|
+
r[2] || (r[2] = h((y) => e.parentMethods.press(y), ["esc"])),
|
|
575
|
+
r[3] || (r[3] = h((y) => e.parentMethods.press(y), ["up"])),
|
|
576
|
+
r[4] || (r[4] = h((y) => e.parentMethods.press(y), ["down"]))
|
|
572
577
|
],
|
|
573
578
|
onFocusout: r[5] || (r[5] = (y) => e.parentMethods.unfocus(y)),
|
|
574
579
|
onClick: r[6] || (r[6] = (y) => o()),
|
|
575
580
|
type: "button",
|
|
576
|
-
class:
|
|
581
|
+
class: P([[{ "click-through": a.enableTextFilter || a.showDropDown }], "list-button"])
|
|
577
582
|
}, [
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
class:
|
|
583
|
+
Le(d.$slots, "default", {}, void 0, !0),
|
|
584
|
+
F("span", {
|
|
585
|
+
class: P(["list-button-icon-div", { "bigger-gap": a.showDropDown }])
|
|
581
586
|
}, [
|
|
582
587
|
e.customIcon ? $("", !0) : (T(), M("span", {
|
|
583
588
|
key: 0,
|
|
584
|
-
class:
|
|
589
|
+
class: P(["list-button-icon", [{ "rotate-180": !a.showDropDown }]])
|
|
585
590
|
}, [
|
|
586
|
-
|
|
591
|
+
Y(ge, { "aria-hidden": "true" })
|
|
587
592
|
], 2)),
|
|
588
593
|
e.customIcon ? $("", !0) : (T(), M("span", {
|
|
589
594
|
key: 1,
|
|
590
|
-
class:
|
|
595
|
+
class: P(["list-button-icon", [{ "rotate-180": a.showDropDown }]])
|
|
591
596
|
}, [
|
|
592
|
-
e.customIcon == null ? (T(), fe(
|
|
597
|
+
e.customIcon == null ? (T(), fe(ge, {
|
|
593
598
|
key: 0,
|
|
594
599
|
"aria-hidden": "true"
|
|
595
600
|
})) : $("", !0)
|
|
596
601
|
], 2)),
|
|
597
|
-
e.customIcon ? (T(), M("span",
|
|
598
|
-
(T(), fe(
|
|
602
|
+
e.customIcon ? (T(), M("span", tt, [
|
|
603
|
+
(T(), fe(Ne(e.customIcon), { "aria-hidden": "true" }))
|
|
599
604
|
])) : $("", !0)
|
|
600
605
|
], 2)
|
|
601
|
-
], 42,
|
|
606
|
+
], 42, et));
|
|
602
607
|
}
|
|
603
|
-
}),
|
|
608
|
+
}), ye = /* @__PURE__ */ K(nt, [["__scopeId", "data-v-01ef8e37"]]), ot = /* @__PURE__ */ G({
|
|
604
609
|
__name: "super-list",
|
|
605
610
|
props: {
|
|
606
611
|
selected: {
|
|
@@ -657,38 +662,38 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
|
|
|
657
662
|
},
|
|
658
663
|
emits: { "update:selected": null },
|
|
659
664
|
setup(e, { expose: s, emit: a }) {
|
|
660
|
-
const v = a, o = e,
|
|
665
|
+
const v = a, o = e, p = f([]), w = new Pe(), t = f(0), i = O(() => o.forceTextFilterVisibilityTo != null ? o.forceTextFilterVisibilityTo : t.value > o.maxListOptions), d = f(!1), r = f(!1), y = f(!1), k = f(!0), I = f(!1), g = f(!1), m = f(he), b = f(be), V = f(ye), N = f("");
|
|
661
666
|
A(
|
|
662
|
-
() =>
|
|
667
|
+
() => N.value,
|
|
663
668
|
(n, l) => {
|
|
664
669
|
n !== l && typeof o.options == "function" && x(n);
|
|
665
670
|
}
|
|
666
671
|
);
|
|
667
672
|
const se = () => {
|
|
668
|
-
i.value &&
|
|
669
|
-
},
|
|
670
|
-
clearTimeout(
|
|
671
|
-
}, ie = O(() =>
|
|
672
|
-
n && v("update:selected", n),
|
|
673
|
-
}, E = (n) =>
|
|
673
|
+
i.value && b?.value?.blurInput();
|
|
674
|
+
}, q = () => {
|
|
675
|
+
clearTimeout(Q), se(), N.value = "", d.value = !1, k.value = !0;
|
|
676
|
+
}, ie = O(() => g?.value === !0 ? "Error loading data" : I?.value === !0 ? "Loading..." : E(o.selected)), H = (n) => {
|
|
677
|
+
n && v("update:selected", n), q();
|
|
678
|
+
}, E = (n) => He(
|
|
674
679
|
n,
|
|
675
680
|
o.customPlaceHolderFunction,
|
|
676
681
|
o.objectLabelKeyName,
|
|
677
682
|
o.enumKeyToLabelObjectArray
|
|
678
683
|
);
|
|
679
|
-
function
|
|
680
|
-
throw I.value = !0,
|
|
684
|
+
function U() {
|
|
685
|
+
throw I.value = !0, g.value = !0, new Error("Invalid options argument provided to ListInputComponent");
|
|
681
686
|
}
|
|
682
687
|
function le() {
|
|
683
|
-
throw I.value = !0,
|
|
688
|
+
throw I.value = !0, g.value = !0, new Error("Invalid response provided to ListInputComponent, no total count key found");
|
|
684
689
|
}
|
|
685
|
-
function
|
|
686
|
-
throw I.value = !0,
|
|
690
|
+
function _() {
|
|
691
|
+
throw I.value = !0, g.value = !0, new Error("Invalid objectLabelKeyName for provided Dropdown list value.");
|
|
687
692
|
}
|
|
688
|
-
|
|
689
|
-
typeof o.options != "function" && !Array.isArray(o.options) ?
|
|
693
|
+
we(() => {
|
|
694
|
+
typeof o.options != "function" && !Array.isArray(o.options) ? U() : u();
|
|
690
695
|
});
|
|
691
|
-
const
|
|
696
|
+
const j = f(!1), ee = f(0), C = f(0), S = f(0);
|
|
692
697
|
A(
|
|
693
698
|
() => C.value,
|
|
694
699
|
(n, l) => {
|
|
@@ -702,167 +707,168 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
|
|
|
702
707
|
},
|
|
703
708
|
{ immediate: !0 }
|
|
704
709
|
);
|
|
705
|
-
const
|
|
706
|
-
if (typeof o.options == "function" && !Array.isArray(o.options)) return
|
|
707
|
-
const n =
|
|
708
|
-
return n === "" ? l : l.filter((
|
|
710
|
+
const B = O(() => {
|
|
711
|
+
if (typeof o.options == "function" && !Array.isArray(o.options)) return p.value;
|
|
712
|
+
const n = N.value, l = p.value;
|
|
713
|
+
return n === "" ? l : l.filter((c) => E(c).toLowerCase().includes(n.toLowerCase()));
|
|
709
714
|
});
|
|
710
715
|
A(
|
|
711
|
-
() =>
|
|
716
|
+
() => B.value,
|
|
712
717
|
(n, l) => {
|
|
713
718
|
JSON.stringify(n) !== JSON.stringify(l) && z();
|
|
714
719
|
},
|
|
715
720
|
{ immediate: !1, deep: !0 }
|
|
716
721
|
);
|
|
717
722
|
const re = () => {
|
|
718
|
-
|
|
723
|
+
j.value = !0;
|
|
719
724
|
}, z = () => {
|
|
720
|
-
const n =
|
|
721
|
-
|
|
725
|
+
const n = te();
|
|
726
|
+
ee.value = n, C.value = n > -1 ? n : 0;
|
|
722
727
|
};
|
|
723
|
-
function
|
|
728
|
+
function te() {
|
|
724
729
|
if (o.selected == null) return -1;
|
|
725
|
-
const n =
|
|
730
|
+
const n = B.value.map((c) => E(c)), l = n.filter((c) => c === E(o.selected));
|
|
726
731
|
if (l.length > 1) {
|
|
727
|
-
const
|
|
728
|
-
for (let D = 0; D <
|
|
729
|
-
const
|
|
730
|
-
|
|
732
|
+
const c = l.map((D) => n.indexOf(D));
|
|
733
|
+
for (let D = 0; D < c.length; D++) {
|
|
734
|
+
const R = JSON.stringify(
|
|
735
|
+
B.value[c[D]]
|
|
736
|
+
), de = JSON.stringify(o.selected);
|
|
737
|
+
if (R === de) return c[D];
|
|
731
738
|
}
|
|
732
739
|
return -1;
|
|
733
740
|
}
|
|
734
741
|
return n.indexOf(E(o.selected));
|
|
735
742
|
}
|
|
736
|
-
const
|
|
737
|
-
I.value || (
|
|
738
|
-
},
|
|
739
|
-
const n = window?.innerWidth != null && window.innerWidth < 640, l = screen?.width != null && screen.width < 640,
|
|
740
|
-
(n || l) && i.value && (ue(), o.scrollTextInputToTopOnMobile &&
|
|
741
|
-
},
|
|
742
|
-
let
|
|
743
|
+
const ne = () => {
|
|
744
|
+
I.value || (d.value || (r.value = !1, z(), J(), d.value = !0), j.value = !1, k.value = !1);
|
|
745
|
+
}, J = () => {
|
|
746
|
+
const n = window?.innerWidth != null && window.innerWidth < 640, l = screen?.width != null && screen.width < 640, c = b.value.textInputRef;
|
|
747
|
+
(n || l) && i.value && (ue(), o.scrollTextInputToTopOnMobile && c?.scrollIntoView({ block: "start", inline: "center" }));
|
|
748
|
+
}, W = f(!0);
|
|
749
|
+
let Q = setTimeout(() => {
|
|
743
750
|
}, 0);
|
|
744
751
|
function ue() {
|
|
745
|
-
const n =
|
|
752
|
+
const n = b.value.textInputRef;
|
|
746
753
|
if (!n) return;
|
|
747
|
-
|
|
754
|
+
W.value = !1;
|
|
748
755
|
let l = null;
|
|
749
|
-
const
|
|
750
|
-
l && clearInterval(l), clearTimeout(
|
|
751
|
-
|
|
756
|
+
const c = () => {
|
|
757
|
+
l && clearInterval(l), clearTimeout(Q), setTimeout(() => {
|
|
758
|
+
W.value = !0;
|
|
752
759
|
}, 100);
|
|
753
760
|
};
|
|
754
|
-
|
|
755
|
-
(
|
|
761
|
+
Q = setTimeout(c, 5e3), l = setInterval(() => {
|
|
762
|
+
(d.value === !1 || n?.scrollTop === 0 && document.readyState === "complete") && c();
|
|
756
763
|
}, 100);
|
|
757
764
|
}
|
|
758
|
-
const
|
|
759
|
-
i?.value == !0 ?
|
|
765
|
+
const oe = () => {
|
|
766
|
+
i?.value == !0 ? b.value.focusInput() : V?.value?.focusInput && V?.value?.focusInput();
|
|
760
767
|
};
|
|
761
768
|
async function u() {
|
|
762
|
-
typeof o.options == "function" ? await x(
|
|
769
|
+
typeof o.options == "function" ? await x(N.value ? N.value : void 0, !0) : (X(o.options), t.value = p.value.length), L();
|
|
763
770
|
}
|
|
764
771
|
s({ initializeOptions: u, getLabel: E });
|
|
765
772
|
function L() {
|
|
766
|
-
|
|
773
|
+
te() == -1 && p.value && !!p.value[0] && H(p.value[0]);
|
|
767
774
|
}
|
|
768
775
|
async function x(n, l = !0) {
|
|
769
776
|
I.value = l;
|
|
770
|
-
const
|
|
771
|
-
(!
|
|
777
|
+
const c = async () => o.options(o.maxListOptions, n || ""), D = (R) => {
|
|
778
|
+
(!R || !("data" in R)) && U(), X(R.data), Ie(R?.data?.length ?? 0).then(() => {
|
|
772
779
|
I.value = !1;
|
|
773
780
|
});
|
|
774
781
|
};
|
|
775
|
-
await w.resetAndExecute(
|
|
782
|
+
await w.resetAndExecute(c, D);
|
|
783
|
+
}
|
|
784
|
+
function X(n) {
|
|
785
|
+
Array.isArray(n) || U(), n.length > 0 && typeof n[0] == "object" && xe(n), p.value = n;
|
|
786
|
+
}
|
|
787
|
+
function xe(n) {
|
|
788
|
+
(!o.objectLabelKeyName || o.objectLabelKeyName.length === 0) && _();
|
|
789
|
+
const l = o.objectLabelKeyName;
|
|
790
|
+
for (let c = 0; c < n.length; c++)
|
|
791
|
+
(typeof n[c] != "object" || !(l in n[c])) && _();
|
|
776
792
|
}
|
|
777
|
-
async function
|
|
778
|
-
const l = async () => o.options(1, ""),
|
|
793
|
+
async function Ie(n) {
|
|
794
|
+
const l = async () => o.options(1, ""), c = (D) => {
|
|
779
795
|
(!D || !("totalNum" in D)) && le(), t.value = D.totalNum ?? n;
|
|
780
796
|
};
|
|
781
|
-
await w.resetAndExecute(l,
|
|
797
|
+
await w.resetAndExecute(l, c);
|
|
782
798
|
}
|
|
783
|
-
const pe = () =>
|
|
784
|
-
|
|
785
|
-
},
|
|
799
|
+
const pe = () => b?.value?.textInputRef?.getElementsByTagName("li")[C.value] ?? null, Te = (n) => {
|
|
800
|
+
d.value == !1 ? ne() : n && De(n);
|
|
801
|
+
}, De = (n) => {
|
|
786
802
|
const l = n.key || n.code;
|
|
787
|
-
(l === "Tab" || l === "Escape") &&
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
}, Oe = (n) => {
|
|
791
|
-
k.value = !0, C.value < j.value.length - 1 && (n.preventDefault(), q.value = !1, C.value++, pe()?.focus());
|
|
803
|
+
(l === "Tab" || l === "Escape") && q(), l === "ArrowDown" && Me(n), l === "ArrowUp" && Ce(n), (l === "Enter" || l === " ") && Oe(), n.preventDefault(), n.stopPropagation();
|
|
804
|
+
}, Oe = () => {
|
|
805
|
+
B.value.length > 0 ? (r.value = !0, H(B.value[C.value])) : q();
|
|
792
806
|
}, Me = (n) => {
|
|
793
|
-
k.value = !0, C.value
|
|
807
|
+
k.value = !0, C.value < B.value.length - 1 && (n.preventDefault(), j.value = !1, C.value++, pe()?.focus());
|
|
794
808
|
}, Ce = (n) => {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
if (
|
|
800
|
-
|
|
801
|
-
|
|
809
|
+
k.value = !0, C.value > 0 && (n.preventDefault(), j.value = !1, C.value--, pe()?.focus());
|
|
810
|
+
}, ae = {
|
|
811
|
+
openList: ne,
|
|
812
|
+
unfocus: (n) => {
|
|
813
|
+
if (d?.value === !1) return;
|
|
814
|
+
N.value.length > 0 && (r.value = !0);
|
|
815
|
+
const l = m?.value?.listContainerRef, c = b?.value?.textInputRef, D = n?.relatedTarget && c?.isEqualNode(n?.relatedTarget), R = n?.relatedTarget && l && l.contains(n?.relatedTarget), de = n?.relatedTarget && l && l.isEqualNode(n?.relatedTarget);
|
|
816
|
+
if (!(R || D)) {
|
|
817
|
+
if (de) {
|
|
818
|
+
oe();
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
q();
|
|
802
822
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
};
|
|
806
|
-
function ve(n) {
|
|
807
|
-
Array.isArray(n) || X(), n.length > 0 && typeof n[0] == "object" && ke(n), d.value = n;
|
|
808
|
-
}
|
|
809
|
-
function ke(n) {
|
|
810
|
-
(!o.objectLabelKeyName || o.objectLabelKeyName.length === 0) && G();
|
|
811
|
-
const l = o.objectLabelKeyName;
|
|
812
|
-
for (let f = 0; f < n.length; f++)
|
|
813
|
-
(typeof n[f] != "object" || !(l in n[f])) && G();
|
|
814
|
-
}
|
|
815
|
-
const ae = {
|
|
816
|
-
openList: te,
|
|
817
|
-
unfocus: Ce,
|
|
818
|
-
press: Ie,
|
|
823
|
+
},
|
|
824
|
+
press: Te,
|
|
819
825
|
mouseOverList: re,
|
|
820
826
|
getLabel: E,
|
|
821
|
-
updatedSelected:
|
|
822
|
-
focusInput:
|
|
823
|
-
closeList:
|
|
827
|
+
updatedSelected: H,
|
|
828
|
+
focusInput: oe,
|
|
829
|
+
closeList: q
|
|
824
830
|
};
|
|
825
831
|
return (n, l) => (T(), M("div", {
|
|
826
832
|
style: { position: "relative" },
|
|
827
|
-
class:
|
|
833
|
+
class: P(n.$attrs.class)
|
|
828
834
|
}, [
|
|
829
|
-
|
|
835
|
+
Y(he, {
|
|
830
836
|
ref_key: "itemListRef",
|
|
831
|
-
ref:
|
|
832
|
-
"show-drop-down":
|
|
833
|
-
filteredListItems:
|
|
834
|
-
mouseHoveringOnList:
|
|
837
|
+
ref: m,
|
|
838
|
+
"show-drop-down": d.value,
|
|
839
|
+
filteredListItems: B.value,
|
|
840
|
+
mouseHoveringOnList: j.value,
|
|
835
841
|
focusedIndex: S.value,
|
|
836
|
-
selectedIndex:
|
|
842
|
+
selectedIndex: ee.value,
|
|
837
843
|
"max-list-height-p-x": e.maxListHeightPX,
|
|
838
844
|
"list-animation-duration-ms": e.listAnimationDurationMs,
|
|
839
845
|
"parent-methods": ae,
|
|
840
846
|
blockListChange: r.value,
|
|
841
|
-
"onUpdate:blockListChange": l[1] || (l[1] = (
|
|
847
|
+
"onUpdate:blockListChange": l[1] || (l[1] = (c) => r.value = c),
|
|
842
848
|
"total-options-count": t.value,
|
|
843
|
-
onReverseDropDownList: l[2] || (l[2] = (
|
|
844
|
-
enableScrollClose:
|
|
849
|
+
onReverseDropDownList: l[2] || (l[2] = (c) => y.value = c),
|
|
850
|
+
enableScrollClose: W.value
|
|
845
851
|
}, {
|
|
846
|
-
default:
|
|
847
|
-
|
|
852
|
+
default: me(() => [
|
|
853
|
+
Y(ye, {
|
|
848
854
|
ref_key: "dropDownButtonInput",
|
|
849
855
|
ref: V,
|
|
850
856
|
"parent-methods": ae,
|
|
851
|
-
"show-drop-down":
|
|
857
|
+
"show-drop-down": d.value,
|
|
852
858
|
"enable-text-filter": i.value,
|
|
853
859
|
"custom-icon": e.customIcon,
|
|
854
860
|
"reverse-drop-down-list": y.value
|
|
855
861
|
}, {
|
|
856
|
-
default:
|
|
857
|
-
|
|
862
|
+
default: me(() => [
|
|
863
|
+
Y(be, {
|
|
858
864
|
ref_key: "dropDownTextInput",
|
|
859
|
-
ref:
|
|
865
|
+
ref: b,
|
|
860
866
|
"enable-text-filter": i.value,
|
|
861
|
-
"show-drop-down":
|
|
867
|
+
"show-drop-down": d.value,
|
|
862
868
|
placeholder: ie.value,
|
|
863
869
|
"enable-button-click": k.value,
|
|
864
870
|
"parent-methods": ae,
|
|
865
|
-
"onUpdate:query": l[0] || (l[0] = (
|
|
871
|
+
"onUpdate:query": l[0] || (l[0] = (c) => N.value = c)
|
|
866
872
|
}, null, 8, ["enable-text-filter", "show-drop-down", "placeholder", "enable-button-click"])
|
|
867
873
|
]),
|
|
868
874
|
_: 1
|
|
@@ -872,7 +878,7 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
|
|
|
872
878
|
}, 8, ["show-drop-down", "filteredListItems", "mouseHoveringOnList", "focusedIndex", "selectedIndex", "max-list-height-p-x", "list-animation-duration-ms", "blockListChange", "total-options-count", "enableScrollClose"])
|
|
873
879
|
], 2));
|
|
874
880
|
}
|
|
875
|
-
}), lt = /* @__PURE__ */ K(
|
|
881
|
+
}), lt = /* @__PURE__ */ K(ot, [["__scopeId", "data-v-cc38ced5"]]);
|
|
876
882
|
export {
|
|
877
883
|
lt as default
|
|
878
884
|
};
|