@jblehm/super-list 1.0.40 → 1.0.43

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