@jblehm/super-list 1.0.32 → 1.0.34

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 CHANGED
@@ -1,4 +1,4 @@
1
- # superlist V1.0.32
1
+ # superlist V1.0.34
2
2
  An un-styled mobile supported text searchable combobox for Vue.
3
3
 
4
4
  ![list_img_1.png](https://drive.google.com/thumbnail?id=1vccx8i3aOcXCjT1cflzeHJs0BNhj6I-u&sz=w1000)
@@ -67,6 +67,7 @@ export default defineComponent({
67
67
  }
68
68
  })
69
69
  </script>
70
+ <style src="@jblehm/super-list/dist/index.css"></style>
70
71
  <style>
71
72
  .super-list,
72
73
  .super-list > * {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .list-filter-text-input[data-v-97ab9870]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem;width:100%;height:100%;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;border:0 none;pointer-events:auto;cursor:text}.list-filter-text-input[data-v-97ab9870]:focus,.list-filter-text-input[data-v-97ab9870]:focus-visible,.list-filter-text-input[data-v-97ab9870]:active{text-align:left}.click-through[data-v-97ab9870]{pointer-events:none}.dark-placeholder-text[data-v-97ab9870]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-97ab9870]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-97ab9870]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-97ab9870]{font-size:.875rem;line-height:1.5rem}}.list-option[data-v-e4eeb2f7]{text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-text-colour, rgb(55, 60, 65));transition-property:font-weight,background-color,color,text-shadow;transition-duration:.5s;transition-timing-function:ease;font-weight:400;text-shadow:1px 1px 3px var(--superlist-background-colour, white)}.list-option[data-v-e4eeb2f7]:focus-visible,.list-option>span[data-v-e4eeb2f7]:focus-visible{outline:none}.list-option-selected[data-v-e4eeb2f7]{font-weight:600}.list-option-message[data-v-e4eeb2f7]{text-shadow:1px 1px 3px var(--superlist-background-colour, white);text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.list-option-active[data-v-e4eeb2f7]:hover,.list-option-active[data-v-e4eeb2f7],.list-option-selected[data-v-e4eeb2f7]:hover,.list-option[data-v-e4eeb2f7]:hover{font-weight:600;background-color:var(--superlist-theme-colour, rgb(77, 168, 11, .8));color:var(--superlist-background-colour, white);text-shadow:1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, .8));transition-duration:0s!important}.list-item-icon[data-v-e4eeb2f7]{display:flex;height:1rem;width:1rem;position:absolute;right:.7rem;margin-top:-.1rem;align-self:center}.list-item-span[data-v-e4eeb2f7]{padding:.5rem 1.75rem .5rem .75rem;width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-normal[data-v-e58cd48c]{top:var(--parent-y)}.list-reverse[data-v-e58cd48c]{bottom:var(--parent-y)}.select-list[data-v-e58cd48c]{--parent-width: var(--8d801350);--parent-x: var(--2724698a);--parent-y: var(--27246d4b);--duration: var(--ffcaa9a8);--border-radius: var(--superlist-list-border-radius, 0);border-radius:var(--border-radius);width:var(--parent-width);min-width:var(--parent-width);left:var(--parent-x);display:block;transition-property:max-height,opacity,visibility,box-shadow;transition-duration:var(--duration, .3s);transition-timing-function:cubic-bezier(.1,.9,.35,.98);position:absolute;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background-color:#ffffffb3;align-items:baseline;opacity:.25;z-index:999;visibility:collapse;overflow:auto;max-height:0;border:none!important}.select-list[data-v-e58cd48c]:focus-visible,.select-list>ul[data-v-e58cd48c]:focus-visible,.super-list-button-container[data-v-e58cd48c]:focus-visible{outline:none}.super-list-button-container[data-v-e58cd48c]{height:100%;width:100%}.select-list.select-list-open[data-v-e58cd48c]{z-index:999999;--max-height: var(--414dd276);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-e58cd48c]{overflow:hidden}.select-list-fixed[data-v-e58cd48c]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-e58cd48c]{--duration: var(--ffcaa9a8);overflow:visible;margin:0;padding:0;border-style:none;color:var(--superlist-text-colour, rgb(55, 60, 65));list-style:none;max-width:100%}.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius)}.select-list[data-v-e58cd48c]:not(.select-list-fixed){transition:none;box-shadow:none!important}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-e58cd48c]{font-size:.875rem;line-height:1.25rem}}.list-button-icon[data-v-01ef8e37]{display:flex;transition-timing-function:ease-in-out;transition-duration:.2s;transition-property:transform;width:.6rem;transform:rotate(0);color:var(--superlist-text-colour, rgb(17, 24, 39));justify-content:center;max-height:18%}.list-button-icon.custom-icon[data-v-01ef8e37]{max-height:100%;width:1.25rem}.list-button-icon.rotate-180[data-v-01ef8e37]{transform:rotate(180deg)}.list-button[data-v-01ef8e37]{position:relative;padding:0;margin:0;width:100%;max-height:100%;height:100%;background-color:var(--superlist-background-colour, white);align-items:center;pointer-events:auto;cursor:pointer}.list-button[data-v-01ef8e37]:focus,.list-button[data-v-01ef8e37]:focus-visible,.list-button[data-v-01ef8e37]:active{text-align:left}.list-button-icon-div[data-v-01ef8e37]{pointer-events:none;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:.75rem;max-height:100%;height:100%;gap:max(.15rem,calc(6.25% + .075rem));transition:gap .2s}.list-button-icon-div.bigger-gap[data-v-01ef8e37]{gap:calc(40% - .25rem)}.click-through[data-v-01ef8e37]{pointer-events:none}[data-v-cc38ced5]{box-sizing:border-box}
1
+ .list-filter-text-input[data-v-98f157c0]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem;width:100%;height:100%;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;border:0 none;pointer-events:auto;cursor:text}.list-filter-text-input[data-v-98f157c0]:focus,.list-filter-text-input[data-v-98f157c0]:focus-visible,.list-filter-text-input[data-v-98f157c0]:active{text-align:left}.click-through[data-v-98f157c0]{pointer-events:none}.dark-placeholder-text[data-v-98f157c0]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-98f157c0]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-98f157c0]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-98f157c0]{font-size:.875rem;line-height:1.5rem}}.list-option[data-v-e4eeb2f7]{text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-text-colour, rgb(55, 60, 65));transition-property:font-weight,background-color,color,text-shadow;transition-duration:.5s;transition-timing-function:ease;font-weight:400;text-shadow:1px 1px 3px var(--superlist-background-colour, white)}.list-option[data-v-e4eeb2f7]:focus-visible,.list-option>span[data-v-e4eeb2f7]:focus-visible{outline:none}.list-option-selected[data-v-e4eeb2f7]{font-weight:600}.list-option-message[data-v-e4eeb2f7]{text-shadow:1px 1px 3px var(--superlist-background-colour, white);text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.list-option-active[data-v-e4eeb2f7]:hover,.list-option-active[data-v-e4eeb2f7],.list-option-selected[data-v-e4eeb2f7]:hover,.list-option[data-v-e4eeb2f7]:hover{font-weight:600;background-color:var(--superlist-theme-colour, rgb(77, 168, 11, .8));color:var(--superlist-background-colour, white);text-shadow:1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, .8));transition-duration:0s!important}.list-item-icon[data-v-e4eeb2f7]{display:flex;height:1rem;width:1rem;position:absolute;right:.7rem;margin-top:-.1rem;align-self:center}.list-item-span[data-v-e4eeb2f7]{padding:.5rem 1.75rem .5rem .75rem;width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-normal[data-v-e58cd48c]{top:var(--parent-y)}.list-reverse[data-v-e58cd48c]{bottom:var(--parent-y)}.select-list[data-v-e58cd48c]{--parent-width: var(--8d801350);--parent-x: var(--2724698a);--parent-y: var(--27246d4b);--duration: var(--ffcaa9a8);--border-radius: var(--superlist-list-border-radius, 0);border-radius:var(--border-radius);width:var(--parent-width);min-width:var(--parent-width);left:var(--parent-x);display:block;transition-property:max-height,opacity,visibility,box-shadow;transition-duration:var(--duration, .3s);transition-timing-function:cubic-bezier(.1,.9,.35,.98);position:absolute;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background-color:#ffffffb3;align-items:baseline;opacity:.25;z-index:999;visibility:collapse;overflow:auto;max-height:0;border:none!important}.select-list[data-v-e58cd48c]:focus-visible,.select-list>ul[data-v-e58cd48c]:focus-visible,.super-list-button-container[data-v-e58cd48c]:focus-visible{outline:none}.super-list-button-container[data-v-e58cd48c]{height:100%;width:100%}.select-list.select-list-open[data-v-e58cd48c]{z-index:999999;--max-height: var(--414dd276);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-e58cd48c]{overflow:hidden}.select-list-fixed[data-v-e58cd48c]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-e58cd48c]{--duration: var(--ffcaa9a8);overflow:visible;margin:0;padding:0;border-style:none;color:var(--superlist-text-colour, rgb(55, 60, 65));list-style:none;max-width:100%}.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius)}.select-list[data-v-e58cd48c]:not(.select-list-fixed){transition:none;box-shadow:none!important}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-e58cd48c]{font-size:.875rem;line-height:1.25rem}}.list-button-icon[data-v-01ef8e37]{display:flex;transition-timing-function:ease-in-out;transition-duration:.2s;transition-property:transform;width:.6rem;transform:rotate(0);color:var(--superlist-text-colour, rgb(17, 24, 39));justify-content:center;max-height:18%}.list-button-icon.custom-icon[data-v-01ef8e37]{max-height:100%;width:1.25rem}.list-button-icon.rotate-180[data-v-01ef8e37]{transform:rotate(180deg)}.list-button[data-v-01ef8e37]{position:relative;padding:0;margin:0;width:100%;max-height:100%;height:100%;background-color:var(--superlist-background-colour, white);align-items:center;pointer-events:auto;cursor:pointer}.list-button[data-v-01ef8e37]:focus,.list-button[data-v-01ef8e37]:focus-visible,.list-button[data-v-01ef8e37]:active{text-align:left}.list-button-icon-div[data-v-01ef8e37]{pointer-events:none;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:.75rem;max-height:100%;height:100%;gap:max(.15rem,calc(6.25% + .075rem));transition:gap .2s}.list-button-icon-div.bigger-gap[data-v-01ef8e37]{gap:calc(40% - .25rem)}.click-through[data-v-01ef8e37]{pointer-events:none}[data-v-cc38ced5]{box-sizing:border-box}
@@ -1,5 +1,5 @@
1
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 {
2
+ class Be {
3
3
  eventsTypes = ["resize", "load", "scroll", "wheel", "touchmove"];
4
4
  config = {
5
5
  attributes: !0,
@@ -110,31 +110,32 @@ const qe = ["tabindex", "placeholder", "size"], je = /* @__PURE__ */ G({
110
110
  },
111
111
  setup(e, { expose: s, emit: a }) {
112
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();
113
+ function w(y) {
114
+ "sourceCapabilities" in y && y.sourceCapabilities == null ? o.parentMethods.closeList() : o.parentMethods.openList();
115
115
  }
116
- function t(g) {
117
- o.parentMethods.unfocus(g);
116
+ function t(y) {
117
+ o.parentMethods.unfocus(y);
118
118
  }
119
- function i(g) {
120
- g?.target?.value != null && v("update:query", g.target.value);
119
+ function i(y) {
120
+ y?.target?.value != null && v("update:query", y.target.value);
121
121
  }
122
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
- }), r = O(() => o.enableButtonClick === !0 && o.enableTextFilter === !0 ? "" : "click-through"), y = O(() => o.showDropDown && !o.enableTextFilter || !o.showDropDown ? "dark-placeholder-text" : "light-placeholder-text");
123
+ const y = p?.value ? p.value.length : 0, m = o.placeholder?.length || 0;
124
+ return y > 0 ? y : m > 0 ? m : 5;
125
+ }), r = O(() => o.enableButtonClick === !0 && o.enableTextFilter === !0 ? "" : "click-through"), g = O(() => o.showDropDown && !o.enableTextFilter || !o.showDropDown ? "dark-placeholder-text" : "light-placeholder-text");
126
126
  function k() {
127
127
  if (p?.value) {
128
- const g = p.value;
129
- g.blur(), g.value = "";
128
+ const y = p.value;
129
+ y.blur(), y.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: p }), (g, m) => (T(), M("form", {
135
+ return s({ blurInput: k, focusInput: I, textInputRef: p }), (y, m) => (T(), M("form", {
136
136
  onSubmit: m[8] || (m[8] = Z(() => {
137
- }, ["prevent"]))
137
+ }, ["prevent"])),
138
+ style: { display: "contents !important" }
138
139
  }, [
139
140
  F("input", {
140
141
  ref_key: "textInputRef",
@@ -157,7 +158,7 @@ const qe = ["tabindex", "placeholder", "size"], je = /* @__PURE__ */ G({
157
158
  size: d.value,
158
159
  class: P([[
159
160
  r.value,
160
- y.value,
161
+ g.value,
161
162
  { "text-filter-disabled": !e.enableTextFilter }
162
163
  ], "list-filter-text-input"])
163
164
  }, null, 42, qe)
@@ -168,7 +169,7 @@ const qe = ["tabindex", "placeholder", "size"], je = /* @__PURE__ */ G({
168
169
  for (const [v, o] of s)
169
170
  a[v] = o;
170
171
  return a;
171
- }, be = /* @__PURE__ */ K(je, [["__scopeId", "data-v-97ab9870"]]), $e = {}, Ke = {
172
+ }, be = /* @__PURE__ */ K(je, [["__scopeId", "data-v-98f157c0"]]), $e = {}, Ke = {
172
173
  xmlns: "http://www.w3.org/2000/svg",
173
174
  fill: "currentColor",
174
175
  "aria-hidden": "true",
@@ -371,13 +372,13 @@ const ze = /* @__PURE__ */ K($e, [["render", Ve]]), Xe = ["onMousedown"], Ue = {
371
372
  ffcaa9a8: j.value,
372
373
  "414dd276": _.value
373
374
  }));
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);
375
+ const v = a, o = e, p = f(null), w = f(null), t = f(null), i = f(0), d = f(0), r = f(0), g = f(0), k = f("0px"), I = f(!1), y = f([]), m = f(0), b = O(() => !I.value || window?.innerHeight == null ? !1 : U() && le()), V = O(() => o.maxListHeightPX >= m.value);
375
376
  A(
376
377
  () => b.value,
377
378
  (u) => v("reverseDropDownList", u),
378
379
  { immediate: !0 }
379
380
  );
380
- const N = O(() => i.value + "px"), se = O(() => y.value + "px");
381
+ const N = O(() => i.value + "px"), se = O(() => g.value + "px");
381
382
  s({ listContainerRef: t });
382
383
  const q = (u) => {
383
384
  u?.key && u.key === " " && u.preventDefault();
@@ -399,11 +400,11 @@ const ze = /* @__PURE__ */ K($e, [["render", Ve]]), Xe = ["onMousedown"], Ue = {
399
400
  function le() {
400
401
  return r.value < E();
401
402
  }
402
- const _ = O(() => (o.maxListHeightPX || 0) + "px"), j = O(() => (o.listAnimationDurationMs || 0) + "ms"), ee = O(() => o.blockListChange ? g.value : o.filteredListItems);
403
+ const _ = O(() => (o.maxListHeightPX || 0) + "px"), j = O(() => (o.listAnimationDurationMs || 0) + "ms"), ee = O(() => o.blockListChange ? y.value : o.filteredListItems);
403
404
  A(
404
405
  () => ee,
405
406
  (u) => {
406
- u && (g.value = u.value);
407
+ u && (y.value = u.value);
407
408
  },
408
409
  { immediate: !1, deep: !0 }
409
410
  );
@@ -446,8 +447,8 @@ const ze = /* @__PURE__ */ K($e, [["render", Ve]]), Xe = ["onMousedown"], Ue = {
446
447
  }
447
448
  function Q() {
448
449
  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);
450
+ const u = oe().getBoundingClientRect(), L = t.value.getBoundingClientRect(), x = g.value, X = i.value;
451
+ b.value ? g.value = x - (u.top - L.bottom) : g.value = x - (L.top - u.bottom), i.value = X - (L.left - u.left);
451
452
  }
452
453
  function ue() {
453
454
  return (p?.value).getElementsByTagName("button")[0];
@@ -491,7 +492,7 @@ const ze = /* @__PURE__ */ K($e, [["render", Ve]]), Xe = ["onMousedown"], Ue = {
491
492
  class: "list-content"
492
493
  }, [
493
494
  Y(Qe, {
494
- filteredListItems: g.value,
495
+ filteredListItems: y.value,
495
496
  mouseHoveringOnList: e.mouseHoveringOnList,
496
497
  focusedIndex: e.focusedIndex,
497
498
  selectedIndex: e.selectedIndex,
@@ -519,7 +520,7 @@ function _e(e, s) {
519
520
  }, null, -1)
520
521
  ]));
521
522
  }
522
- const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
523
+ const ye = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
523
524
  key: 2,
524
525
  class: "list-button-icon custom-icon"
525
526
  }, nt = /* @__PURE__ */ G({
@@ -569,14 +570,14 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
569
570
  ref: v,
570
571
  tabindex: e.enableTextFilter ? -1 : 0,
571
572
  onKeydown: [
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"]))
573
+ r[0] || (r[0] = h((g) => p(g), ["enter"])),
574
+ r[1] || (r[1] = h((g) => w(g), ["space"])),
575
+ r[2] || (r[2] = h((g) => e.parentMethods.press(g), ["esc"])),
576
+ r[3] || (r[3] = h((g) => e.parentMethods.press(g), ["up"])),
577
+ r[4] || (r[4] = h((g) => e.parentMethods.press(g), ["down"]))
577
578
  ],
578
- onFocusout: r[5] || (r[5] = (y) => e.parentMethods.unfocus(y)),
579
- onClick: r[6] || (r[6] = (y) => o()),
579
+ onFocusout: r[5] || (r[5] = (g) => e.parentMethods.unfocus(g)),
580
+ onClick: r[6] || (r[6] = (g) => o()),
580
581
  type: "button",
581
582
  class: P([[{ "click-through": a.enableTextFilter || a.showDropDown }], "list-button"])
582
583
  }, [
@@ -588,13 +589,13 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
588
589
  key: 0,
589
590
  class: P(["list-button-icon", [{ "rotate-180": !a.showDropDown }]])
590
591
  }, [
591
- Y(ge, { "aria-hidden": "true" })
592
+ Y(ye, { "aria-hidden": "true" })
592
593
  ], 2)),
593
594
  e.customIcon ? $("", !0) : (T(), M("span", {
594
595
  key: 1,
595
596
  class: P(["list-button-icon", [{ "rotate-180": a.showDropDown }]])
596
597
  }, [
597
- e.customIcon == null ? (T(), fe(ge, {
598
+ e.customIcon == null ? (T(), fe(ye, {
598
599
  key: 0,
599
600
  "aria-hidden": "true"
600
601
  })) : $("", !0)
@@ -605,7 +606,7 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
605
606
  ], 2)
606
607
  ], 42, et));
607
608
  }
608
- }), ye = /* @__PURE__ */ K(nt, [["__scopeId", "data-v-01ef8e37"]]), ot = /* @__PURE__ */ G({
609
+ }), ge = /* @__PURE__ */ K(nt, [["__scopeId", "data-v-01ef8e37"]]), ot = /* @__PURE__ */ G({
609
610
  __name: "super-list",
610
611
  props: {
611
612
  selected: {
@@ -662,7 +663,7 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
662
663
  },
663
664
  emits: { "update:selected": null },
664
665
  setup(e, { expose: s, emit: a }) {
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("");
666
+ 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), g = f(!1), k = f(!0), I = f(!1), y = f(!1), m = f(he), b = f(be), V = f(ge), N = f("");
666
667
  A(
667
668
  () => N.value,
668
669
  (n, l) => {
@@ -673,7 +674,7 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
673
674
  i.value && b?.value?.blurInput();
674
675
  }, q = () => {
675
676
  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
+ }, ie = O(() => y?.value === !0 ? "Error loading data" : I?.value === !0 ? "Loading..." : E(o.selected)), H = (n) => {
677
678
  n && v("update:selected", n), q();
678
679
  }, E = (n) => He(
679
680
  n,
@@ -682,13 +683,13 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
682
683
  o.enumKeyToLabelObjectArray
683
684
  );
684
685
  function U() {
685
- throw I.value = !0, g.value = !0, new Error("Invalid options argument provided to ListInputComponent");
686
+ throw I.value = !0, y.value = !0, new Error("Invalid options argument provided to ListInputComponent");
686
687
  }
687
688
  function le() {
688
- throw I.value = !0, g.value = !0, new Error("Invalid response provided to ListInputComponent, no total count key found");
689
+ throw I.value = !0, y.value = !0, new Error("Invalid response provided to ListInputComponent, no total count key found");
689
690
  }
690
691
  function _() {
691
- throw I.value = !0, g.value = !0, new Error("Invalid objectLabelKeyName for provided Dropdown list value.");
692
+ throw I.value = !0, y.value = !0, new Error("Invalid objectLabelKeyName for provided Dropdown list value.");
692
693
  }
693
694
  we(() => {
694
695
  typeof o.options != "function" && !Array.isArray(o.options) ? U() : u();
@@ -846,18 +847,18 @@ const ge = /* @__PURE__ */ K(Ye, [["render", _e]]), et = ["tabindex"], tt = {
846
847
  blockListChange: r.value,
847
848
  "onUpdate:blockListChange": l[1] || (l[1] = (c) => r.value = c),
848
849
  "total-options-count": t.value,
849
- onReverseDropDownList: l[2] || (l[2] = (c) => y.value = c),
850
+ onReverseDropDownList: l[2] || (l[2] = (c) => g.value = c),
850
851
  enableScrollClose: W.value
851
852
  }, {
852
853
  default: me(() => [
853
- Y(ye, {
854
+ Y(ge, {
854
855
  ref_key: "dropDownButtonInput",
855
856
  ref: V,
856
857
  "parent-methods": ae,
857
858
  "show-drop-down": d.value,
858
859
  "enable-text-filter": i.value,
859
860
  "custom-icon": e.customIcon,
860
- "reverse-drop-down-list": y.value
861
+ "reverse-drop-down-list": g.value
861
862
  }, {
862
863
  default: me(() => [
863
864
  Y(be, {
@@ -1 +1 @@
1
- {"version":3,"file":"super-list.js","sources":["../src/DropDownLibrary.ts","../src/ListInputComponents/ListTextInput.vue","../src/ListInputComponents/default-tick.vue","../src/ListInputComponents/ListItem.vue","../src/ListInputComponents/ItemList.vue","../src/ListInputComponents/default-arrow.vue","../src/ListInputComponents/ListButton.vue","../src/super-list.vue"],"sourcesContent":["export interface DocumentViewChangeListener {\n targetNode: HTMLElement\n observe(): void\n unobserve(): void\n pauseMutationObserver(): void\n unpauseMutationObserver(): void\n}\n\nexport class DocumentViewChangeListener implements DocumentViewChangeListener {\n private readonly eventsTypes: string[] = ['resize', 'load', 'scroll', 'wheel', 'touchmove']\n private readonly config: MutationObserverInit = {\n attributes: true,\n childList: true,\n subtree: true\n }\n private mutationObserver: MutationObserver\n private callbackFunction: EventListenerOrEventListenerObject\n\n constructor(targetFunction: Function, targetNode: any = document.body) {\n this.targetNode = targetNode\n this.callbackFunction = ((event: any) =>\n targetFunction(event)) as EventListenerOrEventListenerObject\n this.mutationObserver = new MutationObserver((() => targetFunction()) as MutationCallback)\n }\n\n public observe(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n for (const eventType of this.eventsTypes) this.addListener(eventType)\n this.addResizeListener()\n this.addTransitionEndListener()\n }\n\n pauseMutationObserver(): void {\n this.mutationObserver.disconnect()\n }\n\n unpauseMutationObserver(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n }\n\n public unobserve(): void {\n this.mutationObserver.disconnect()\n for (const eventType of this.eventsTypes) this.removeListener(eventType)\n this.removeResizeListener()\n this.removeTransitionEndListener()\n }\n\n private addListener(eventType: string): void {\n document.addEventListener(eventType, this.callbackFunction, true)\n }\n\n private removeListener(eventType: string): void {\n document.removeEventListener(eventType, this.callbackFunction, true)\n }\n\n private addTransitionEndListener(): void {\n this.targetNode.addEventListener('transitionend', this.callbackFunction)\n }\n\n private removeTransitionEndListener(): void {\n this.targetNode.removeEventListener('transitionend', this.callbackFunction)\n }\n\n private addResizeListener(): void {\n window.addEventListener('resize', this.callbackFunction)\n }\n\n private removeResizeListener(): void {\n window.removeEventListener('resize', this.callbackFunction)\n }\n}\n\nexport function getLabelString(\n value: string | number | object | null | undefined,\n customLabelGetFunction: Function | null | undefined,\n objectLabelKeyName: string | null,\n enumKeyToLabelObjectArray?: EnumType[]\n): string {\n if (customLabelGetFunction != null) return customLabelGetFunction(value)\n if (value == null) return ''\n if (typeof value === 'object') return value[objectLabelKeyName as keyof typeof value]\n if (enumKeyToLabelObjectArray) return getEnumLabel(value, enumKeyToLabelObjectArray)\n return '' + value\n}\n\nfunction getEnumLabel(value: string | number, enumKeyArray: EnumType[]): string {\n return (enumKeyArray.find((eT: EnumType): boolean => eT.type === value)?.label ?? '') as string\n}\n\nexport type ListRequest = (maxNumItems: number, stringFilter?: string) => Promise<DataSet<any>>\n\nexport type EnumType = { type: string; label: string }\n\nexport type DataSet<T> = { data: T[]; totalNum: number; modelName?: string }\n\nexport interface AbortablePromise {\n abortController: AbortController\n func: Function\n then: Function\n}\n\nexport class AbortablePromise implements AbortablePromise {\n constructor() {\n this.abortController = new AbortController()\n this.func = (): void => {}\n this.then = (): void => {}\n }\n\n async abortablePromise(signal: AbortSignal, asyncFunc: Function, then: Function): Promise<any> {\n const response = await asyncFunc()\n if (signal.aborted) return\n return then(response)\n }\n\n setFunc(func: Function): void {\n this.func = func\n }\n\n setThen(then: Function): void {\n this.then = then\n }\n\n execute(): Promise<any> {\n return this.abortablePromise(this.abortController.signal, this.func, this.then)\n }\n\n abort(reason?: string): void {\n this.abortController.abort(reason || 'Aborted By Controller.')\n this.abortController = new AbortController()\n }\n\n resetAndExecute(func: Function, then: Function): Promise<any> {\n this.abort('New Request From Controller.')\n this.setFunc(func)\n this.setThen(then)\n return this.execute()\n }\n}\n","<template>\n <form @submit.prevent>\n <!-- Forces virtual keyboard to display return/enter key when list exists in external form -->\n <input\n ref=\"textInputRef\"\n :tabindex=\"enableTextFilter ? 0 : -1\"\n @keydown.enter=\"parentMethods.press($event)\"\n @keydown.space=\"parentMethods.press()\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusin=\"focusInHandler($event)\"\n @focusout=\"focusOutHandler($event)\"\n @input=\"updateQuery($event as InputEvent)\"\n type=\"text\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n :placeholder=\"placeholder\"\n :size=\"textInputSize\"\n :class=\"[\n pointerEventsClass,\n textInputColourClass,\n { 'text-filter-disabled': !enableTextFilter }\n ]\"\n class=\"list-filter-text-input\"\n />\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType, ref } from 'vue'\n\nconst emit = defineEmits({\n 'update:selected': null,\n 'update:query': null,\n 'update:press': null\n})\n\nconst props = defineProps({\n enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: true\n },\n placeholder: {\n type: String as PropType<string | undefined>,\n default: undefined\n },\n enableButtonClick: {\n type: Boolean as PropType<boolean | null>,\n default: true\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n }\n})\nconst textInputRef = ref(null)\n\nfunction focusInHandler(e: FocusEvent) {\n if ('sourceCapabilities' in e && e.sourceCapabilities == null) props.parentMethods.closeList()\n else props.parentMethods.openList()\n}\n\nfunction focusOutHandler(event: FocusEvent) {\n props.parentMethods.unfocus(event)\n}\n\nfunction updateQuery(event: any) {\n if (event?.target?.value != undefined) emit('update:query', event.target.value)\n}\n\nconst textInputSize = computed(() => {\n const refLength: number = textInputRef?.value ? (textInputRef.value as string).length : 0\n const placeHolderLength: number = props.placeholder?.length || 0\n return refLength > 0 ? refLength : placeHolderLength > 0 ? placeHolderLength : 5\n})\n\nconst pointerEventsClass = computed(() => {\n const enable: boolean = props.enableButtonClick === true && props.enableTextFilter === true\n return enable ? '' : 'click-through'\n})\n\nconst textInputColourClass = computed(() => {\n const dark: boolean = (props.showDropDown && !props.enableTextFilter) || !props.showDropDown\n return dark ? 'dark-placeholder-text' : 'light-placeholder-text'\n})\n\nfunction blurInput() {\n if (textInputRef?.value) {\n const input: HTMLInputElement = textInputRef.value\n input.blur()\n input.value = ''\n }\n}\n\nfunction focusInput() {\n if (textInputRef?.value) (textInputRef.value as HTMLInputElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, textInputRef })\n</script>\n\n<style scoped>\n.list-filter-text-input {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n text-align: center;\n padding: 0.125rem 2rem 0.125rem 0.5rem;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: transparent;\n border: 0 none;\n pointer-events: auto;\n cursor: text;\n}\n\n.list-filter-text-input:focus,\n.list-filter-text-input:focus-visible,\n.list-filter-text-input:active {\n text-align: left;\n}\n\n.click-through {\n pointer-events: none;\n}\n\n.dark-placeholder-text::placeholder {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n}\n\n.light-placeholder-text::placeholder {\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.text-filter-disabled {\n background-color: transparent;\n border: none;\n outline: none;\n box-shadow: none;\n filter: none;\n}\n\n@media (min-width: 640px) {\n .list-filter-text-input {\n font-size: 0.875rem;\n line-height: 1.5rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 -16 16 17\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <li\n v-for=\"(listItem, index) in filteredListItems\"\n :key=\"index\"\n ref=\"items\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n tabindex=\"-1\"\n @mousedown.left=\"parentMethods.updatedSelected(listItem)\"\n :class=\"[\n { 'list-option-selected': selectedIndex === index },\n {\n 'list-option-active':\n filteredListItems.length === 1 || (focusedIndex === index && !mouseHoveringOnList)\n },\n 'list-option'\n ]\"\n >\n <span class=\"list-item-span\">{{ parentMethods.getLabel(listItem) }}</span>\n <default-tick v-if=\"selectedIndex === index\" class=\"list-item-icon\" aria-hidden=\"true\" />\n </li>\n <li\n v-if=\"filteredListItems.length === 0\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">No Items To Display.</span>\n </li>\n <li\n v-if=\"totalOptionsCount && totalOptionsCount > (filteredListItems?.length || 0)\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">\n +{{ totalOptionsCount - filteredListItems?.length || 0 }} More Items...</span\n >\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type ShallowRef, useTemplateRef, watch } from 'vue'\nimport DefaultTick from './default-tick.vue'\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n listElementOpenAndVisible: {\n type: Boolean,\n default: false\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n default: false\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n }\n})\ntype HTMLLIElementOrArray = HTMLLIElement | HTMLLIElement[] | null\nconst iRefs: Readonly<ShallowRef<HTMLLIElementOrArray>> = useTemplateRef('items')\n\nconst focusedLi = computed((): HTMLElement | null => {\n if (!iRefs?.value) return null\n const refs: Array<HTMLLIElement | null> = Array.isArray(iRefs.value) ? iRefs.value : [iRefs.value]\n const focused = refs[props.focusedIndex]\n if (!focused) return null\n const isObject: boolean = typeof focused == 'object'\n const hasScrollIntoView: boolean = isObject && 'scrollIntoView' in focused\n const hasScrollFunc: boolean = hasScrollIntoView && typeof focused['scrollIntoView'] == 'function'\n return hasScrollFunc ? focused : null\n})\n\nwatch(\n () => props.showDropDown,\n () => scrollHighlightedListItemToTop()\n)\nwatch(\n () => props.listElementOpenAndVisible,\n () => scrollHighlightedListItemIntoView()\n)\nwatch(\n () => focusedLi.value,\n () => scrollHighlightedListItemIntoView()\n)\n\nfunction scrollHighlightedListItemToTop(): void {\n if (!props.showDropDown || !focusedLi?.value?.parentElement?.parentElement) return\n focusedLi.value.parentElement.parentElement.scrollTop = focusedLi.value.offsetTop\n}\n\nfunction scrollHighlightedListItemIntoView(): void {\n const li = focusedLi.value\n const liParent = li?.parentElement?.parentElement\n if (!props.showDropDown || !li || !liParent) return\n const aboveTop = li.offsetTop - liParent.scrollTop < 0\n const belowBottom = li.offsetTop + li.offsetHeight - liParent.scrollTop > liParent.clientHeight\n if (aboveTop) liParent.scrollTop = li.offsetTop\n if (belowBottom) liParent.scrollTop = li.offsetTop + li.clientHeight - liParent.clientHeight\n}\n</script>\n\n<style scoped>\n.list-option {\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n transition-property: font-weight, background-color, color, text-shadow;\n transition-duration: 500ms;\n transition-timing-function: ease;\n font-weight: 400;\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n}\n\n.list-option:focus-visible,\n.list-option > span:focus-visible {\n outline: none;\n}\n\n.list-option-selected {\n font-weight: 600;\n}\n\n.list-option-message {\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.list-option-active:hover,\n.list-option-active,\n.list-option-selected:hover,\n.list-option:hover {\n font-weight: 600;\n background-color: var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n color: var(--superlist-background-colour, white);\n text-shadow: 1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n transition-duration: 0s !important;\n}\n\n.list-item-icon {\n display: flex;\n height: 1rem;\n width: 1rem;\n position: absolute;\n right: 0.7rem;\n margin-top: -0.1rem;\n align-self: center;\n}\n\n.list-item-span {\n padding: 0.5rem 1.75rem 0.5rem 0.75rem;\n width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n","<template>\n <div ref=\"dropDownButtonContainer\" class=\"super-list-button-container\">\n <slot></slot>\n </div>\n <div\n id=\"super-list-select-list\"\n ref=\"listContainerRef\"\n @mouseenter=\"parentMethods.mouseOverList()\"\n tabindex=\"-1\"\n :class=\"[\n 'select-list',\n reverseList ? 'list-reverse' : 'list-normal',\n { 'select-list-open': showDropDown },\n { 'no-scroll': noScroll && listElementOpenAndVisible },\n { 'select-list-fixed': listElementOpenAndVisible },\n { 'select-list-scrollable': !noScroll }\n ]\"\n @keydown.space=\"preventSpaceScrollingList($event)\"\n @mouseup.left=\"refocusTextInput($event)\"\n >\n <ul tabindex=\"-1\" ref=\"dropDownListUL\" class=\"list-content\">\n <list-item\n :filteredListItems=\"listItemsToDisplay\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"focusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :listElementOpenAndVisible=\"listElementOpenAndVisible\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :total-options-count=\"totalOptionsCount\"\n />\n </ul>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n type ComputedRef,\n nextTick,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch\n} from 'vue'\nimport ListItem from '../ListInputComponents/ListItem.vue'\nimport { DocumentViewChangeListener } from '../DropDownLibrary'\n\nconst emit = defineEmits(['reverseDropDownList'])\n\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n maxListHeightPX: {\n type: Number,\n required: true\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n required: true\n },\n blockListChange: {\n type: Boolean,\n required: true\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n },\n enableScrollClose: {\n type: Boolean,\n default: true\n }\n})\n\nconst dropDownButtonContainer = ref<HTMLElement | null>(null)\nconst dropDownListUL = ref<HTMLElement | null>(null)\nconst listContainerRef = ref<HTMLElement | null>(null)\nconst offsetLeft = ref<number>(0)\nconst offsetTop = ref<number>(0)\nconst offsetBottom = ref<number>(0)\nconst listOffset = ref<number>(0)\nconst parentWidthPx = ref<string>('0px')\nconst listElementOpenAndVisible = ref<boolean>(false)\nconst listItemsToDisplay = ref<any[]>([])\nconst listHeightPx = ref<number>(0)\n\nconst reverseList = computed((): boolean => {\n if (!listElementOpenAndVisible.value || window?.innerHeight == null) return false\n return sufficientRoomAbove() && insufficientRoomBelow()\n})\n\nconst noScroll = computed((): boolean => {\n return props.maxListHeightPX >= listHeightPx.value\n})\n\nwatch(\n () => reverseList.value,\n (reverse: boolean) => emit('reverseDropDownList', reverse),\n { immediate: true }\n)\n\nconst parentXPx = computed((): string => offsetLeft.value + 'px')\nconst parentYPx = computed((): string => listOffset.value + 'px')\n\ndefineExpose({ listContainerRef })\n\nconst preventSpaceScrollingList = (event: any) => {\n if (event?.key && event.key === ' ') event.preventDefault()\n}\n\nconst refocusTextInput = (event: MouseEvent) => {\n const list = listContainerRef?.value as HTMLElement | null\n const target = event.target as HTMLElement | null\n if (!(list && target && list.contains(target)) || list.isEqualNode(target))\n props.parentMethods.focusInput()\n}\n\nfunction getListULHeight(): number {\n return dropDownListUL?.value ? (dropDownListUL?.value as HTMLElement).clientHeight : 0\n}\n\nfunction displayableListHeight(): number {\n if (!listElementOpenAndVisible.value || getListULHeight() === 0) return props.maxListHeightPX\n const ulHt: number = getListULHeight() === 0 ? props.maxListHeightPX : +getListULHeight()\n return props.maxListHeightPX && props.maxListHeightPX > ulHt ? ulHt : props.maxListHeightPX\n}\n\nfunction sufficientRoomAbove(): boolean {\n return offsetTop.value > displayableListHeight()\n}\n\nfunction insufficientRoomBelow(): boolean {\n return offsetBottom.value < displayableListHeight()\n}\n\nconst maxListHeightPx = computed((): string => (props.maxListHeightPX || 0) + 'px')\n\nconst animationDuration = computed((): string => (props.listAnimationDurationMs || 0) + 'ms')\n\nconst updatedListItemsToDisplay = computed((): any[] => {\n return !props.blockListChange ? props.filteredListItems : listItemsToDisplay.value\n})\n\nwatch(\n () => updatedListItemsToDisplay,\n (newVal: ComputedRef<any[]>) => {\n if (newVal) listItemsToDisplay.value = newVal.value\n },\n { immediate: false, deep: true }\n)\n\nlet unobserveTimeout = setTimeout(() => {}, 0)\n\nlet changeListener: DocumentViewChangeListener | null = null\n\nfunction openAndObserveChangeListener() {\n listHeightPx.value = getListULHeight()\n clearTimeout(unobserveTimeout)\n if (changeListener) changeListener.observe()\n listElementOpenAndVisible.value = true\n buttonRePositionCallback(undefined)\n}\n\nfunction closeAndUnobserveChangeListener() {\n clearTimeout(unobserveTimeout)\n unobserveTimeout = setTimeout(() => {\n if (!props.showDropDown) {\n listElementOpenAndVisible.value = false\n if (changeListener) changeListener.unobserve()\n }\n }, props.listAnimationDurationMs + 50)\n}\n\nwatch(\n () => props.showDropDown,\n (newV, oldV) => {\n if (newV !== oldV) {\n setOffsets()\n if (newV) openAndObserveChangeListener()\n else closeAndUnobserveChangeListener()\n }\n },\n { immediate: true }\n)\n\nfunction buttonRePositionCallback(e: any): void {\n setOffsets()\n nextTick(() => setOffsets())\n closeListOnScrollIfNecessary(e)\n}\n\nfunction closeListOnScrollIfNecessary(e: any) {\n if (!props.enableScrollClose || !props.showDropDown) return\n const notInitialized: boolean = typeof listContainerRef?.value?.contains !== 'function'\n if (notInitialized || e?.target?.nodeType == null || insideListOrOtherList(e)) return\n const isScrollEvent: boolean = ['scroll', 'wheel', 'touchmove'].includes(e?.type)\n if (props.showDropDown && isScrollEvent) props.parentMethods.closeList()\n}\n\nfunction insideListOrOtherList(e: any): boolean {\n const insideButton: boolean = !!dropDownButtonContainer.value?.contains(e?.target as Node)\n const insideList: boolean = !!listContainerRef.value?.contains(e.target as Node)\n const otherList: boolean = [e?.srcElement?.id, e?.target?.id].includes('super-list-select-list')\n return insideButton || insideList || otherList\n}\n\nfunction setOffsets(): void {\n setButtonOffset()\n setListOffset()\n}\n\nfunction setButtonOffset(): void {\n if (dropDownButtonContainer?.value == null) return\n const brc: DOMRect = (dropDownButtonContainer.value as HTMLElement).getBoundingClientRect()\n offsetTop.value = brc.top\n offsetBottom.value = window.innerHeight - brc.bottom\n parentWidthPx.value = brc.width + 'px'\n}\n\nfunction setListOffset(): void {\n /**\n * List container must be used when calculating position and not \"dropDownListUL\".\n * Position must be calculated as window viewport might not match list container viewport.\n **/\n if (dropDownButtonContainer?.value == null || listContainerRef?.value == null) return\n const brc: DOMRect = getButtonContainerElement().getBoundingClientRect()\n const slrc: DOMRect = (listContainerRef.value as HTMLElement).getBoundingClientRect()\n const currentListOffset: number = listOffset.value\n const currentOffsetLeft: number = offsetLeft.value\n if (reverseList.value) listOffset.value = currentListOffset - (brc.top - slrc.bottom)\n else listOffset.value = currentListOffset - (slrc.top - brc.bottom)\n offsetLeft.value = currentOffsetLeft - (slrc.left - brc.left)\n}\n\nfunction getButtonElement(): HTMLButtonElement {\n return (dropDownButtonContainer?.value as HTMLElement).getElementsByTagName('button')[0]\n}\n\nfunction getButtonContainerElement(): HTMLDivElement {\n return dropDownButtonContainer?.value as HTMLDivElement\n}\n\nonMounted(() => {\n changeListener = new DocumentViewChangeListener(buttonRePositionCallback, getButtonElement())\n setTimeout(() => buttonRePositionCallback(undefined), 250)\n})\n\nonUnmounted(() => {\n changeListener?.unobserve()\n})\n</script>\n\n<style scoped>\n.list-normal {\n top: var(--parent-y);\n}\n\n.list-reverse {\n bottom: var(--parent-y);\n}\n\n.select-list {\n --parent-width: v-bind(parentWidthPx);\n --parent-x: v-bind(parentXPx);\n --parent-y: v-bind(parentYPx);\n --duration: v-bind(animationDuration);\n --border-radius: var(--superlist-list-border-radius, 0);\n border-radius: var(--border-radius);\n width: var(--parent-width);\n min-width: var(--parent-width);\n left: var(--parent-x);\n display: block;\n transition-property: max-height, opacity, visibility, box-shadow;\n transition-duration: var(--duration, 300ms);\n transition-timing-function: cubic-bezier(0.1, 0.9, 0.35, 0.98);\n position: absolute;\n backdrop-filter: blur(3px);\n -webkit-backdrop-filter: blur(3px);\n background-color: rgb(255, 255, 255, 0.7);\n align-items: baseline;\n opacity: 0.25;\n z-index: 999;\n visibility: collapse;\n overflow: auto;\n max-height: 0;\n border: none !important; /* can't transition border */\n}\n\n.select-list:focus-visible,\n.select-list > ul:focus-visible,\n.super-list-button-container:focus-visible {\n outline: none;\n}\n\n.super-list-button-container {\n height: 100%;\n width: 100%;\n}\n\n.select-list.select-list-open {\n z-index: 999999;\n --max-height: v-bind(maxListHeightPx);\n max-height: var(--max-height, 0);\n}\n\n.select-list.no-scroll {\n overflow: hidden;\n}\n\n.select-list-fixed {\n position: fixed;\n opacity: 1;\n visibility: visible;\n}\n\n.list-content {\n --duration: v-bind(animationDuration);\n overflow: visible;\n margin: 0;\n padding: 0;\n border-style: none;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n list-style: none;\n max-width: 100%;\n}\n\n.select-list.select-list-scrollable {\n border-radius: var(--border-radius);\n}\n\n.select-list:not(.select-list-fixed) {\n transition: none;\n box-shadow: none !important;\n}\n\n@media (min-width: 640px) {\n .select-list.select-list-scrollable {\n border-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n .list-content {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 0 12 6\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <button\n ref=\"buttonRef\"\n :tabindex=\"enableTextFilter ? -1 : 0\"\n @keydown.enter=\"enterHandler($event)\"\n @keydown.space=\"spaceHandler($event)\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @click=\"clickHandler()\"\n type=\"button\"\n :class=\"[{ 'click-through': props.enableTextFilter || props.showDropDown }]\"\n class=\"list-button\"\n >\n <slot></slot>\n <span class=\"list-button-icon-div\" :class=\"{ 'bigger-gap': props.showDropDown }\">\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': !props.showDropDown }]\"\n >\n <default-arrow aria-hidden=\"true\" />\n </span>\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': props.showDropDown }]\"\n >\n <default-arrow v-if=\"customIcon == null\" aria-hidden=\"true\" />\n </span>\n <span v-if=\"customIcon\" class=\"list-button-icon custom-icon\">\n <component aria-hidden=\"true\" :is=\"customIcon as object\" />\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType, ref } from 'vue'\nimport DefaultArrow from './default-arrow.vue'\n\n// prettier-ignore\nconst props = defineProps({ // eslint-disable-line\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n enableTextFilter: {\n type: Boolean,\n required: true\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n reverseDropDownList: {\n type: Boolean,\n required: true\n }\n})\n\nconst buttonRef = ref(null)\n\nfunction clickHandler() {\n if (props.enableTextFilter) return\n else props.parentMethods.openList()\n}\n\nfunction enterHandler(event: KeyboardEvent) {\n if (props.enableTextFilter) {\n props.parentMethods.focusInput()\n event.stopPropagation()\n event.preventDefault()\n } else {\n props.parentMethods.press(event)\n }\n}\n\nfunction spaceHandler(event: KeyboardEvent) {\n if (!props.enableTextFilter) props.parentMethods.press(event)\n}\n\nfunction blurInput() {\n if (buttonRef?.value) {\n const button: HTMLButtonElement = buttonRef.value\n button.blur()\n }\n}\n\nfunction focusInput() {\n if (buttonRef?.value) (buttonRef.value as HTMLButtonElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, buttonRef })\n</script>\n\n<style scoped>\n.list-button-icon {\n display: flex;\n transition-timing-function: ease-in-out;\n transition-duration: 200ms;\n transition-property: transform;\n width: 0.6rem;\n transform: rotate(0deg);\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n justify-content: center;\n max-height: 18%;\n}\n\n.list-button-icon.custom-icon {\n max-height: 100%;\n width: 1.25rem;\n}\n\n.list-button-icon.rotate-180 {\n transform: rotate(180deg);\n}\n\n.list-button {\n position: relative;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n height: 100%;\n background-color: var(--superlist-background-colour, white);\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n}\n\n.list-button:focus,\n.list-button:focus-visible,\n.list-button:active {\n text-align: left;\n}\n\n.list-button-icon-div {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-right: 0.75rem;\n max-height: 100%;\n height: 100%;\n gap: max(0.15rem, calc(6.25% + 0.075rem));\n transition: gap 200ms;\n}\n\n.list-button-icon-div.bigger-gap {\n gap: calc(40% - 0.25rem);\n}\n\n.click-through {\n pointer-events: none;\n}\n</style>\n","<template>\n <div style=\"position: relative\" :class=\"$attrs.class\">\n <item-list\n ref=\"itemListRef\"\n :show-drop-down=\"showDropDown\"\n :filteredListItems=\"filteredListItems\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"activeFocusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :max-list-height-p-x=\"maxListHeightPX\"\n :list-animation-duration-ms=\"listAnimationDurationMs\"\n :parent-methods=\"parentMethods\"\n v-model:blockListChange=\"blockListUpdates\"\n :total-options-count=\"totalOptionsCount\"\n @reverseDropDownList=\"reverseDropDownList = $event\"\n :enableScrollClose=\"enableScrollClose\"\n >\n <list-button\n ref=\"dropDownButtonInput\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :enable-text-filter=\"enableTextFilter\"\n :custom-icon=\"customIcon\"\n :reverse-drop-down-list=\"reverseDropDownList\"\n >\n <text-input\n ref=\"dropDownTextInput\"\n :enable-text-filter=\"enableTextFilter\"\n :show-drop-down=\"showDropDown\"\n :placeholder=\"placeholder\"\n :enable-button-click=\"enableButtonClick\"\n :parent-methods=\"parentMethods\"\n @update:query=\"query = $event\"\n />\n </list-button>\n </item-list>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, type PropType, ref, watch } from 'vue'\nimport {\n getLabelString,\n AbortablePromise,\n type DataSet,\n type EnumType,\n type ListRequest\n} from './DropDownLibrary'\nimport TextInput from './ListInputComponents/ListTextInput.vue'\nimport ItemList from './ListInputComponents/ItemList.vue'\nimport ListButton from './ListInputComponents/ListButton.vue'\n\nconst emit = defineEmits({ 'update:selected': null })\nconst props = defineProps({\n selected: {\n type: [String, Number, Object, null, undefined] as PropType<\n string | number | object | null | undefined\n >\n },\n options: {\n type: [Function, Array<string | number | object>] as PropType<\n ListRequest | Array<string | number | object>\n >,\n required: true\n },\n maxListOptions: {\n type: Number as PropType<number>,\n default: 50\n },\n maxListHeightPX: {\n type: Number as PropType<number>,\n default: 200\n },\n tooltip: {\n type: String,\n required: false\n },\n objectLabelKeyName: {\n type: String as PropType<string | null>,\n default: ''\n },\n enumKeyToLabelObjectArray: {\n type: Object as PropType<EnumType[]>,\n default: undefined\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n default: 300\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n forceTextFilterVisibilityTo: {\n type: Boolean as PropType<boolean>,\n default: undefined\n },\n customPlaceHolderFunction: {\n type: Function as PropType<Function | null>,\n default: null\n },\n colour: {\n type: String as PropType<string>,\n default: 'black'\n },\n scrollTextInputToTopOnMobile: {\n type: Boolean as PropType<boolean>,\n default: true\n }\n})\n\nconst listOptions = ref([] as Array<string | number | object>)\n\nconst abortablePromise = new AbortablePromise()\n\nconst totalOptionsCount = ref(0)\n\nconst enableTextFilter = computed((): boolean => {\n if (props.forceTextFilterVisibilityTo != undefined) return props.forceTextFilterVisibilityTo\n return totalOptionsCount.value > props.maxListOptions\n})\n\nconst showDropDown = ref<boolean>(false)\n\nconst blockListUpdates = ref<boolean>(false)\n\nconst reverseDropDownList = ref<boolean>(false)\n\nconst enableButtonClick = ref(true)\n\nconst loadingData = ref(false)\nconst errorState = ref(false)\n\nconst itemListRef = ref(ItemList)\nconst dropDownTextInput = ref(TextInput)\nconst dropDownButtonInput = ref(ListButton)\n\nconst query = ref('')\n\nwatch(\n () => query.value,\n (newV, oldV) => {\n if (newV !== oldV && typeof props.options === 'function') loadData(newV)\n }\n)\n\nconst blurInputIfNecessary = () => {\n if (enableTextFilter.value) dropDownTextInput?.value?.blurInput()\n}\n\nconst closeList = () => {\n clearTimeout(blockScrollCloseTimeout)\n blurInputIfNecessary()\n query.value = ''\n showDropDown.value = false\n enableButtonClick.value = true\n}\n\nconst placeholder = computed((): string => {\n if (errorState?.value === true) return 'Error loading data'\n if (loadingData?.value === true) return 'Loading...'\n return getLabel(props.selected)\n})\n\nconst updatedSelected = (newValue: any) => {\n if (newValue) emit('update:selected', newValue)\n closeList()\n}\n\nconst getLabel = (value?: string | number | object | null): string => {\n return getLabelString(\n value,\n props.customPlaceHolderFunction,\n props.objectLabelKeyName,\n props.enumKeyToLabelObjectArray\n )\n}\n\nfunction invalidArgumentError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid options argument provided to ListInputComponent`)\n}\n\nfunction invalidResponseError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid response provided to ListInputComponent, no total count key found`)\n}\n\nfunction invalidListValueKeyError() {\n loadingData.value = true\n errorState.value = true\n throw new Error('Invalid objectLabelKeyName for provided Dropdown list value.')\n}\n\nonMounted(() => {\n if (typeof props.options !== 'function' && !Array.isArray(props.options)) invalidArgumentError()\n else initializeOptions()\n})\n\nconst mouseHoveringOnList = ref(false)\n\nconst selectedIndex = ref(0)\nconst focusedIndex = ref(0)\nconst activeFocusedIndex = ref(0)\n\nwatch(\n () => focusedIndex.value,\n (newV, oldV) => {\n if (newV != oldV && !blockListUpdates.value) {\n activeFocusedIndex.value = newV\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => blockListUpdates.value,\n (newV) => {\n if (!newV) {\n activeFocusedIndex.value = focusedIndex.value\n }\n },\n { immediate: true }\n)\n\nconst filteredListItems = computed(() => {\n // if is function, return listOptions variable which is set by function\n if (typeof props.options === 'function' && !Array.isArray(props.options)) return listOptions.value\n const qry = query.value\n const lo = listOptions.value\n // else, is array, return filtered array\n return qry === '' ? lo : lo.filter((v) => getLabel(v).toLowerCase().includes(qry.toLowerCase()))\n})\n\nwatch(\n () => filteredListItems.value,\n (newV, oldV) => {\n if (JSON.stringify(newV) !== JSON.stringify(oldV)) focusSelectedOrFirstListItem()\n },\n { immediate: false, deep: true }\n)\n\nconst mouseOverList = () => {\n mouseHoveringOnList.value = true\n}\n\nconst focusSelectedOrFirstListItem = () => {\n const existingIndex = getSelectedValueIndex()\n selectedIndex.value = existingIndex /* may not be in the filtered list, allowed to be -1 */\n focusedIndex.value = existingIndex > -1 ? existingIndex : 0 /* default to first value */\n}\n\nfunction getSelectedValueIndex() {\n if (props.selected == null) return -1\n const labelsArray = filteredListItems.value.map((v) => getLabel(v))\n const matchingLabelsArray = labelsArray.filter((v) => v === getLabel(props.selected))\n if (matchingLabelsArray.length > 1) {\n const matchingIndexes = matchingLabelsArray.map((v) => labelsArray.indexOf(v))\n for (let i = 0; i < matchingIndexes.length; i++) {\n const currentMatchingOptionString = JSON.stringify(\n filteredListItems.value[matchingIndexes[i]]\n )\n const selectedOptionString = JSON.stringify(props.selected)\n if (currentMatchingOptionString === selectedOptionString) return matchingIndexes[i]\n }\n return -1\n }\n return labelsArray.indexOf(getLabel(props.selected))\n}\n\nconst openList = () => {\n if (loadingData.value) return\n if (!showDropDown.value) {\n blockListUpdates.value = false\n focusSelectedOrFirstListItem()\n scrollMobileTextInputToTop()\n showDropDown.value = true\n }\n mouseHoveringOnList.value = false\n enableButtonClick.value = false\n}\n\nconst scrollMobileTextInputToTop = () => {\n const mobileWindow: boolean = window?.innerWidth != null && window.innerWidth < 640\n const mobileScreen: boolean = screen?.width != null && screen.width < 640\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if ((mobileWindow || mobileScreen) && enableTextFilter.value) {\n preventScrollClose()\n if (props.scrollTextInputToTopOnMobile)\n textInput?.scrollIntoView({ block: 'start', inline: 'center' })\n }\n}\n\nconst enableScrollClose = ref<boolean>(true)\nlet blockScrollCloseTimeout = setTimeout(() => {}, 0)\n\nfunction preventScrollClose() {\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if (!textInput) return\n enableScrollClose.value = false\n let preventingScrollCloseInterval: NodeJS.Timeout | null = null\n\n const clearAll = () => {\n if (preventingScrollCloseInterval) clearInterval(preventingScrollCloseInterval)\n clearTimeout(blockScrollCloseTimeout)\n setTimeout(() => {\n enableScrollClose.value = true\n }, 100)\n }\n\n blockScrollCloseTimeout = setTimeout(clearAll, 5000)\n\n preventingScrollCloseInterval = setInterval(() => {\n if (\n showDropDown.value === false ||\n (textInput?.scrollTop === 0 && document.readyState === 'complete')\n )\n clearAll()\n }, 100)\n}\n\nconst focusInput = () => {\n if (enableTextFilter?.value == true) dropDownTextInput.value.focusInput()\n else if (dropDownButtonInput?.value?.focusInput) dropDownButtonInput?.value?.focusInput()\n}\n\nasync function initializeOptions(): Promise<void> {\n if (typeof props.options === 'function') {\n await loadData(query.value ? query.value : undefined, true)\n } else {\n validateListOptions(props.options as Array<string | number | object>)\n totalOptionsCount.value = listOptions.value.length\n }\n initializeSelected()\n}\n\ndefineExpose({ initializeOptions, getLabel })\n\nfunction initializeSelected() {\n const invalidSelection = getSelectedValueIndex() == -1\n const existingOptionNotSelected = invalidSelection && listOptions.value && !!listOptions.value[0]\n if (existingOptionNotSelected) updatedSelected(listOptions.value[0])\n}\n\nasync function loadData(stringFilter?: string, disableOnLoad: boolean = true) {\n loadingData.value = disableOnLoad\n const func = async () => (props.options as Function)(props.maxListOptions, stringFilter || '')\n const next = (response: DataSet<any>) => {\n if (!response || !('data' in response)) invalidArgumentError()\n validateListOptions(response.data)\n getOptionsCount(response?.data?.length ?? 0).then(() => {\n loadingData.value = false\n })\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nfunction validateListOptions(optns: Array<string | number | object>) {\n if (!Array.isArray(optns)) invalidArgumentError()\n if (optns.length > 0 && typeof optns[0] === 'object') validateObjectList(optns as Array<object>)\n listOptions.value = optns as Array<string | number | object>\n}\n\nfunction validateObjectList(values: Array<object>) {\n if (!props.objectLabelKeyName || props.objectLabelKeyName.length === 0) invalidListValueKeyError()\n const key: string = props.objectLabelKeyName as string\n for (let i = 0; i < values.length; i++) {\n if (typeof values[i] !== 'object' || !(key in values[i])) invalidListValueKeyError()\n }\n}\n\nasync function getOptionsCount(dataLength: number): Promise<void> {\n const func = async () => (props.options as Function)(1, '')\n const next = (response: DataSet<any>) => {\n if (!response || !('totalNum' in response)) invalidResponseError()\n totalOptionsCount.value = response.totalNum ?? dataLength\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nconst getCurrentlyFocusedListItemElement = (): HTMLElement | null => {\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n return listInput?.getElementsByTagName('li')[focusedIndex.value] ?? null\n}\n\nconst press = (event?: any) => {\n if (showDropDown.value == false) {\n openList()\n } else if (event) {\n keypress(event)\n }\n}\n\nconst keypress = (event: any) => {\n const key: string = event.key || event.code\n if (key === 'Tab' || key === 'Escape') closeList()\n if (key === 'ArrowDown') down(event)\n if (key === 'ArrowUp') up(event)\n if (key === 'Enter' || key === ' ') updateSelectedFromTextQuery()\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst updateSelectedFromTextQuery = () => {\n if (filteredListItems.value.length > 0) {\n blockListUpdates.value = true\n updatedSelected(filteredListItems.value[focusedIndex.value])\n } else {\n closeList()\n }\n}\n\nconst down = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value < filteredListItems.value.length - 1) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value++\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst up = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value > 0) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value--\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst unfocus = (event: any) => {\n if (showDropDown?.value === false) return\n if (query.value.length > 0) blockListUpdates.value = true\n const list: HTMLElement | null = itemListRef?.value?.listContainerRef as HTMLElement | null\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n const isListInput = event?.relatedTarget && listInput?.isEqualNode(event?.relatedTarget)\n const isList = event?.relatedTarget && list && list.contains(event?.relatedTarget)\n const isListItem = event?.relatedTarget && list && list.isEqualNode(event?.relatedTarget)\n if (isList || isListInput) return\n if (isListItem) {\n focusInput()\n return\n }\n closeList()\n}\n\nconst parentMethods = {\n openList: openList,\n unfocus: unfocus,\n press: press,\n mouseOverList: mouseOverList,\n getLabel: getLabel,\n updatedSelected: updatedSelected,\n focusInput: focusInput,\n closeList: closeList\n}\n</script>\n\n<style scoped>\n* {\n box-sizing: border-box;\n}\n</style>\n"],"names":["DocumentViewChangeListener","targetFunction","targetNode","event","eventType","getLabelString","value","customLabelGetFunction","objectLabelKeyName","enumKeyToLabelObjectArray","getEnumLabel","enumKeyArray","eT","AbortablePromise","signal","asyncFunc","then","response","func","reason","emit","__emit","props","__props","textInputRef","ref","focusInHandler","e","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","_createElementVNode","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","iRefs","useTemplateRef","focusedLi","focused","watch","scrollHighlightedListItemToTop","scrollHighlightedListItemIntoView","li","liParent","aboveTop","belowBottom","_Fragment","_renderList","listItem","index","_withModifiers","_hoisted_2","_toDisplayString","_createBlock","DefaultTick","_hoisted_3","dropDownButtonContainer","dropDownListUL","listContainerRef","offsetLeft","offsetTop","offsetBottom","listOffset","parentWidthPx","listElementOpenAndVisible","listItemsToDisplay","listHeightPx","reverseList","sufficientRoomAbove","insufficientRoomBelow","noScroll","reverse","parentXPx","parentYPx","preventSpaceScrollingList","refocusTextInput","list","target","getListULHeight","displayableListHeight","ulHt","maxListHeightPx","animationDuration","updatedListItemsToDisplay","newVal","unobserveTimeout","changeListener","openAndObserveChangeListener","buttonRePositionCallback","closeAndUnobserveChangeListener","newV","oldV","setOffsets","nextTick","closeListOnScrollIfNecessary","insideListOrOtherList","isScrollEvent","insideButton","insideList","otherList","setButtonOffset","setListOffset","brc","getButtonContainerElement","slrc","currentListOffset","currentOffsetLeft","getButtonElement","onMounted","onUnmounted","_renderSlot","_ctx","_createVNode","ListItem","buttonRef","clickHandler","enterHandler","spaceHandler","DefaultArrow","_resolveDynamicComponent","listOptions","abortablePromise","totalOptionsCount","enableTextFilter","showDropDown","blockListUpdates","reverseDropDownList","enableButtonClick","loadingData","errorState","itemListRef","ItemList","dropDownTextInput","TextInput","dropDownButtonInput","ListButton","query","blurInputIfNecessary","closeList","blockScrollCloseTimeout","placeholder","getLabel","updatedSelected","newValue","invalidArgumentError","invalidResponseError","invalidListValueKeyError","initializeOptions","mouseHoveringOnList","selectedIndex","focusedIndex","activeFocusedIndex","filteredListItems","qry","lo","v","focusSelectedOrFirstListItem","mouseOverList","existingIndex","getSelectedValueIndex","labelsArray","matchingLabelsArray","matchingIndexes","i","currentMatchingOptionString","selectedOptionString","openList","scrollMobileTextInputToTop","mobileWindow","mobileScreen","textInput","preventScrollClose","enableScrollClose","preventingScrollCloseInterval","clearAll","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","optns","validateObjectList","values","key","dataLength","getCurrentlyFocusedListItemElement","press","keypress","down","up","updateSelectedFromTextQuery","parentMethods","listInput","isListInput","isList","isListItem","$attrs"],"mappings":";AAQO,MAAMA,GAAiE;AAAA,EAC3D,cAAwB,CAAC,UAAU,QAAQ,UAAU,SAAS,WAAW;AAAA,EACzE,SAA+B;AAAA,IAC9C,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,EACX;AAAA,EACQ;AAAA,EACA;AAAA,EAER,YAAYC,GAA0BC,IAAkB,SAAS,MAAM;AACrE,SAAK,aAAaA,GAClB,KAAK,mBAAoB,CAACC,MACxBF,EAAeE,CAAK,GACtB,KAAK,mBAAmB,IAAI,iBAAkB,MAAMF,GAAqC;AAAA,EAAA;AAAA,EAGpF,UAAgB;AACrB,SAAK,iBAAiB,QAAQ,KAAK,YAAY,KAAK,MAAM;AAC1D,eAAWG,KAAa,KAAK,YAAa,MAAK,YAAYA,CAAS;AACpE,SAAK,kBAAkB,GACvB,KAAK,yBAAyB;AAAA,EAAA;AAAA,EAGhC,wBAA8B;AAC5B,SAAK,iBAAiB,WAAW;AAAA,EAAA;AAAA,EAGnC,0BAAgC;AAC9B,SAAK,iBAAiB,QAAQ,KAAK,YAAY,KAAK,MAAM;AAAA,EAAA;AAAA,EAGrD,YAAkB;AACvB,SAAK,iBAAiB,WAAW;AACjC,eAAWA,KAAa,KAAK,YAAa,MAAK,eAAeA,CAAS;AACvE,SAAK,qBAAqB,GAC1B,KAAK,4BAA4B;AAAA,EAAA;AAAA,EAG3B,YAAYA,GAAyB;AAC3C,aAAS,iBAAiBA,GAAW,KAAK,kBAAkB,EAAI;AAAA,EAAA;AAAA,EAG1D,eAAeA,GAAyB;AAC9C,aAAS,oBAAoBA,GAAW,KA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,gBACH,sBAAoBT,EAAgB;AAAA,gBACpC,kBAAgBC,EAAY;AAAA,gBAC5B,aAAagB,GAAW;AAAA,gBACxB,uBAAqBb,EAAiB;AAAA,gBACtC,kBAAgBkE;AAAA,gBAChB,kBAAYnK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAD,MAAE2G,EAAK,QAAG3G;AAAA,cAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"super-list.js","sources":["../src/DropDownLibrary.ts","../src/ListInputComponents/ListTextInput.vue","../src/ListInputComponents/default-tick.vue","../src/ListInputComponents/ListItem.vue","../src/ListInputComponents/ItemList.vue","../src/ListInputComponents/default-arrow.vue","../src/ListInputComponents/ListButton.vue","../src/super-list.vue"],"sourcesContent":["export interface DocumentViewChangeListener {\n targetNode: HTMLElement\n observe(): void\n unobserve(): void\n pauseMutationObserver(): void\n unpauseMutationObserver(): void\n}\n\nexport class DocumentViewChangeListener implements DocumentViewChangeListener {\n private readonly eventsTypes: string[] = ['resize', 'load', 'scroll', 'wheel', 'touchmove']\n private readonly config: MutationObserverInit = {\n attributes: true,\n childList: true,\n subtree: true\n }\n private mutationObserver: MutationObserver\n private callbackFunction: EventListenerOrEventListenerObject\n\n constructor(targetFunction: Function, targetNode: any = document.body) {\n this.targetNode = targetNode\n this.callbackFunction = ((event: any) =>\n targetFunction(event)) as EventListenerOrEventListenerObject\n this.mutationObserver = new MutationObserver((() => targetFunction()) as MutationCallback)\n }\n\n public observe(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n for (const eventType of this.eventsTypes) this.addListener(eventType)\n this.addResizeListener()\n this.addTransitionEndListener()\n }\n\n pauseMutationObserver(): void {\n this.mutationObserver.disconnect()\n }\n\n unpauseMutationObserver(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n }\n\n public unobserve(): void {\n this.mutationObserver.disconnect()\n for (const eventType of this.eventsTypes) this.removeListener(eventType)\n this.removeResizeListener()\n this.removeTransitionEndListener()\n }\n\n private addListener(eventType: string): void {\n document.addEventListener(eventType, this.callbackFunction, true)\n }\n\n private removeListener(eventType: string): void {\n document.removeEventListener(eventType, this.callbackFunction, true)\n }\n\n private addTransitionEndListener(): void {\n this.targetNode.addEventListener('transitionend', this.callbackFunction)\n }\n\n private removeTransitionEndListener(): void {\n this.targetNode.removeEventListener('transitionend', this.callbackFunction)\n }\n\n private addResizeListener(): void {\n window.addEventListener('resize', this.callbackFunction)\n }\n\n private removeResizeListener(): void {\n window.removeEventListener('resize', this.callbackFunction)\n }\n}\n\nexport function getLabelString(\n value: string | number | object | null | undefined,\n customLabelGetFunction: Function | null | undefined,\n objectLabelKeyName: string | null,\n enumKeyToLabelObjectArray?: EnumType[]\n): string {\n if (customLabelGetFunction != null) return customLabelGetFunction(value)\n if (value == null) return ''\n if (typeof value === 'object') return value[objectLabelKeyName as keyof typeof value]\n if (enumKeyToLabelObjectArray) return getEnumLabel(value, enumKeyToLabelObjectArray)\n return '' + value\n}\n\nfunction getEnumLabel(value: string | number, enumKeyArray: EnumType[]): string {\n return (enumKeyArray.find((eT: EnumType): boolean => eT.type === value)?.label ?? '') as string\n}\n\nexport type ListRequest = (maxNumItems: number, stringFilter?: string) => Promise<DataSet<any>>\n\nexport type EnumType = { type: string; label: string }\n\nexport type DataSet<T> = { data: T[]; totalNum: number; modelName?: string }\n\nexport interface AbortablePromise {\n abortController: AbortController\n func: Function\n then: Function\n}\n\nexport class AbortablePromise implements AbortablePromise {\n constructor() {\n this.abortController = new AbortController()\n this.func = (): void => {}\n this.then = (): void => {}\n }\n\n async abortablePromise(signal: AbortSignal, asyncFunc: Function, then: Function): Promise<any> {\n const response = await asyncFunc()\n if (signal.aborted) return\n return then(response)\n }\n\n setFunc(func: Function): void {\n this.func = func\n }\n\n setThen(then: Function): void {\n this.then = then\n }\n\n execute(): Promise<any> {\n return this.abortablePromise(this.abortController.signal, this.func, this.then)\n }\n\n abort(reason?: string): void {\n this.abortController.abort(reason || 'Aborted By Controller.')\n this.abortController = new AbortController()\n }\n\n resetAndExecute(func: Function, then: Function): Promise<any> {\n this.abort('New Request From Controller.')\n this.setFunc(func)\n this.setThen(then)\n return this.execute()\n }\n}\n","<template>\n <form @submit.prevent style=\"display: contents !important;\">\n <!-- Forces virtual keyboard to display return/enter key when list exists in external form -->\n <input\n ref=\"textInputRef\"\n :tabindex=\"enableTextFilter ? 0 : -1\"\n @keydown.enter=\"parentMethods.press($event)\"\n @keydown.space=\"parentMethods.press()\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusin=\"focusInHandler($event)\"\n @focusout=\"focusOutHandler($event)\"\n @input=\"updateQuery($event as InputEvent)\"\n type=\"text\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n :placeholder=\"placeholder\"\n :size=\"textInputSize\"\n :class=\"[\n pointerEventsClass,\n textInputColourClass,\n { 'text-filter-disabled': !enableTextFilter }\n ]\"\n class=\"list-filter-text-input\"\n />\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType, ref } from 'vue'\n\nconst emit = defineEmits({\n 'update:selected': null,\n 'update:query': null,\n 'update:press': null\n})\n\nconst props = defineProps({\n enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: true\n },\n placeholder: {\n type: String as PropType<string | undefined>,\n default: undefined\n },\n enableButtonClick: {\n type: Boolean as PropType<boolean | null>,\n default: true\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n }\n})\nconst textInputRef = ref(null)\n\nfunction focusInHandler(e: FocusEvent) {\n if ('sourceCapabilities' in e && e.sourceCapabilities == null) props.parentMethods.closeList()\n else props.parentMethods.openList()\n}\n\nfunction focusOutHandler(event: FocusEvent) {\n props.parentMethods.unfocus(event)\n}\n\nfunction updateQuery(event: any) {\n if (event?.target?.value != undefined) emit('update:query', event.target.value)\n}\n\nconst textInputSize = computed(() => {\n const refLength: number = textInputRef?.value ? (textInputRef.value as string).length : 0\n const placeHolderLength: number = props.placeholder?.length || 0\n return refLength > 0 ? refLength : placeHolderLength > 0 ? placeHolderLength : 5\n})\n\nconst pointerEventsClass = computed(() => {\n const enable: boolean = props.enableButtonClick === true && props.enableTextFilter === true\n return enable ? '' : 'click-through'\n})\n\nconst textInputColourClass = computed(() => {\n const dark: boolean = (props.showDropDown && !props.enableTextFilter) || !props.showDropDown\n return dark ? 'dark-placeholder-text' : 'light-placeholder-text'\n})\n\nfunction blurInput() {\n if (textInputRef?.value) {\n const input: HTMLInputElement = textInputRef.value\n input.blur()\n input.value = ''\n }\n}\n\nfunction focusInput() {\n if (textInputRef?.value) (textInputRef.value as HTMLInputElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, textInputRef })\n</script>\n\n<style scoped>\n.list-filter-text-input {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n text-align: center;\n padding: 0.125rem 2rem 0.125rem 0.5rem;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: transparent;\n border: 0 none;\n pointer-events: auto;\n cursor: text;\n}\n\n.list-filter-text-input:focus,\n.list-filter-text-input:focus-visible,\n.list-filter-text-input:active {\n text-align: left;\n}\n\n.click-through {\n pointer-events: none;\n}\n\n.dark-placeholder-text::placeholder {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n}\n\n.light-placeholder-text::placeholder {\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.text-filter-disabled {\n background-color: transparent;\n border: none;\n outline: none;\n box-shadow: none;\n filter: none;\n}\n\n@media (min-width: 640px) {\n .list-filter-text-input {\n font-size: 0.875rem;\n line-height: 1.5rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 -16 16 17\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <li\n v-for=\"(listItem, index) in filteredListItems\"\n :key=\"index\"\n ref=\"items\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n tabindex=\"-1\"\n @mousedown.left=\"parentMethods.updatedSelected(listItem)\"\n :class=\"[\n { 'list-option-selected': selectedIndex === index },\n {\n 'list-option-active':\n filteredListItems.length === 1 || (focusedIndex === index && !mouseHoveringOnList)\n },\n 'list-option'\n ]\"\n >\n <span class=\"list-item-span\">{{ parentMethods.getLabel(listItem) }}</span>\n <default-tick v-if=\"selectedIndex === index\" class=\"list-item-icon\" aria-hidden=\"true\" />\n </li>\n <li\n v-if=\"filteredListItems.length === 0\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">No Items To Display.</span>\n </li>\n <li\n v-if=\"totalOptionsCount && totalOptionsCount > (filteredListItems?.length || 0)\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">\n +{{ totalOptionsCount - filteredListItems?.length || 0 }} More Items...</span\n >\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type ShallowRef, useTemplateRef, watch } from 'vue'\nimport DefaultTick from './default-tick.vue'\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n listElementOpenAndVisible: {\n type: Boolean,\n default: false\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n default: false\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n }\n})\ntype HTMLLIElementOrArray = HTMLLIElement | HTMLLIElement[] | null\nconst iRefs: Readonly<ShallowRef<HTMLLIElementOrArray>> = useTemplateRef('items')\n\nconst focusedLi = computed((): HTMLElement | null => {\n if (!iRefs?.value) return null\n const refs: Array<HTMLLIElement | null> = Array.isArray(iRefs.value) ? iRefs.value : [iRefs.value]\n const focused = refs[props.focusedIndex]\n if (!focused) return null\n const isObject: boolean = typeof focused == 'object'\n const hasScrollIntoView: boolean = isObject && 'scrollIntoView' in focused\n const hasScrollFunc: boolean = hasScrollIntoView && typeof focused['scrollIntoView'] == 'function'\n return hasScrollFunc ? focused : null\n})\n\nwatch(\n () => props.showDropDown,\n () => scrollHighlightedListItemToTop()\n)\nwatch(\n () => props.listElementOpenAndVisible,\n () => scrollHighlightedListItemIntoView()\n)\nwatch(\n () => focusedLi.value,\n () => scrollHighlightedListItemIntoView()\n)\n\nfunction scrollHighlightedListItemToTop(): void {\n if (!props.showDropDown || !focusedLi?.value?.parentElement?.parentElement) return\n focusedLi.value.parentElement.parentElement.scrollTop = focusedLi.value.offsetTop\n}\n\nfunction scrollHighlightedListItemIntoView(): void {\n const li = focusedLi.value\n const liParent = li?.parentElement?.parentElement\n if (!props.showDropDown || !li || !liParent) return\n const aboveTop = li.offsetTop - liParent.scrollTop < 0\n const belowBottom = li.offsetTop + li.offsetHeight - liParent.scrollTop > liParent.clientHeight\n if (aboveTop) liParent.scrollTop = li.offsetTop\n if (belowBottom) liParent.scrollTop = li.offsetTop + li.clientHeight - liParent.clientHeight\n}\n</script>\n\n<style scoped>\n.list-option {\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n transition-property: font-weight, background-color, color, text-shadow;\n transition-duration: 500ms;\n transition-timing-function: ease;\n font-weight: 400;\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n}\n\n.list-option:focus-visible,\n.list-option > span:focus-visible {\n outline: none;\n}\n\n.list-option-selected {\n font-weight: 600;\n}\n\n.list-option-message {\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.list-option-active:hover,\n.list-option-active,\n.list-option-selected:hover,\n.list-option:hover {\n font-weight: 600;\n background-color: var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n color: var(--superlist-background-colour, white);\n text-shadow: 1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n transition-duration: 0s !important;\n}\n\n.list-item-icon {\n display: flex;\n height: 1rem;\n width: 1rem;\n position: absolute;\n right: 0.7rem;\n margin-top: -0.1rem;\n align-self: center;\n}\n\n.list-item-span {\n padding: 0.5rem 1.75rem 0.5rem 0.75rem;\n width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n","<template>\n <div ref=\"dropDownButtonContainer\" class=\"super-list-button-container\">\n <slot></slot>\n </div>\n <div\n id=\"super-list-select-list\"\n ref=\"listContainerRef\"\n @mouseenter=\"parentMethods.mouseOverList()\"\n tabindex=\"-1\"\n :class=\"[\n 'select-list',\n reverseList ? 'list-reverse' : 'list-normal',\n { 'select-list-open': showDropDown },\n { 'no-scroll': noScroll && listElementOpenAndVisible },\n { 'select-list-fixed': listElementOpenAndVisible },\n { 'select-list-scrollable': !noScroll }\n ]\"\n @keydown.space=\"preventSpaceScrollingList($event)\"\n @mouseup.left=\"refocusTextInput($event)\"\n >\n <ul tabindex=\"-1\" ref=\"dropDownListUL\" class=\"list-content\">\n <list-item\n :filteredListItems=\"listItemsToDisplay\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"focusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :listElementOpenAndVisible=\"listElementOpenAndVisible\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :total-options-count=\"totalOptionsCount\"\n />\n </ul>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n type ComputedRef,\n nextTick,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch\n} from 'vue'\nimport ListItem from '../ListInputComponents/ListItem.vue'\nimport { DocumentViewChangeListener } from '../DropDownLibrary'\n\nconst emit = defineEmits(['reverseDropDownList'])\n\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n maxListHeightPX: {\n type: Number,\n required: true\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n required: true\n },\n blockListChange: {\n type: Boolean,\n required: true\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n },\n enableScrollClose: {\n type: Boolean,\n default: true\n }\n})\n\nconst dropDownButtonContainer = ref<HTMLElement | null>(null)\nconst dropDownListUL = ref<HTMLElement | null>(null)\nconst listContainerRef = ref<HTMLElement | null>(null)\nconst offsetLeft = ref<number>(0)\nconst offsetTop = ref<number>(0)\nconst offsetBottom = ref<number>(0)\nconst listOffset = ref<number>(0)\nconst parentWidthPx = ref<string>('0px')\nconst listElementOpenAndVisible = ref<boolean>(false)\nconst listItemsToDisplay = ref<any[]>([])\nconst listHeightPx = ref<number>(0)\n\nconst reverseList = computed((): boolean => {\n if (!listElementOpenAndVisible.value || window?.innerHeight == null) return false\n return sufficientRoomAbove() && insufficientRoomBelow()\n})\n\nconst noScroll = computed((): boolean => {\n return props.maxListHeightPX >= listHeightPx.value\n})\n\nwatch(\n () => reverseList.value,\n (reverse: boolean) => emit('reverseDropDownList', reverse),\n { immediate: true }\n)\n\nconst parentXPx = computed((): string => offsetLeft.value + 'px')\nconst parentYPx = computed((): string => listOffset.value + 'px')\n\ndefineExpose({ listContainerRef })\n\nconst preventSpaceScrollingList = (event: any) => {\n if (event?.key && event.key === ' ') event.preventDefault()\n}\n\nconst refocusTextInput = (event: MouseEvent) => {\n const list = listContainerRef?.value as HTMLElement | null\n const target = event.target as HTMLElement | null\n if (!(list && target && list.contains(target)) || list.isEqualNode(target))\n props.parentMethods.focusInput()\n}\n\nfunction getListULHeight(): number {\n return dropDownListUL?.value ? (dropDownListUL?.value as HTMLElement).clientHeight : 0\n}\n\nfunction displayableListHeight(): number {\n if (!listElementOpenAndVisible.value || getListULHeight() === 0) return props.maxListHeightPX\n const ulHt: number = getListULHeight() === 0 ? props.maxListHeightPX : +getListULHeight()\n return props.maxListHeightPX && props.maxListHeightPX > ulHt ? ulHt : props.maxListHeightPX\n}\n\nfunction sufficientRoomAbove(): boolean {\n return offsetTop.value > displayableListHeight()\n}\n\nfunction insufficientRoomBelow(): boolean {\n return offsetBottom.value < displayableListHeight()\n}\n\nconst maxListHeightPx = computed((): string => (props.maxListHeightPX || 0) + 'px')\n\nconst animationDuration = computed((): string => (props.listAnimationDurationMs || 0) + 'ms')\n\nconst updatedListItemsToDisplay = computed((): any[] => {\n return !props.blockListChange ? props.filteredListItems : listItemsToDisplay.value\n})\n\nwatch(\n () => updatedListItemsToDisplay,\n (newVal: ComputedRef<any[]>) => {\n if (newVal) listItemsToDisplay.value = newVal.value\n },\n { immediate: false, deep: true }\n)\n\nlet unobserveTimeout = setTimeout(() => {}, 0)\n\nlet changeListener: DocumentViewChangeListener | null = null\n\nfunction openAndObserveChangeListener() {\n listHeightPx.value = getListULHeight()\n clearTimeout(unobserveTimeout)\n if (changeListener) changeListener.observe()\n listElementOpenAndVisible.value = true\n buttonRePositionCallback(undefined)\n}\n\nfunction closeAndUnobserveChangeListener() {\n clearTimeout(unobserveTimeout)\n unobserveTimeout = setTimeout(() => {\n if (!props.showDropDown) {\n listElementOpenAndVisible.value = false\n if (changeListener) changeListener.unobserve()\n }\n }, props.listAnimationDurationMs + 50)\n}\n\nwatch(\n () => props.showDropDown,\n (newV, oldV) => {\n if (newV !== oldV) {\n setOffsets()\n if (newV) openAndObserveChangeListener()\n else closeAndUnobserveChangeListener()\n }\n },\n { immediate: true }\n)\n\nfunction buttonRePositionCallback(e: any): void {\n setOffsets()\n nextTick(() => setOffsets())\n closeListOnScrollIfNecessary(e)\n}\n\nfunction closeListOnScrollIfNecessary(e: any) {\n if (!props.enableScrollClose || !props.showDropDown) return\n const notInitialized: boolean = typeof listContainerRef?.value?.contains !== 'function'\n if (notInitialized || e?.target?.nodeType == null || insideListOrOtherList(e)) return\n const isScrollEvent: boolean = ['scroll', 'wheel', 'touchmove'].includes(e?.type)\n if (props.showDropDown && isScrollEvent) props.parentMethods.closeList()\n}\n\nfunction insideListOrOtherList(e: any): boolean {\n const insideButton: boolean = !!dropDownButtonContainer.value?.contains(e?.target as Node)\n const insideList: boolean = !!listContainerRef.value?.contains(e.target as Node)\n const otherList: boolean = [e?.srcElement?.id, e?.target?.id].includes('super-list-select-list')\n return insideButton || insideList || otherList\n}\n\nfunction setOffsets(): void {\n setButtonOffset()\n setListOffset()\n}\n\nfunction setButtonOffset(): void {\n if (dropDownButtonContainer?.value == null) return\n const brc: DOMRect = (dropDownButtonContainer.value as HTMLElement).getBoundingClientRect()\n offsetTop.value = brc.top\n offsetBottom.value = window.innerHeight - brc.bottom\n parentWidthPx.value = brc.width + 'px'\n}\n\nfunction setListOffset(): void {\n /**\n * List container must be used when calculating position and not \"dropDownListUL\".\n * Position must be calculated as window viewport might not match list container viewport.\n **/\n if (dropDownButtonContainer?.value == null || listContainerRef?.value == null) return\n const brc: DOMRect = getButtonContainerElement().getBoundingClientRect()\n const slrc: DOMRect = (listContainerRef.value as HTMLElement).getBoundingClientRect()\n const currentListOffset: number = listOffset.value\n const currentOffsetLeft: number = offsetLeft.value\n if (reverseList.value) listOffset.value = currentListOffset - (brc.top - slrc.bottom)\n else listOffset.value = currentListOffset - (slrc.top - brc.bottom)\n offsetLeft.value = currentOffsetLeft - (slrc.left - brc.left)\n}\n\nfunction getButtonElement(): HTMLButtonElement {\n return (dropDownButtonContainer?.value as HTMLElement).getElementsByTagName('button')[0]\n}\n\nfunction getButtonContainerElement(): HTMLDivElement {\n return dropDownButtonContainer?.value as HTMLDivElement\n}\n\nonMounted(() => {\n changeListener = new DocumentViewChangeListener(buttonRePositionCallback, getButtonElement())\n setTimeout(() => buttonRePositionCallback(undefined), 250)\n})\n\nonUnmounted(() => {\n changeListener?.unobserve()\n})\n</script>\n\n<style scoped>\n.list-normal {\n top: var(--parent-y);\n}\n\n.list-reverse {\n bottom: var(--parent-y);\n}\n\n.select-list {\n --parent-width: v-bind(parentWidthPx);\n --parent-x: v-bind(parentXPx);\n --parent-y: v-bind(parentYPx);\n --duration: v-bind(animationDuration);\n --border-radius: var(--superlist-list-border-radius, 0);\n border-radius: var(--border-radius);\n width: var(--parent-width);\n min-width: var(--parent-width);\n left: var(--parent-x);\n display: block;\n transition-property: max-height, opacity, visibility, box-shadow;\n transition-duration: var(--duration, 300ms);\n transition-timing-function: cubic-bezier(0.1, 0.9, 0.35, 0.98);\n position: absolute;\n backdrop-filter: blur(3px);\n -webkit-backdrop-filter: blur(3px);\n background-color: rgb(255, 255, 255, 0.7);\n align-items: baseline;\n opacity: 0.25;\n z-index: 999;\n visibility: collapse;\n overflow: auto;\n max-height: 0;\n border: none !important; /* can't transition border */\n}\n\n.select-list:focus-visible,\n.select-list > ul:focus-visible,\n.super-list-button-container:focus-visible {\n outline: none;\n}\n\n.super-list-button-container {\n height: 100%;\n width: 100%;\n}\n\n.select-list.select-list-open {\n z-index: 999999;\n --max-height: v-bind(maxListHeightPx);\n max-height: var(--max-height, 0);\n}\n\n.select-list.no-scroll {\n overflow: hidden;\n}\n\n.select-list-fixed {\n position: fixed;\n opacity: 1;\n visibility: visible;\n}\n\n.list-content {\n --duration: v-bind(animationDuration);\n overflow: visible;\n margin: 0;\n padding: 0;\n border-style: none;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n list-style: none;\n max-width: 100%;\n}\n\n.select-list.select-list-scrollable {\n border-radius: var(--border-radius);\n}\n\n.select-list:not(.select-list-fixed) {\n transition: none;\n box-shadow: none !important;\n}\n\n@media (min-width: 640px) {\n .select-list.select-list-scrollable {\n border-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n .list-content {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 0 12 6\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <button\n ref=\"buttonRef\"\n :tabindex=\"enableTextFilter ? -1 : 0\"\n @keydown.enter=\"enterHandler($event)\"\n @keydown.space=\"spaceHandler($event)\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @click=\"clickHandler()\"\n type=\"button\"\n :class=\"[{ 'click-through': props.enableTextFilter || props.showDropDown }]\"\n class=\"list-button\"\n >\n <slot></slot>\n <span class=\"list-button-icon-div\" :class=\"{ 'bigger-gap': props.showDropDown }\">\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': !props.showDropDown }]\"\n >\n <default-arrow aria-hidden=\"true\" />\n </span>\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': props.showDropDown }]\"\n >\n <default-arrow v-if=\"customIcon == null\" aria-hidden=\"true\" />\n </span>\n <span v-if=\"customIcon\" class=\"list-button-icon custom-icon\">\n <component aria-hidden=\"true\" :is=\"customIcon as object\" />\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType, ref } from 'vue'\nimport DefaultArrow from './default-arrow.vue'\n\n// prettier-ignore\nconst props = defineProps({ // eslint-disable-line\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n enableTextFilter: {\n type: Boolean,\n required: true\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n reverseDropDownList: {\n type: Boolean,\n required: true\n }\n})\n\nconst buttonRef = ref(null)\n\nfunction clickHandler() {\n if (props.enableTextFilter) return\n else props.parentMethods.openList()\n}\n\nfunction enterHandler(event: KeyboardEvent) {\n if (props.enableTextFilter) {\n props.parentMethods.focusInput()\n event.stopPropagation()\n event.preventDefault()\n } else {\n props.parentMethods.press(event)\n }\n}\n\nfunction spaceHandler(event: KeyboardEvent) {\n if (!props.enableTextFilter) props.parentMethods.press(event)\n}\n\nfunction blurInput() {\n if (buttonRef?.value) {\n const button: HTMLButtonElement = buttonRef.value\n button.blur()\n }\n}\n\nfunction focusInput() {\n if (buttonRef?.value) (buttonRef.value as HTMLButtonElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, buttonRef })\n</script>\n\n<style scoped>\n.list-button-icon {\n display: flex;\n transition-timing-function: ease-in-out;\n transition-duration: 200ms;\n transition-property: transform;\n width: 0.6rem;\n transform: rotate(0deg);\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n justify-content: center;\n max-height: 18%;\n}\n\n.list-button-icon.custom-icon {\n max-height: 100%;\n width: 1.25rem;\n}\n\n.list-button-icon.rotate-180 {\n transform: rotate(180deg);\n}\n\n.list-button {\n position: relative;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n height: 100%;\n background-color: var(--superlist-background-colour, white);\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n}\n\n.list-button:focus,\n.list-button:focus-visible,\n.list-button:active {\n text-align: left;\n}\n\n.list-button-icon-div {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-right: 0.75rem;\n max-height: 100%;\n height: 100%;\n gap: max(0.15rem, calc(6.25% + 0.075rem));\n transition: gap 200ms;\n}\n\n.list-button-icon-div.bigger-gap {\n gap: calc(40% - 0.25rem);\n}\n\n.click-through {\n pointer-events: none;\n}\n</style>\n","<template>\n <div style=\"position: relative\" :class=\"$attrs.class\">\n <item-list\n ref=\"itemListRef\"\n :show-drop-down=\"showDropDown\"\n :filteredListItems=\"filteredListItems\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"activeFocusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :max-list-height-p-x=\"maxListHeightPX\"\n :list-animation-duration-ms=\"listAnimationDurationMs\"\n :parent-methods=\"parentMethods\"\n v-model:blockListChange=\"blockListUpdates\"\n :total-options-count=\"totalOptionsCount\"\n @reverseDropDownList=\"reverseDropDownList = $event\"\n :enableScrollClose=\"enableScrollClose\"\n >\n <list-button\n ref=\"dropDownButtonInput\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :enable-text-filter=\"enableTextFilter\"\n :custom-icon=\"customIcon\"\n :reverse-drop-down-list=\"reverseDropDownList\"\n >\n <text-input\n ref=\"dropDownTextInput\"\n :enable-text-filter=\"enableTextFilter\"\n :show-drop-down=\"showDropDown\"\n :placeholder=\"placeholder\"\n :enable-button-click=\"enableButtonClick\"\n :parent-methods=\"parentMethods\"\n @update:query=\"query = $event\"\n />\n </list-button>\n </item-list>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, type PropType, ref, watch } from 'vue'\nimport {\n getLabelString,\n AbortablePromise,\n type DataSet,\n type EnumType,\n type ListRequest\n} from './DropDownLibrary'\nimport TextInput from './ListInputComponents/ListTextInput.vue'\nimport ItemList from './ListInputComponents/ItemList.vue'\nimport ListButton from './ListInputComponents/ListButton.vue'\n\nconst emit = defineEmits({ 'update:selected': null })\nconst props = defineProps({\n selected: {\n type: [String, Number, Object, null, undefined] as PropType<\n string | number | object | null | undefined\n >\n },\n options: {\n type: [Function, Array<string | number | object>] as PropType<\n ListRequest | Array<string | number | object>\n >,\n required: true\n },\n maxListOptions: {\n type: Number as PropType<number>,\n default: 50\n },\n maxListHeightPX: {\n type: Number as PropType<number>,\n default: 200\n },\n tooltip: {\n type: String,\n required: false\n },\n objectLabelKeyName: {\n type: String as PropType<string | null>,\n default: ''\n },\n enumKeyToLabelObjectArray: {\n type: Object as PropType<EnumType[]>,\n default: undefined\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n default: 300\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n forceTextFilterVisibilityTo: {\n type: Boolean as PropType<boolean>,\n default: undefined\n },\n customPlaceHolderFunction: {\n type: Function as PropType<Function | null>,\n default: null\n },\n colour: {\n type: String as PropType<string>,\n default: 'black'\n },\n scrollTextInputToTopOnMobile: {\n type: Boolean as PropType<boolean>,\n default: true\n }\n})\n\nconst listOptions = ref([] as Array<string | number | object>)\n\nconst abortablePromise = new AbortablePromise()\n\nconst totalOptionsCount = ref(0)\n\nconst enableTextFilter = computed((): boolean => {\n if (props.forceTextFilterVisibilityTo != undefined) return props.forceTextFilterVisibilityTo\n return totalOptionsCount.value > props.maxListOptions\n})\n\nconst showDropDown = ref<boolean>(false)\n\nconst blockListUpdates = ref<boolean>(false)\n\nconst reverseDropDownList = ref<boolean>(false)\n\nconst enableButtonClick = ref(true)\n\nconst loadingData = ref(false)\nconst errorState = ref(false)\n\nconst itemListRef = ref(ItemList)\nconst dropDownTextInput = ref(TextInput)\nconst dropDownButtonInput = ref(ListButton)\n\nconst query = ref('')\n\nwatch(\n () => query.value,\n (newV, oldV) => {\n if (newV !== oldV && typeof props.options === 'function') loadData(newV)\n }\n)\n\nconst blurInputIfNecessary = () => {\n if (enableTextFilter.value) dropDownTextInput?.value?.blurInput()\n}\n\nconst closeList = () => {\n clearTimeout(blockScrollCloseTimeout)\n blurInputIfNecessary()\n query.value = ''\n showDropDown.value = false\n enableButtonClick.value = true\n}\n\nconst placeholder = computed((): string => {\n if (errorState?.value === true) return 'Error loading data'\n if (loadingData?.value === true) return 'Loading...'\n return getLabel(props.selected)\n})\n\nconst updatedSelected = (newValue: any) => {\n if (newValue) emit('update:selected', newValue)\n closeList()\n}\n\nconst getLabel = (value?: string | number | object | null): string => {\n return getLabelString(\n value,\n props.customPlaceHolderFunction,\n props.objectLabelKeyName,\n props.enumKeyToLabelObjectArray\n )\n}\n\nfunction invalidArgumentError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid options argument provided to ListInputComponent`)\n}\n\nfunction invalidResponseError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid response provided to ListInputComponent, no total count key found`)\n}\n\nfunction invalidListValueKeyError() {\n loadingData.value = true\n errorState.value = true\n throw new Error('Invalid objectLabelKeyName for provided Dropdown list value.')\n}\n\nonMounted(() => {\n if (typeof props.options !== 'function' && !Array.isArray(props.options)) invalidArgumentError()\n else initializeOptions()\n})\n\nconst mouseHoveringOnList = ref(false)\n\nconst selectedIndex = ref(0)\nconst focusedIndex = ref(0)\nconst activeFocusedIndex = ref(0)\n\nwatch(\n () => focusedIndex.value,\n (newV, oldV) => {\n if (newV != oldV && !blockListUpdates.value) {\n activeFocusedIndex.value = newV\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => blockListUpdates.value,\n (newV) => {\n if (!newV) {\n activeFocusedIndex.value = focusedIndex.value\n }\n },\n { immediate: true }\n)\n\nconst filteredListItems = computed(() => {\n // if is function, return listOptions variable which is set by function\n if (typeof props.options === 'function' && !Array.isArray(props.options)) return listOptions.value\n const qry = query.value\n const lo = listOptions.value\n // else, is array, return filtered array\n return qry === '' ? lo : lo.filter((v) => getLabel(v).toLowerCase().includes(qry.toLowerCase()))\n})\n\nwatch(\n () => filteredListItems.value,\n (newV, oldV) => {\n if (JSON.stringify(newV) !== JSON.stringify(oldV)) focusSelectedOrFirstListItem()\n },\n { immediate: false, deep: true }\n)\n\nconst mouseOverList = () => {\n mouseHoveringOnList.value = true\n}\n\nconst focusSelectedOrFirstListItem = () => {\n const existingIndex = getSelectedValueIndex()\n selectedIndex.value = existingIndex /* may not be in the filtered list, allowed to be -1 */\n focusedIndex.value = existingIndex > -1 ? existingIndex : 0 /* default to first value */\n}\n\nfunction getSelectedValueIndex() {\n if (props.selected == null) return -1\n const labelsArray = filteredListItems.value.map((v) => getLabel(v))\n const matchingLabelsArray = labelsArray.filter((v) => v === getLabel(props.selected))\n if (matchingLabelsArray.length > 1) {\n const matchingIndexes = matchingLabelsArray.map((v) => labelsArray.indexOf(v))\n for (let i = 0; i < matchingIndexes.length; i++) {\n const currentMatchingOptionString = JSON.stringify(\n filteredListItems.value[matchingIndexes[i]]\n )\n const selectedOptionString = JSON.stringify(props.selected)\n if (currentMatchingOptionString === selectedOptionString) return matchingIndexes[i]\n }\n return -1\n }\n return labelsArray.indexOf(getLabel(props.selected))\n}\n\nconst openList = () => {\n if (loadingData.value) return\n if (!showDropDown.value) {\n blockListUpdates.value = false\n focusSelectedOrFirstListItem()\n scrollMobileTextInputToTop()\n showDropDown.value = true\n }\n mouseHoveringOnList.value = false\n enableButtonClick.value = false\n}\n\nconst scrollMobileTextInputToTop = () => {\n const mobileWindow: boolean = window?.innerWidth != null && window.innerWidth < 640\n const mobileScreen: boolean = screen?.width != null && screen.width < 640\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if ((mobileWindow || mobileScreen) && enableTextFilter.value) {\n preventScrollClose()\n if (props.scrollTextInputToTopOnMobile)\n textInput?.scrollIntoView({ block: 'start', inline: 'center' })\n }\n}\n\nconst enableScrollClose = ref<boolean>(true)\nlet blockScrollCloseTimeout = setTimeout(() => {}, 0)\n\nfunction preventScrollClose() {\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if (!textInput) return\n enableScrollClose.value = false\n let preventingScrollCloseInterval: NodeJS.Timeout | null = null\n\n const clearAll = () => {\n if (preventingScrollCloseInterval) clearInterval(preventingScrollCloseInterval)\n clearTimeout(blockScrollCloseTimeout)\n setTimeout(() => {\n enableScrollClose.value = true\n }, 100)\n }\n\n blockScrollCloseTimeout = setTimeout(clearAll, 5000)\n\n preventingScrollCloseInterval = setInterval(() => {\n if (\n showDropDown.value === false ||\n (textInput?.scrollTop === 0 && document.readyState === 'complete')\n )\n clearAll()\n }, 100)\n}\n\nconst focusInput = () => {\n if (enableTextFilter?.value == true) dropDownTextInput.value.focusInput()\n else if (dropDownButtonInput?.value?.focusInput) dropDownButtonInput?.value?.focusInput()\n}\n\nasync function initializeOptions(): Promise<void> {\n if (typeof props.options === 'function') {\n await loadData(query.value ? query.value : undefined, true)\n } else {\n validateListOptions(props.options as Array<string | number | object>)\n totalOptionsCount.value = listOptions.value.length\n }\n initializeSelected()\n}\n\ndefineExpose({ initializeOptions, getLabel })\n\nfunction initializeSelected() {\n const invalidSelection = getSelectedValueIndex() == -1\n const existingOptionNotSelected = invalidSelection && listOptions.value && !!listOptions.value[0]\n if (existingOptionNotSelected) updatedSelected(listOptions.value[0])\n}\n\nasync function loadData(stringFilter?: string, disableOnLoad: boolean = true) {\n loadingData.value = disableOnLoad\n const func = async () => (props.options as Function)(props.maxListOptions, stringFilter || '')\n const next = (response: DataSet<any>) => {\n if (!response || !('data' in response)) invalidArgumentError()\n validateListOptions(response.data)\n getOptionsCount(response?.data?.length ?? 0).then(() => {\n loadingData.value = false\n })\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nfunction validateListOptions(optns: Array<string | number | object>) {\n if (!Array.isArray(optns)) invalidArgumentError()\n if (optns.length > 0 && typeof optns[0] === 'object') validateObjectList(optns as Array<object>)\n listOptions.value = optns as Array<string | number | object>\n}\n\nfunction validateObjectList(values: Array<object>) {\n if (!props.objectLabelKeyName || props.objectLabelKeyName.length === 0) invalidListValueKeyError()\n const key: string = props.objectLabelKeyName as string\n for (let i = 0; i < values.length; i++) {\n if (typeof values[i] !== 'object' || !(key in values[i])) invalidListValueKeyError()\n }\n}\n\nasync function getOptionsCount(dataLength: number): Promise<void> {\n const func = async () => (props.options as Function)(1, '')\n const next = (response: DataSet<any>) => {\n if (!response || !('totalNum' in response)) invalidResponseError()\n totalOptionsCount.value = response.totalNum ?? dataLength\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nconst getCurrentlyFocusedListItemElement = (): HTMLElement | null => {\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n return listInput?.getElementsByTagName('li')[focusedIndex.value] ?? null\n}\n\nconst press = (event?: any) => {\n if (showDropDown.value == false) {\n openList()\n } else if (event) {\n keypress(event)\n }\n}\n\nconst keypress = (event: any) => {\n const key: string = event.key || event.code\n if (key === 'Tab' || key === 'Escape') closeList()\n if (key === 'ArrowDown') down(event)\n if (key === 'ArrowUp') up(event)\n if (key === 'Enter' || key === ' ') updateSelectedFromTextQuery()\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst updateSelectedFromTextQuery = () => {\n if (filteredListItems.value.length > 0) {\n blockListUpdates.value = true\n updatedSelected(filteredListItems.value[focusedIndex.value])\n } else {\n closeList()\n }\n}\n\nconst down = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value < filteredListItems.value.length - 1) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value++\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst up = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value > 0) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value--\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst unfocus = (event: any) => {\n if (showDropDown?.value === false) return\n if (query.value.length > 0) blockListUpdates.value = true\n const list: HTMLElement | null = itemListRef?.value?.listContainerRef as HTMLElement | null\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n const isListInput = event?.relatedTarget && listInput?.isEqualNode(event?.relatedTarget)\n const isList = event?.relatedTarget && list && list.contains(event?.relatedTarget)\n const isListItem = event?.relatedTarget && list && list.isEqualNode(event?.relatedTarget)\n if (isList || isListInput) return\n if (isListItem) {\n focusInput()\n return\n }\n closeList()\n}\n\nconst parentMethods = {\n openList: openList,\n unfocus: unfocus,\n press: press,\n mouseOverList: mouseOverList,\n getLabel: getLabel,\n updatedSelected: updatedSelected,\n focusInput: focusInput,\n closeList: closeList\n}\n</script>\n\n<style scoped>\n* {\n box-sizing: border-box;\n}\n</style>\n"],"names":["DocumentViewChangeListener","targetFunction","targetNode","event","eventType","getLabelString","value","customLabelGetFunction","objectLabelKeyName","enumKeyToLabelObjectArray","getEnumLabel","enumKeyArray","eT","AbortablePromise","signal","asyncFunc","then","response","func","reason","emit","__emit","props","__props","textInputRef","ref","focusInHandler","e","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","_createElementVNode","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","iRefs","useTemplateRef","focusedLi","focused","watch","scrollHighlightedListItemToTop","scrollHighlightedListItemIntoView","li","liParent","aboveTop","belowBottom","_Fragment","_renderList","listItem","index","_withModifiers","_hoisted_2","_toDisplayString","_createBlock","DefaultTick","_hoisted_3","dropDownButtonContainer","dropDownListUL","listContainerRef","offsetLeft","offsetTop","offsetBottom","listOffset","parentWidthPx","listElementOpenAndVisible","listItemsToDisplay","listHeightPx","reverseList","sufficientRoomAbove","insufficientRoomBelow","noScroll","reverse","parentXPx","parentYPx","preventSpaceScrollingList","refocusTextInput","list","target","getListULHeight","displayableListHeight","ulHt","maxListHeightPx","animationDuration","updatedListItemsToDisplay","newVal","unobserveTimeout","changeListener","openAndObserveChangeListener","buttonRePositionCallback","closeAndUnobserveChangeListener","newV","oldV","setOffsets","nextTick","closeListOnScrollIfNecessary","insideListOrOtherList","isScrollEvent","insideButton","insideList","otherList","setButtonOffset","setListOffset","brc","getButtonContainerElement","slrc","currentListOffset","currentOffsetLeft","getButtonElement","onMounted","onUnmounted","_renderSlot","_ctx","_createVNode","ListItem","buttonRef","clickHandler","enterHandler","spaceHandler","DefaultArrow","_resolveDynamicComponent","listOptions","abortablePromise","totalOptionsCount","enableTextFilter","showDropDown","blockListUpdates","reverseDropDownList","enableButtonClick","loadingData","errorState","itemListRef","ItemList","dropDownTextInput","TextInput","dropDownButtonInput","ListButton","query","blurInputIfNecessary","closeList","blockScrollCloseTimeout","placeholder","getLabel","updatedSelected","newValue","invalidArgumentError","invalidResponseError","invalidListValueKeyError","initializeOptions","mouseHoveringOnList","selectedIndex","focusedIndex","activeFocusedIndex","filteredListItems","qry","lo","v","focusSelectedOrFirstListItem","mouseOverList","existingIndex","getSelectedValueIndex","labelsArray","matchingLabelsArray","matchingIndexes","i","currentMatchingOptionString","selectedOptionString","openList","scrollMobileTextInputToTop","mobileWindow","mobileScreen","textInput","preventScrollClose","enableScrollClose","preventingScrollCloseInterval","clearAll","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","optns","validateObjectList","values","key","dataLength","getCurrentlyFocusedListItemElement","press","keypress","down","up","updateSelectedFromTextQuery","parentMethods","listInput","isListInput","isList","isListItem","$attrs"],"mappings":";AAQO,MAAMA,GAAiE;AAAA,EAC3D,cAAwB,CAAC,UAAU,QAAQ,UAAU,SAAS,WAAW;AAAA,EACzE,SAA+B;AAAA,IAC9C,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,EACX;AAAA,EACQ;AAAA,EACA;AAAA,EAER,YAAYC,GAA0BC,IAAkB,SAAS,MAAM;AACrE,SAAK,aAAaA,GAClB,KAAK,mBAAoB,CAACC,MACxBF,EAAeE,CAAK,GACtB,KAAK,mBAAmB,IAAI,iBAAkB,MAAMF,GAAqC;AAAA,EAAA;AAAA,EAGpF,UAAgB;AACrB,SAAK,iBAAiB,QAAQ,KAAK,YAAY,KAAK,MAAM;AAC1D,eAAWG,KAAa,KAAK,YAAa,MAAK,YAAYA,CAAS;AACpE,SAAK,kBAAkB,GACvB,KAAK,yBAAyB;AAAA,EAAA;AAAA,EAGhC,wBAA8B;AAC5B,SAAK,iBAAiB,WAAW;AAAA,EAAA;AAAA,EAGnC,0BAAgC;AAC9B,SAAK,iBAAiB,QAAQ,KAAK,YAAY,KAAK,MAAM;AAAA,EAAA;AAAA,EAGrD,YAAkB;AACvB,SAAK,iBAAiB,WAAW;AACjC,eAAWA,KAAa,KAAK,YAAa,MAAK,eAAeA,CAAS;AACvE,SAAK,qBAAqB,GAC1B,KAAK,4BAA4B;AAAA,EAAA;AAAA,EAG3B,YAAYA,GAAyB;AAC3C,aAAS,iBAAiBA,GAAW,KAAK,kBAAkB,EAAI;AAAA,EAAA;AAAA,EAG1D,eAAeA,GAAyB;AAC9C,aAAS,oBAAoBA,GAAW,KAAK,kBAAkB,EAAI;AAAA,EAAA;AAAA,EAG7D,2BAAiC;AACvC,SAAK,WAAW,iBAAi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kBAAgBC,EAAY;AAAA,gBAC5B,aAAagB,GAAW;AAAA,gBACxB,uBAAqBb,EAAiB;AAAA,gBACtC,kBAAgBkE;AAAA,gBAChB,kBAAYnK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAD,MAAE2G,EAAK,QAAG3G;AAAA,cAAA;;;;;;;;;;"}
@@ -1,3 +1,3 @@
1
- (function(e,F){typeof exports=="object"&&typeof module<"u"?module.exports=F(require("vue")):typeof define=="function"&&define.amd?define(["vue"],F):(e=typeof globalThis<"u"?globalThis:e||self,e.SuperList=F(e.Vue))})(this,function(e){"use strict";var F=document.createElement("style");F.textContent=`.list-filter-text-input[data-v-97ab9870]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem;width:100%;height:100%;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;border:0 none;pointer-events:auto;cursor:text}.list-filter-text-input[data-v-97ab9870]:focus,.list-filter-text-input[data-v-97ab9870]:focus-visible,.list-filter-text-input[data-v-97ab9870]:active{text-align:left}.click-through[data-v-97ab9870]{pointer-events:none}.dark-placeholder-text[data-v-97ab9870]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-97ab9870]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-97ab9870]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-97ab9870]{font-size:.875rem;line-height:1.5rem}}.list-option[data-v-e4eeb2f7]{text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-text-colour, rgb(55, 60, 65));transition-property:font-weight,background-color,color,text-shadow;transition-duration:.5s;transition-timing-function:ease;font-weight:400;text-shadow:1px 1px 3px var(--superlist-background-colour, white)}.list-option[data-v-e4eeb2f7]:focus-visible,.list-option>span[data-v-e4eeb2f7]:focus-visible{outline:none}.list-option-selected[data-v-e4eeb2f7]{font-weight:600}.list-option-message[data-v-e4eeb2f7]{text-shadow:1px 1px 3px var(--superlist-background-colour, white);text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.list-option-active[data-v-e4eeb2f7]:hover,.list-option-active[data-v-e4eeb2f7],.list-option-selected[data-v-e4eeb2f7]:hover,.list-option[data-v-e4eeb2f7]:hover{font-weight:600;background-color:var(--superlist-theme-colour, rgb(77, 168, 11, .8));color:var(--superlist-background-colour, white);text-shadow:1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, .8));transition-duration:0s!important}.list-item-icon[data-v-e4eeb2f7]{display:flex;height:1rem;width:1rem;position:absolute;right:.7rem;margin-top:-.1rem;align-self:center}.list-item-span[data-v-e4eeb2f7]{padding:.5rem 1.75rem .5rem .75rem;width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-normal[data-v-e58cd48c]{top:var(--parent-y)}.list-reverse[data-v-e58cd48c]{bottom:var(--parent-y)}.select-list[data-v-e58cd48c]{--parent-width: var(--8d801350);--parent-x: var(--2724698a);--parent-y: var(--27246d4b);--duration: var(--ffcaa9a8);--border-radius: var(--superlist-list-border-radius, 0);border-radius:var(--border-radius);width:var(--parent-width);min-width:var(--parent-width);left:var(--parent-x);display:block;transition-property:max-height,opacity,visibility,box-shadow;transition-duration:var(--duration, .3s);transition-timing-function:cubic-bezier(.1,.9,.35,.98);position:absolute;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background-color:#ffffffb3;align-items:baseline;opacity:.25;z-index:999;visibility:collapse;overflow:auto;max-height:0;border:none!important}.select-list[data-v-e58cd48c]:focus-visible,.select-list>ul[data-v-e58cd48c]:focus-visible,.super-list-button-container[data-v-e58cd48c]:focus-visible{outline:none}.super-list-button-container[data-v-e58cd48c]{height:100%;width:100%}.select-list.select-list-open[data-v-e58cd48c]{z-index:999999;--max-height: var(--414dd276);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-e58cd48c]{overflow:hidden}.select-list-fixed[data-v-e58cd48c]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-e58cd48c]{--duration: var(--ffcaa9a8);overflow:visible;margin:0;padding:0;border-style:none;color:var(--superlist-text-colour, rgb(55, 60, 65));list-style:none;max-width:100%}.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius)}.select-list[data-v-e58cd48c]:not(.select-list-fixed){transition:none;box-shadow:none!important}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-e58cd48c]{font-size:.875rem;line-height:1.25rem}}.list-button-icon[data-v-01ef8e37]{display:flex;transition-timing-function:ease-in-out;transition-duration:.2s;transition-property:transform;width:.6rem;transform:rotate(0);color:var(--superlist-text-colour, rgb(17, 24, 39));justify-content:center;max-height:18%}.list-button-icon.custom-icon[data-v-01ef8e37]{max-height:100%;width:1.25rem}.list-button-icon.rotate-180[data-v-01ef8e37]{transform:rotate(180deg)}.list-button[data-v-01ef8e37]{position:relative;padding:0;margin:0;width:100%;max-height:100%;height:100%;background-color:var(--superlist-background-colour, white);align-items:center;pointer-events:auto;cursor:pointer}.list-button[data-v-01ef8e37]:focus,.list-button[data-v-01ef8e37]:focus-visible,.list-button[data-v-01ef8e37]:active{text-align:left}.list-button-icon-div[data-v-01ef8e37]{pointer-events:none;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:.75rem;max-height:100%;height:100%;gap:max(.15rem,calc(6.25% + .075rem));transition:gap .2s}.list-button-icon-div.bigger-gap[data-v-01ef8e37]{gap:calc(40% - .25rem)}.click-through[data-v-01ef8e37]{pointer-events:none}[data-v-cc38ced5]{box-sizing:border-box}
2
- /*$vite$:1*/`,document.head.appendChild(F);class re{eventsTypes=["resize","load","scroll","wheel","touchmove"];config={attributes:!0,childList:!0,subtree:!0};mutationObserver;callbackFunction;constructor(s,c=document.body){this.targetNode=c,this.callbackFunction=m=>s(m),this.mutationObserver=new MutationObserver(()=>s())}observe(){this.mutationObserver.observe(this.targetNode,this.config);for(const s of this.eventsTypes)this.addListener(s);this.addResizeListener(),this.addTransitionEndListener()}pauseMutationObserver(){this.mutationObserver.disconnect()}unpauseMutationObserver(){this.mutationObserver.observe(this.targetNode,this.config)}unobserve(){this.mutationObserver.disconnect();for(const s of this.eventsTypes)this.removeListener(s);this.removeResizeListener(),this.removeTransitionEndListener()}addListener(s){document.addEventListener(s,this.callbackFunction,!0)}removeListener(s){document.removeEventListener(s,this.callbackFunction,!0)}addTransitionEndListener(){this.targetNode.addEventListener("transitionend",this.callbackFunction)}removeTransitionEndListener(){this.targetNode.removeEventListener("transitionend",this.callbackFunction)}addResizeListener(){window.addEventListener("resize",this.callbackFunction)}removeResizeListener(){window.removeEventListener("resize",this.callbackFunction)}}function le(t,s,c,m){return s!=null?s(t):t==null?"":typeof t=="object"?t[c]:m?ae(t,m):""+t}function ae(t,s){return s.find(c=>c.type===t)?.label??""}class ue{constructor(){this.abortController=new AbortController,this.func=()=>{},this.then=()=>{}}async abortablePromise(s,c,m){const i=await c();if(!s.aborted)return m(i)}setFunc(s){this.func=s}setThen(s){this.then=s}execute(){return this.abortablePromise(this.abortController.signal,this.func,this.then)}abort(s){this.abortController.abort(s||"Aborted By Controller."),this.abortController=new AbortController}resetAndExecute(s,c){return this.abort("New Request From Controller."),this.setFunc(s),this.setThen(c),this.execute()}}const ce=["tabindex","placeholder","size"],de=e.defineComponent({__name:"ListTextInput",props:{enableTextFilter:{type:Boolean,required:!0},placeholder:{type:String,default:void 0},enableButtonClick:{type:Boolean,default:!0},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0}},emits:{"update:selected":null,"update:query":null,"update:press":null},setup(t,{expose:s,emit:c}){const m=c,i=t,p=e.ref(null);function v(w){"sourceCapabilities"in w&&w.sourceCapabilities==null?i.parentMethods.closeList():i.parentMethods.openList()}function n(w){i.parentMethods.unfocus(w)}function r(w){w?.target?.value!=null&&m("update:query",w.target.value)}const d=e.computed(()=>{const w=p?.value?p.value.length:0,b=i.placeholder?.length||0;return w>0?w:b>0?b:5}),a=e.computed(()=>i.enableButtonClick===!0&&i.enableTextFilter===!0?"":"click-through"),g=e.computed(()=>i.showDropDown&&!i.enableTextFilter||!i.showDropDown?"dark-placeholder-text":"light-placeholder-text");function T(){if(p?.value){const w=p.value;w.blur(),w.value=""}}function L(){p?.value&&p.value.focus()}return s({blurInput:T,focusInput:L,textInputRef:p}),(w,b)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:b[8]||(b[8]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("input",{ref_key:"textInputRef",ref:p,tabindex:t.enableTextFilter?0:-1,onKeydown:[b[0]||(b[0]=e.withKeys(h=>t.parentMethods.press(h),["enter"])),b[1]||(b[1]=e.withKeys(h=>t.parentMethods.press(),["space"])),b[2]||(b[2]=e.withKeys(h=>t.parentMethods.press(h),["esc"])),b[3]||(b[3]=e.withKeys(h=>t.parentMethods.press(h),["up"])),b[4]||(b[4]=e.withKeys(h=>t.parentMethods.press(h),["down"]))],onFocusin:b[5]||(b[5]=h=>v(h)),onFocusout:b[6]||(b[6]=h=>n(h)),onInput:b[7]||(b[7]=h=>r(h)),type:"text","aria-autocomplete":"none",autocomplete:"off",placeholder:t.placeholder,size:d.value,class:e.normalizeClass([[a.value,g.value,{"text-filter-disabled":!t.enableTextFilter}],"list-filter-text-input"])},null,42,ce)],32))}}),N=(t,s)=>{const c=t.__vccOpts||t;for(const[m,i]of s)c[m]=i;return c},te=N(de,[["__scopeId","data-v-97ab9870"]]),fe={},pe={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 -16 16 17"};function me(t,s){return e.openBlock(),e.createElementBlock("svg",pe,s[0]||(s[0]=[e.createElementVNode("path",{"shape-rendering":"geometricPrecision",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"},null,-1)]))}const be=N(fe,[["render",me]]),he=["onMousedown"],we={class:"list-item-span"},ge={class:"list-item-span"},ve=N(e.defineComponent({__name:"ListItem",props:{mouseHoveringOnList:{type:Boolean,default:!1},filteredListItems:{type:Array,default:()=>[]},focusedIndex:{type:Number,default:null},selectedIndex:{type:Number,default:null},listElementOpenAndVisible:{type:Boolean,default:!1},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,default:!1},totalOptionsCount:{type:Number,default:0}},setup(t){const s=t,c=e.useTemplateRef("items"),m=e.computed(()=>{if(!c?.value)return null;const n=(Array.isArray(c.value)?c.value:[c.value])[s.focusedIndex];return n&&typeof n=="object"&&"scrollIntoView"in n&&typeof n.scrollIntoView=="function"?n:null});e.watch(()=>s.showDropDown,()=>i()),e.watch(()=>s.listElementOpenAndVisible,()=>p()),e.watch(()=>m.value,()=>p());function i(){!s.showDropDown||!m?.value?.parentElement?.parentElement||(m.value.parentElement.parentElement.scrollTop=m.value.offsetTop)}function p(){const v=m.value,n=v?.parentElement?.parentElement;if(!s.showDropDown||!v||!n)return;const r=v.offsetTop-n.scrollTop<0,d=v.offsetTop+v.offsetHeight-n.scrollTop>n.clientHeight;r&&(n.scrollTop=v.offsetTop),d&&(n.scrollTop=v.offsetTop+v.clientHeight-n.clientHeight)}return(v,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filteredListItems,(r,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,ref_for:!0,ref:"items",onKeyup:[n[0]||(n[0]=e.withKeys(a=>t.parentMethods.press(a),["enter"])),n[1]||(n[1]=e.withKeys(a=>t.parentMethods.press(a),["space"])),n[2]||(n[2]=e.withKeys(a=>t.parentMethods.press(a),["esc"]))],onKeydown:[n[3]||(n[3]=e.withKeys(a=>t.parentMethods.press(a),["up"])),n[4]||(n[4]=e.withKeys(a=>t.parentMethods.press(a),["down"]))],onFocusout:n[5]||(n[5]=a=>t.parentMethods.unfocus(a)),tabindex:"-1",onMousedown:e.withModifiers(a=>t.parentMethods.updatedSelected(r),["left"]),class:e.normalizeClass([{"list-option-selected":t.selectedIndex===d},{"list-option-active":t.filteredListItems.length===1||t.focusedIndex===d&&!t.mouseHoveringOnList},"list-option"])},[e.createElementVNode("span",we,e.toDisplayString(t.parentMethods.getLabel(r)),1),t.selectedIndex===d?(e.openBlock(),e.createBlock(be,{key:0,class:"list-item-icon","aria-hidden":"true"})):e.createCommentVNode("",!0)],42,he))),128)),t.filteredListItems.length===0?(e.openBlock(),e.createElementBlock("li",{key:0,onKeyup:[n[6]||(n[6]=e.withKeys(r=>t.parentMethods.press(r),["enter"])),n[7]||(n[7]=e.withKeys(r=>t.parentMethods.press(r),["space"])),n[8]||(n[8]=e.withKeys(r=>t.parentMethods.press(r),["esc"]))],onKeydown:[n[9]||(n[9]=e.withKeys(r=>t.parentMethods.press(r),["up"])),n[10]||(n[10]=e.withKeys(r=>t.parentMethods.press(r),["down"]))],onFocusout:n[11]||(n[11]=r=>t.parentMethods.unfocus(r)),onMousedown:n[12]||(n[12]=e.withModifiers(r=>t.parentMethods.closeList(r),["left"])),tabindex:"-1",class:"list-option-message"},n[20]||(n[20]=[e.createElementVNode("span",{class:"list-item-span"},"No Items To Display.",-1)]),32)):e.createCommentVNode("",!0),t.totalOptionsCount&&t.totalOptionsCount>(t.filteredListItems?.length||0)?(e.openBlock(),e.createElementBlock("li",{key:1,onKeyup:[n[13]||(n[13]=e.withKeys(r=>t.parentMethods.press(r),["enter"])),n[14]||(n[14]=e.withKeys(r=>t.parentMethods.press(r),["space"])),n[15]||(n[15]=e.withKeys(r=>t.parentMethods.press(r),["esc"]))],onKeydown:[n[16]||(n[16]=e.withKeys(r=>t.parentMethods.press(r),["up"])),n[17]||(n[17]=e.withKeys(r=>t.parentMethods.press(r),["down"]))],onFocusout:n[18]||(n[18]=r=>t.parentMethods.unfocus(r)),onMousedown:n[19]||(n[19]=e.withModifiers(r=>t.parentMethods.closeList(r),["left"])),tabindex:"-1",class:"list-option-message"},[e.createElementVNode("span",ge," +"+e.toDisplayString(t.totalOptionsCount-t.filteredListItems?.length||0)+" More Items...",1)],32)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-e4eeb2f7"]]),ne=N(e.defineComponent({__name:"ItemList",props:{mouseHoveringOnList:{type:Boolean,default:!1},filteredListItems:{type:Array,default:()=>[]},focusedIndex:{type:Number,default:null},selectedIndex:{type:Number,default:null},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0},maxListHeightPX:{type:Number,required:!0},listAnimationDurationMs:{type:Number,required:!0},blockListChange:{type:Boolean,required:!0},totalOptionsCount:{type:Number,default:0},enableScrollClose:{type:Boolean,default:!0}},emits:["reverseDropDownList"],setup(t,{expose:s,emit:c}){e.useCssVars(u=>({"8d801350":T.value,"2724698a":O.value,"27246d4b":W.value,ffcaa9a8:A.value,"414dd276":q.value}));const m=c,i=t,p=e.ref(null),v=e.ref(null),n=e.ref(null),r=e.ref(0),d=e.ref(0),a=e.ref(0),g=e.ref(0),T=e.ref("0px"),L=e.ref(!1),w=e.ref([]),b=e.ref(0),h=e.computed(()=>!L.value||window?.innerHeight==null?!1:z()&&Z()),K=e.computed(()=>i.maxListHeightPX>=b.value);e.watch(()=>h.value,u=>m("reverseDropDownList",u),{immediate:!0});const O=e.computed(()=>r.value+"px"),W=e.computed(()=>g.value+"px");s({listContainerRef:n});const S=u=>{u?.key&&u.key===" "&&u.preventDefault()},Q=u=>{const y=n?.value,x=u.target;(!(y&&x&&y.contains(x))||y.isEqualNode(x))&&i.parentMethods.focusInput()};function B(){return v?.value?(v?.value).clientHeight:0}function C(){if(!L.value||B()===0)return i.maxListHeightPX;const u=B()===0?i.maxListHeightPX:+B();return i.maxListHeightPX&&i.maxListHeightPX>u?u:i.maxListHeightPX}function z(){return d.value>C()}function Z(){return a.value<C()}const q=e.computed(()=>(i.maxListHeightPX||0)+"px"),A=e.computed(()=>(i.listAnimationDurationMs||0)+"ms"),$=e.computed(()=>i.blockListChange?w.value:i.filteredListItems);e.watch(()=>$,u=>{u&&(w.value=u.value)},{immediate:!1,deep:!0});let k=setTimeout(()=>{},0),D=null;function M(){b.value=B(),clearTimeout(k),D&&D.observe(),L.value=!0,H(void 0)}function Y(){clearTimeout(k),k=setTimeout(()=>{i.showDropDown||(L.value=!1,D&&D.unobserve())},i.listAnimationDurationMs+50)}e.watch(()=>i.showDropDown,(u,y)=>{u!==y&&(R(),u?M():Y())},{immediate:!0});function H(u){R(),e.nextTick(()=>R()),X(u)}function X(u){if(!i.enableScrollClose||!i.showDropDown||typeof n?.value?.contains!="function"||u?.target?.nodeType==null||U(u))return;const x=["scroll","wheel","touchmove"].includes(u?.type);i.showDropDown&&x&&i.parentMethods.closeList()}function U(u){const y=!!p.value?.contains(u?.target),x=!!n.value?.contains(u.target),V=[u?.srcElement?.id,u?.target?.id].includes("super-list-select-list");return y||x||V}function R(){P(),j()}function P(){if(p?.value==null)return;const u=p.value.getBoundingClientRect();d.value=u.top,a.value=window.innerHeight-u.bottom,T.value=u.width+"px"}function j(){if(p?.value==null||n?.value==null)return;const u=J().getBoundingClientRect(),y=n.value.getBoundingClientRect(),x=g.value,V=r.value;h.value?g.value=x-(u.top-y.bottom):g.value=x-(y.top-u.bottom),r.value=V-(y.left-u.left)}function G(){return(p?.value).getElementsByTagName("button")[0]}function J(){return p?.value}return e.onMounted(()=>{D=new re(H,G()),setTimeout(()=>H(void 0),250)}),e.onUnmounted(()=>{D?.unobserve()}),(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropDownButtonContainer",ref:p,class:"super-list-button-container"},[e.renderSlot(u.$slots,"default",{},void 0,!0)],512),e.createElementVNode("div",{id:"super-list-select-list",ref_key:"listContainerRef",ref:n,onMouseenter:y[0]||(y[0]=x=>t.parentMethods.mouseOverList()),tabindex:"-1",class:e.normalizeClass(["select-list",h.value?"list-reverse":"list-normal",{"select-list-open":t.showDropDown},{"no-scroll":K.value&&L.value},{"select-list-fixed":L.value},{"select-list-scrollable":!K.value}]),onKeydown:y[1]||(y[1]=e.withKeys(x=>S(x),["space"])),onMouseup:y[2]||(y[2]=e.withModifiers(x=>Q(x),["left"]))},[e.createElementVNode("ul",{tabindex:"-1",ref_key:"dropDownListUL",ref:v,class:"list-content"},[e.createVNode(ve,{filteredListItems:w.value,mouseHoveringOnList:t.mouseHoveringOnList,focusedIndex:t.focusedIndex,selectedIndex:t.selectedIndex,listElementOpenAndVisible:L.value,"parent-methods":t.parentMethods,"show-drop-down":t.showDropDown,"total-options-count":t.totalOptionsCount},null,8,["filteredListItems","mouseHoveringOnList","focusedIndex","selectedIndex","listElementOpenAndVisible","parent-methods","show-drop-down","total-options-count"])],512)],34)],64))}}),[["__scopeId","data-v-e58cd48c"]]),ye={},xe={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 0 12 6"};function Le(t,s){return e.openBlock(),e.createElementBlock("svg",xe,s[0]||(s[0]=[e.createElementVNode("path",{"shape-rendering":"geometricPrecision",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"},null,-1)]))}const oe=N(ye,[["render",Le]]),Ie=["tabindex"],ke={key:2,class:"list-button-icon custom-icon"},ie=N(e.defineComponent({__name:"ListButton",props:{parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0},enableTextFilter:{type:Boolean,required:!0},customIcon:{default:null,type:[Object,Function]},reverseDropDownList:{type:Boolean,required:!0}},setup(t,{expose:s}){const c=t,m=e.ref(null);function i(){c.enableTextFilter||c.parentMethods.openList()}function p(d){c.enableTextFilter?(c.parentMethods.focusInput(),d.stopPropagation(),d.preventDefault()):c.parentMethods.press(d)}function v(d){c.enableTextFilter||c.parentMethods.press(d)}function n(){m?.value&&m.value.blur()}function r(){m?.value&&m.value.focus()}return s({blurInput:n,focusInput:r,buttonRef:m}),(d,a)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"buttonRef",ref:m,tabindex:t.enableTextFilter?-1:0,onKeydown:[a[0]||(a[0]=e.withKeys(g=>p(g),["enter"])),a[1]||(a[1]=e.withKeys(g=>v(g),["space"])),a[2]||(a[2]=e.withKeys(g=>t.parentMethods.press(g),["esc"])),a[3]||(a[3]=e.withKeys(g=>t.parentMethods.press(g),["up"])),a[4]||(a[4]=e.withKeys(g=>t.parentMethods.press(g),["down"]))],onFocusout:a[5]||(a[5]=g=>t.parentMethods.unfocus(g)),onClick:a[6]||(a[6]=g=>i()),type:"button",class:e.normalizeClass([[{"click-through":c.enableTextFilter||c.showDropDown}],"list-button"])},[e.renderSlot(d.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:e.normalizeClass(["list-button-icon-div",{"bigger-gap":c.showDropDown}])},[t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["list-button-icon",[{"rotate-180":!c.showDropDown}]])},[e.createVNode(oe,{"aria-hidden":"true"})],2)),t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["list-button-icon",[{"rotate-180":c.showDropDown}]])},[t.customIcon==null?(e.openBlock(),e.createBlock(oe,{key:0,"aria-hidden":"true"})):e.createCommentVNode("",!0)],2)),t.customIcon?(e.openBlock(),e.createElementBlock("span",ke,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{"aria-hidden":"true"}))])):e.createCommentVNode("",!0)],2)],42,Ie))}}),[["__scopeId","data-v-01ef8e37"]]);return N(e.defineComponent({__name:"super-list",props:{selected:{type:[String,Number,Object,null,void 0]},options:{type:[Function,Array],required:!0},maxListOptions:{type:Number,default:50},maxListHeightPX:{type:Number,default:200},tooltip:{type:String,required:!1},objectLabelKeyName:{type:String,default:""},enumKeyToLabelObjectArray:{type:Object,default:void 0},listAnimationDurationMs:{type:Number,default:300},customIcon:{default:null,type:[Object,Function]},forceTextFilterVisibilityTo:{type:Boolean,default:void 0},customPlaceHolderFunction:{type:Function,default:null},colour:{type:String,default:"black"},scrollTextInputToTopOnMobile:{type:Boolean,default:!0}},emits:{"update:selected":null},setup(t,{expose:s,emit:c}){const m=c,i=t,p=e.ref([]),v=new ue,n=e.ref(0),r=e.computed(()=>i.forceTextFilterVisibilityTo!=null?i.forceTextFilterVisibilityTo:n.value>i.maxListOptions),d=e.ref(!1),a=e.ref(!1),g=e.ref(!1),T=e.ref(!0),L=e.ref(!1),w=e.ref(!1),b=e.ref(ne),h=e.ref(te),K=e.ref(ie),O=e.ref("");e.watch(()=>O.value,(o,l)=>{o!==l&&typeof i.options=="function"&&x(o)});const W=()=>{r.value&&h?.value?.blurInput()},S=()=>{clearTimeout(j),W(),O.value="",d.value=!1,T.value=!0},Q=e.computed(()=>w?.value===!0?"Error loading data":L?.value===!0?"Loading...":C(i.selected)),B=o=>{o&&m("update:selected",o),S()},C=o=>le(o,i.customPlaceHolderFunction,i.objectLabelKeyName,i.enumKeyToLabelObjectArray);function z(){throw L.value=!0,w.value=!0,new Error("Invalid options argument provided to ListInputComponent")}function Z(){throw L.value=!0,w.value=!0,new Error("Invalid response provided to ListInputComponent, no total count key found")}function q(){throw L.value=!0,w.value=!0,new Error("Invalid objectLabelKeyName for provided Dropdown list value.")}e.onMounted(()=>{typeof i.options!="function"&&!Array.isArray(i.options)?z():u()});const A=e.ref(!1),$=e.ref(0),k=e.ref(0),D=e.ref(0);e.watch(()=>k.value,(o,l)=>{o!=l&&!a.value&&(D.value=o)},{immediate:!0}),e.watch(()=>a.value,o=>{o||(D.value=k.value)},{immediate:!0});const M=e.computed(()=>{if(typeof i.options=="function"&&!Array.isArray(i.options))return p.value;const o=O.value,l=p.value;return o===""?l:l.filter(f=>C(f).toLowerCase().includes(o.toLowerCase()))});e.watch(()=>M.value,(o,l)=>{JSON.stringify(o)!==JSON.stringify(l)&&H()},{immediate:!1,deep:!0});const Y=()=>{A.value=!0},H=()=>{const o=X();$.value=o,k.value=o>-1?o:0};function X(){if(i.selected==null)return-1;const o=M.value.map(f=>C(f)),l=o.filter(f=>f===C(i.selected));if(l.length>1){const f=l.map(I=>o.indexOf(I));for(let I=0;I<f.length;I++){const E=JSON.stringify(M.value[f[I]]),ee=JSON.stringify(i.selected);if(E===ee)return f[I]}return-1}return o.indexOf(C(i.selected))}const U=()=>{L.value||(d.value||(a.value=!1,H(),R(),d.value=!0),A.value=!1,T.value=!1)},R=()=>{const o=window?.innerWidth!=null&&window.innerWidth<640,l=screen?.width!=null&&screen.width<640,f=h.value.textInputRef;(o||l)&&r.value&&(G(),i.scrollTextInputToTopOnMobile&&f?.scrollIntoView({block:"start",inline:"center"}))},P=e.ref(!0);let j=setTimeout(()=>{},0);function G(){const o=h.value.textInputRef;if(!o)return;P.value=!1;let l=null;const f=()=>{l&&clearInterval(l),clearTimeout(j),setTimeout(()=>{P.value=!0},100)};j=setTimeout(f,5e3),l=setInterval(()=>{(d.value===!1||o?.scrollTop===0&&document.readyState==="complete")&&f()},100)}const J=()=>{r?.value==!0?h.value.focusInput():K?.value?.focusInput&&K?.value?.focusInput()};async function u(){typeof i.options=="function"?await x(O.value?O.value:void 0,!0):(V(i.options),n.value=p.value.length),y()}s({initializeOptions:u,getLabel:C});function y(){X()==-1&&p.value&&!!p.value[0]&&B(p.value[0])}async function x(o,l=!0){L.value=l;const f=async()=>i.options(i.maxListOptions,o||""),I=E=>{(!E||!("data"in E))&&z(),V(E.data),Ce(E?.data?.length??0).then(()=>{L.value=!1})};await v.resetAndExecute(f,I)}function V(o){Array.isArray(o)||z(),o.length>0&&typeof o[0]=="object"&&Te(o),p.value=o}function Te(o){(!i.objectLabelKeyName||i.objectLabelKeyName.length===0)&&q();const l=i.objectLabelKeyName;for(let f=0;f<o.length;f++)(typeof o[f]!="object"||!(l in o[f]))&&q()}async function Ce(o){const l=async()=>i.options(1,""),f=I=>{(!I||!("totalNum"in I))&&Z(),n.value=I.totalNum??o};await v.resetAndExecute(l,f)}const se=()=>h?.value?.textInputRef?.getElementsByTagName("li")[k.value]??null,De=o=>{d.value==!1?U():o&&Oe(o)},Oe=o=>{const l=o.key||o.code;(l==="Tab"||l==="Escape")&&S(),l==="ArrowDown"&&Be(o),l==="ArrowUp"&&Ee(o),(l==="Enter"||l===" ")&&Me(),o.preventDefault(),o.stopPropagation()},Me=()=>{M.value.length>0?(a.value=!0,B(M.value[k.value])):S()},Be=o=>{T.value=!0,k.value<M.value.length-1&&(o.preventDefault(),A.value=!1,k.value++,se()?.focus())},Ee=o=>{T.value=!0,k.value>0&&(o.preventDefault(),A.value=!1,k.value--,se()?.focus())},_={openList:U,unfocus:o=>{if(d?.value===!1)return;O.value.length>0&&(a.value=!0);const l=b?.value?.listContainerRef,f=h?.value?.textInputRef,I=o?.relatedTarget&&f?.isEqualNode(o?.relatedTarget),E=o?.relatedTarget&&l&&l.contains(o?.relatedTarget),ee=o?.relatedTarget&&l&&l.isEqualNode(o?.relatedTarget);if(!(E||I)){if(ee){J();return}S()}},press:De,mouseOverList:Y,getLabel:C,updatedSelected:B,focusInput:J,closeList:S};return(o,l)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative"},class:e.normalizeClass(o.$attrs.class)},[e.createVNode(ne,{ref_key:"itemListRef",ref:b,"show-drop-down":d.value,filteredListItems:M.value,mouseHoveringOnList:A.value,focusedIndex:D.value,selectedIndex:$.value,"max-list-height-p-x":t.maxListHeightPX,"list-animation-duration-ms":t.listAnimationDurationMs,"parent-methods":_,blockListChange:a.value,"onUpdate:blockListChange":l[1]||(l[1]=f=>a.value=f),"total-options-count":n.value,onReverseDropDownList:l[2]||(l[2]=f=>g.value=f),enableScrollClose:P.value},{default:e.withCtx(()=>[e.createVNode(ie,{ref_key:"dropDownButtonInput",ref:K,"parent-methods":_,"show-drop-down":d.value,"enable-text-filter":r.value,"custom-icon":t.customIcon,"reverse-drop-down-list":g.value},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"dropDownTextInput",ref:h,"enable-text-filter":r.value,"show-drop-down":d.value,placeholder:Q.value,"enable-button-click":T.value,"parent-methods":_,"onUpdate:query":l[0]||(l[0]=f=>O.value=f)},null,8,["enable-text-filter","show-drop-down","placeholder","enable-button-click"])]),_:1},8,["show-drop-down","enable-text-filter","custom-icon","reverse-drop-down-list"])]),_:1},8,["show-drop-down","filteredListItems","mouseHoveringOnList","focusedIndex","selectedIndex","max-list-height-p-x","list-animation-duration-ms","blockListChange","total-options-count","enableScrollClose"])],2))}}),[["__scopeId","data-v-cc38ced5"]])});
1
+ (function(e,F){typeof exports=="object"&&typeof module<"u"?module.exports=F(require("vue")):typeof define=="function"&&define.amd?define(["vue"],F):(e=typeof globalThis<"u"?globalThis:e||self,e.SuperList=F(e.Vue))})(this,function(e){"use strict";var F=document.createElement("style");F.textContent=`.list-filter-text-input[data-v-98f157c0]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem;width:100%;height:100%;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:transparent;border:0 none;pointer-events:auto;cursor:text}.list-filter-text-input[data-v-98f157c0]:focus,.list-filter-text-input[data-v-98f157c0]:focus-visible,.list-filter-text-input[data-v-98f157c0]:active{text-align:left}.click-through[data-v-98f157c0]{pointer-events:none}.dark-placeholder-text[data-v-98f157c0]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-98f157c0]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-98f157c0]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-98f157c0]{font-size:.875rem;line-height:1.5rem}}.list-option[data-v-e4eeb2f7]{text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-text-colour, rgb(55, 60, 65));transition-property:font-weight,background-color,color,text-shadow;transition-duration:.5s;transition-timing-function:ease;font-weight:400;text-shadow:1px 1px 3px var(--superlist-background-colour, white)}.list-option[data-v-e4eeb2f7]:focus-visible,.list-option>span[data-v-e4eeb2f7]:focus-visible{outline:none}.list-option-selected[data-v-e4eeb2f7]{font-weight:600}.list-option-message[data-v-e4eeb2f7]{text-shadow:1px 1px 3px var(--superlist-background-colour, white);text-transform:capitalize;display:inline-flex;width:100%;position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.list-option-active[data-v-e4eeb2f7]:hover,.list-option-active[data-v-e4eeb2f7],.list-option-selected[data-v-e4eeb2f7]:hover,.list-option[data-v-e4eeb2f7]:hover{font-weight:600;background-color:var(--superlist-theme-colour, rgb(77, 168, 11, .8));color:var(--superlist-background-colour, white);text-shadow:1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, .8));transition-duration:0s!important}.list-item-icon[data-v-e4eeb2f7]{display:flex;height:1rem;width:1rem;position:absolute;right:.7rem;margin-top:-.1rem;align-self:center}.list-item-span[data-v-e4eeb2f7]{padding:.5rem 1.75rem .5rem .75rem;width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-normal[data-v-e58cd48c]{top:var(--parent-y)}.list-reverse[data-v-e58cd48c]{bottom:var(--parent-y)}.select-list[data-v-e58cd48c]{--parent-width: var(--8d801350);--parent-x: var(--2724698a);--parent-y: var(--27246d4b);--duration: var(--ffcaa9a8);--border-radius: var(--superlist-list-border-radius, 0);border-radius:var(--border-radius);width:var(--parent-width);min-width:var(--parent-width);left:var(--parent-x);display:block;transition-property:max-height,opacity,visibility,box-shadow;transition-duration:var(--duration, .3s);transition-timing-function:cubic-bezier(.1,.9,.35,.98);position:absolute;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background-color:#ffffffb3;align-items:baseline;opacity:.25;z-index:999;visibility:collapse;overflow:auto;max-height:0;border:none!important}.select-list[data-v-e58cd48c]:focus-visible,.select-list>ul[data-v-e58cd48c]:focus-visible,.super-list-button-container[data-v-e58cd48c]:focus-visible{outline:none}.super-list-button-container[data-v-e58cd48c]{height:100%;width:100%}.select-list.select-list-open[data-v-e58cd48c]{z-index:999999;--max-height: var(--414dd276);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-e58cd48c]{overflow:hidden}.select-list-fixed[data-v-e58cd48c]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-e58cd48c]{--duration: var(--ffcaa9a8);overflow:visible;margin:0;padding:0;border-style:none;color:var(--superlist-text-colour, rgb(55, 60, 65));list-style:none;max-width:100%}.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius)}.select-list[data-v-e58cd48c]:not(.select-list-fixed){transition:none;box-shadow:none!important}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-e58cd48c]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-e58cd48c]{font-size:.875rem;line-height:1.25rem}}.list-button-icon[data-v-01ef8e37]{display:flex;transition-timing-function:ease-in-out;transition-duration:.2s;transition-property:transform;width:.6rem;transform:rotate(0);color:var(--superlist-text-colour, rgb(17, 24, 39));justify-content:center;max-height:18%}.list-button-icon.custom-icon[data-v-01ef8e37]{max-height:100%;width:1.25rem}.list-button-icon.rotate-180[data-v-01ef8e37]{transform:rotate(180deg)}.list-button[data-v-01ef8e37]{position:relative;padding:0;margin:0;width:100%;max-height:100%;height:100%;background-color:var(--superlist-background-colour, white);align-items:center;pointer-events:auto;cursor:pointer}.list-button[data-v-01ef8e37]:focus,.list-button[data-v-01ef8e37]:focus-visible,.list-button[data-v-01ef8e37]:active{text-align:left}.list-button-icon-div[data-v-01ef8e37]{pointer-events:none;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:.75rem;max-height:100%;height:100%;gap:max(.15rem,calc(6.25% + .075rem));transition:gap .2s}.list-button-icon-div.bigger-gap[data-v-01ef8e37]{gap:calc(40% - .25rem)}.click-through[data-v-01ef8e37]{pointer-events:none}[data-v-cc38ced5]{box-sizing:border-box}
2
+ /*$vite$:1*/`,document.head.appendChild(F);class re{eventsTypes=["resize","load","scroll","wheel","touchmove"];config={attributes:!0,childList:!0,subtree:!0};mutationObserver;callbackFunction;constructor(s,c=document.body){this.targetNode=c,this.callbackFunction=m=>s(m),this.mutationObserver=new MutationObserver(()=>s())}observe(){this.mutationObserver.observe(this.targetNode,this.config);for(const s of this.eventsTypes)this.addListener(s);this.addResizeListener(),this.addTransitionEndListener()}pauseMutationObserver(){this.mutationObserver.disconnect()}unpauseMutationObserver(){this.mutationObserver.observe(this.targetNode,this.config)}unobserve(){this.mutationObserver.disconnect();for(const s of this.eventsTypes)this.removeListener(s);this.removeResizeListener(),this.removeTransitionEndListener()}addListener(s){document.addEventListener(s,this.callbackFunction,!0)}removeListener(s){document.removeEventListener(s,this.callbackFunction,!0)}addTransitionEndListener(){this.targetNode.addEventListener("transitionend",this.callbackFunction)}removeTransitionEndListener(){this.targetNode.removeEventListener("transitionend",this.callbackFunction)}addResizeListener(){window.addEventListener("resize",this.callbackFunction)}removeResizeListener(){window.removeEventListener("resize",this.callbackFunction)}}function le(t,s,c,m){return s!=null?s(t):t==null?"":typeof t=="object"?t[c]:m?ae(t,m):""+t}function ae(t,s){return s.find(c=>c.type===t)?.label??""}class ue{constructor(){this.abortController=new AbortController,this.func=()=>{},this.then=()=>{}}async abortablePromise(s,c,m){const i=await c();if(!s.aborted)return m(i)}setFunc(s){this.func=s}setThen(s){this.then=s}execute(){return this.abortablePromise(this.abortController.signal,this.func,this.then)}abort(s){this.abortController.abort(s||"Aborted By Controller."),this.abortController=new AbortController}resetAndExecute(s,c){return this.abort("New Request From Controller."),this.setFunc(s),this.setThen(c),this.execute()}}const ce=["tabindex","placeholder","size"],de=e.defineComponent({__name:"ListTextInput",props:{enableTextFilter:{type:Boolean,required:!0},placeholder:{type:String,default:void 0},enableButtonClick:{type:Boolean,default:!0},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0}},emits:{"update:selected":null,"update:query":null,"update:press":null},setup(t,{expose:s,emit:c}){const m=c,i=t,p=e.ref(null);function v(w){"sourceCapabilities"in w&&w.sourceCapabilities==null?i.parentMethods.closeList():i.parentMethods.openList()}function n(w){i.parentMethods.unfocus(w)}function r(w){w?.target?.value!=null&&m("update:query",w.target.value)}const d=e.computed(()=>{const w=p?.value?p.value.length:0,b=i.placeholder?.length||0;return w>0?w:b>0?b:5}),a=e.computed(()=>i.enableButtonClick===!0&&i.enableTextFilter===!0?"":"click-through"),g=e.computed(()=>i.showDropDown&&!i.enableTextFilter||!i.showDropDown?"dark-placeholder-text":"light-placeholder-text");function T(){if(p?.value){const w=p.value;w.blur(),w.value=""}}function L(){p?.value&&p.value.focus()}return s({blurInput:T,focusInput:L,textInputRef:p}),(w,b)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:b[8]||(b[8]=e.withModifiers(()=>{},["prevent"])),style:{display:"contents !important"}},[e.createElementVNode("input",{ref_key:"textInputRef",ref:p,tabindex:t.enableTextFilter?0:-1,onKeydown:[b[0]||(b[0]=e.withKeys(h=>t.parentMethods.press(h),["enter"])),b[1]||(b[1]=e.withKeys(h=>t.parentMethods.press(),["space"])),b[2]||(b[2]=e.withKeys(h=>t.parentMethods.press(h),["esc"])),b[3]||(b[3]=e.withKeys(h=>t.parentMethods.press(h),["up"])),b[4]||(b[4]=e.withKeys(h=>t.parentMethods.press(h),["down"]))],onFocusin:b[5]||(b[5]=h=>v(h)),onFocusout:b[6]||(b[6]=h=>n(h)),onInput:b[7]||(b[7]=h=>r(h)),type:"text","aria-autocomplete":"none",autocomplete:"off",placeholder:t.placeholder,size:d.value,class:e.normalizeClass([[a.value,g.value,{"text-filter-disabled":!t.enableTextFilter}],"list-filter-text-input"])},null,42,ce)],32))}}),N=(t,s)=>{const c=t.__vccOpts||t;for(const[m,i]of s)c[m]=i;return c},te=N(de,[["__scopeId","data-v-98f157c0"]]),fe={},pe={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 -16 16 17"};function me(t,s){return e.openBlock(),e.createElementBlock("svg",pe,s[0]||(s[0]=[e.createElementVNode("path",{"shape-rendering":"geometricPrecision",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"},null,-1)]))}const be=N(fe,[["render",me]]),he=["onMousedown"],we={class:"list-item-span"},ge={class:"list-item-span"},ve=N(e.defineComponent({__name:"ListItem",props:{mouseHoveringOnList:{type:Boolean,default:!1},filteredListItems:{type:Array,default:()=>[]},focusedIndex:{type:Number,default:null},selectedIndex:{type:Number,default:null},listElementOpenAndVisible:{type:Boolean,default:!1},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,default:!1},totalOptionsCount:{type:Number,default:0}},setup(t){const s=t,c=e.useTemplateRef("items"),m=e.computed(()=>{if(!c?.value)return null;const n=(Array.isArray(c.value)?c.value:[c.value])[s.focusedIndex];return n&&typeof n=="object"&&"scrollIntoView"in n&&typeof n.scrollIntoView=="function"?n:null});e.watch(()=>s.showDropDown,()=>i()),e.watch(()=>s.listElementOpenAndVisible,()=>p()),e.watch(()=>m.value,()=>p());function i(){!s.showDropDown||!m?.value?.parentElement?.parentElement||(m.value.parentElement.parentElement.scrollTop=m.value.offsetTop)}function p(){const v=m.value,n=v?.parentElement?.parentElement;if(!s.showDropDown||!v||!n)return;const r=v.offsetTop-n.scrollTop<0,d=v.offsetTop+v.offsetHeight-n.scrollTop>n.clientHeight;r&&(n.scrollTop=v.offsetTop),d&&(n.scrollTop=v.offsetTop+v.clientHeight-n.clientHeight)}return(v,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filteredListItems,(r,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,ref_for:!0,ref:"items",onKeyup:[n[0]||(n[0]=e.withKeys(a=>t.parentMethods.press(a),["enter"])),n[1]||(n[1]=e.withKeys(a=>t.parentMethods.press(a),["space"])),n[2]||(n[2]=e.withKeys(a=>t.parentMethods.press(a),["esc"]))],onKeydown:[n[3]||(n[3]=e.withKeys(a=>t.parentMethods.press(a),["up"])),n[4]||(n[4]=e.withKeys(a=>t.parentMethods.press(a),["down"]))],onFocusout:n[5]||(n[5]=a=>t.parentMethods.unfocus(a)),tabindex:"-1",onMousedown:e.withModifiers(a=>t.parentMethods.updatedSelected(r),["left"]),class:e.normalizeClass([{"list-option-selected":t.selectedIndex===d},{"list-option-active":t.filteredListItems.length===1||t.focusedIndex===d&&!t.mouseHoveringOnList},"list-option"])},[e.createElementVNode("span",we,e.toDisplayString(t.parentMethods.getLabel(r)),1),t.selectedIndex===d?(e.openBlock(),e.createBlock(be,{key:0,class:"list-item-icon","aria-hidden":"true"})):e.createCommentVNode("",!0)],42,he))),128)),t.filteredListItems.length===0?(e.openBlock(),e.createElementBlock("li",{key:0,onKeyup:[n[6]||(n[6]=e.withKeys(r=>t.parentMethods.press(r),["enter"])),n[7]||(n[7]=e.withKeys(r=>t.parentMethods.press(r),["space"])),n[8]||(n[8]=e.withKeys(r=>t.parentMethods.press(r),["esc"]))],onKeydown:[n[9]||(n[9]=e.withKeys(r=>t.parentMethods.press(r),["up"])),n[10]||(n[10]=e.withKeys(r=>t.parentMethods.press(r),["down"]))],onFocusout:n[11]||(n[11]=r=>t.parentMethods.unfocus(r)),onMousedown:n[12]||(n[12]=e.withModifiers(r=>t.parentMethods.closeList(r),["left"])),tabindex:"-1",class:"list-option-message"},n[20]||(n[20]=[e.createElementVNode("span",{class:"list-item-span"},"No Items To Display.",-1)]),32)):e.createCommentVNode("",!0),t.totalOptionsCount&&t.totalOptionsCount>(t.filteredListItems?.length||0)?(e.openBlock(),e.createElementBlock("li",{key:1,onKeyup:[n[13]||(n[13]=e.withKeys(r=>t.parentMethods.press(r),["enter"])),n[14]||(n[14]=e.withKeys(r=>t.parentMethods.press(r),["space"])),n[15]||(n[15]=e.withKeys(r=>t.parentMethods.press(r),["esc"]))],onKeydown:[n[16]||(n[16]=e.withKeys(r=>t.parentMethods.press(r),["up"])),n[17]||(n[17]=e.withKeys(r=>t.parentMethods.press(r),["down"]))],onFocusout:n[18]||(n[18]=r=>t.parentMethods.unfocus(r)),onMousedown:n[19]||(n[19]=e.withModifiers(r=>t.parentMethods.closeList(r),["left"])),tabindex:"-1",class:"list-option-message"},[e.createElementVNode("span",ge," +"+e.toDisplayString(t.totalOptionsCount-t.filteredListItems?.length||0)+" More Items...",1)],32)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-e4eeb2f7"]]),ne=N(e.defineComponent({__name:"ItemList",props:{mouseHoveringOnList:{type:Boolean,default:!1},filteredListItems:{type:Array,default:()=>[]},focusedIndex:{type:Number,default:null},selectedIndex:{type:Number,default:null},parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0},maxListHeightPX:{type:Number,required:!0},listAnimationDurationMs:{type:Number,required:!0},blockListChange:{type:Boolean,required:!0},totalOptionsCount:{type:Number,default:0},enableScrollClose:{type:Boolean,default:!0}},emits:["reverseDropDownList"],setup(t,{expose:s,emit:c}){e.useCssVars(u=>({"8d801350":T.value,"2724698a":O.value,"27246d4b":W.value,ffcaa9a8:A.value,"414dd276":q.value}));const m=c,i=t,p=e.ref(null),v=e.ref(null),n=e.ref(null),r=e.ref(0),d=e.ref(0),a=e.ref(0),g=e.ref(0),T=e.ref("0px"),L=e.ref(!1),w=e.ref([]),b=e.ref(0),h=e.computed(()=>!L.value||window?.innerHeight==null?!1:z()&&Z()),K=e.computed(()=>i.maxListHeightPX>=b.value);e.watch(()=>h.value,u=>m("reverseDropDownList",u),{immediate:!0});const O=e.computed(()=>r.value+"px"),W=e.computed(()=>g.value+"px");s({listContainerRef:n});const S=u=>{u?.key&&u.key===" "&&u.preventDefault()},Q=u=>{const y=n?.value,x=u.target;(!(y&&x&&y.contains(x))||y.isEqualNode(x))&&i.parentMethods.focusInput()};function B(){return v?.value?(v?.value).clientHeight:0}function C(){if(!L.value||B()===0)return i.maxListHeightPX;const u=B()===0?i.maxListHeightPX:+B();return i.maxListHeightPX&&i.maxListHeightPX>u?u:i.maxListHeightPX}function z(){return d.value>C()}function Z(){return a.value<C()}const q=e.computed(()=>(i.maxListHeightPX||0)+"px"),A=e.computed(()=>(i.listAnimationDurationMs||0)+"ms"),$=e.computed(()=>i.blockListChange?w.value:i.filteredListItems);e.watch(()=>$,u=>{u&&(w.value=u.value)},{immediate:!1,deep:!0});let k=setTimeout(()=>{},0),D=null;function M(){b.value=B(),clearTimeout(k),D&&D.observe(),L.value=!0,H(void 0)}function Y(){clearTimeout(k),k=setTimeout(()=>{i.showDropDown||(L.value=!1,D&&D.unobserve())},i.listAnimationDurationMs+50)}e.watch(()=>i.showDropDown,(u,y)=>{u!==y&&(R(),u?M():Y())},{immediate:!0});function H(u){R(),e.nextTick(()=>R()),X(u)}function X(u){if(!i.enableScrollClose||!i.showDropDown||typeof n?.value?.contains!="function"||u?.target?.nodeType==null||U(u))return;const x=["scroll","wheel","touchmove"].includes(u?.type);i.showDropDown&&x&&i.parentMethods.closeList()}function U(u){const y=!!p.value?.contains(u?.target),x=!!n.value?.contains(u.target),V=[u?.srcElement?.id,u?.target?.id].includes("super-list-select-list");return y||x||V}function R(){P(),j()}function P(){if(p?.value==null)return;const u=p.value.getBoundingClientRect();d.value=u.top,a.value=window.innerHeight-u.bottom,T.value=u.width+"px"}function j(){if(p?.value==null||n?.value==null)return;const u=J().getBoundingClientRect(),y=n.value.getBoundingClientRect(),x=g.value,V=r.value;h.value?g.value=x-(u.top-y.bottom):g.value=x-(y.top-u.bottom),r.value=V-(y.left-u.left)}function G(){return(p?.value).getElementsByTagName("button")[0]}function J(){return p?.value}return e.onMounted(()=>{D=new re(H,G()),setTimeout(()=>H(void 0),250)}),e.onUnmounted(()=>{D?.unobserve()}),(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropDownButtonContainer",ref:p,class:"super-list-button-container"},[e.renderSlot(u.$slots,"default",{},void 0,!0)],512),e.createElementVNode("div",{id:"super-list-select-list",ref_key:"listContainerRef",ref:n,onMouseenter:y[0]||(y[0]=x=>t.parentMethods.mouseOverList()),tabindex:"-1",class:e.normalizeClass(["select-list",h.value?"list-reverse":"list-normal",{"select-list-open":t.showDropDown},{"no-scroll":K.value&&L.value},{"select-list-fixed":L.value},{"select-list-scrollable":!K.value}]),onKeydown:y[1]||(y[1]=e.withKeys(x=>S(x),["space"])),onMouseup:y[2]||(y[2]=e.withModifiers(x=>Q(x),["left"]))},[e.createElementVNode("ul",{tabindex:"-1",ref_key:"dropDownListUL",ref:v,class:"list-content"},[e.createVNode(ve,{filteredListItems:w.value,mouseHoveringOnList:t.mouseHoveringOnList,focusedIndex:t.focusedIndex,selectedIndex:t.selectedIndex,listElementOpenAndVisible:L.value,"parent-methods":t.parentMethods,"show-drop-down":t.showDropDown,"total-options-count":t.totalOptionsCount},null,8,["filteredListItems","mouseHoveringOnList","focusedIndex","selectedIndex","listElementOpenAndVisible","parent-methods","show-drop-down","total-options-count"])],512)],34)],64))}}),[["__scopeId","data-v-e58cd48c"]]),ye={},xe={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 0 12 6"};function Le(t,s){return e.openBlock(),e.createElementBlock("svg",xe,s[0]||(s[0]=[e.createElementVNode("path",{"shape-rendering":"geometricPrecision",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"},null,-1)]))}const oe=N(ye,[["render",Le]]),Ie=["tabindex"],ke={key:2,class:"list-button-icon custom-icon"},ie=N(e.defineComponent({__name:"ListButton",props:{parentMethods:{type:Object,required:!0},showDropDown:{type:Boolean,required:!0},enableTextFilter:{type:Boolean,required:!0},customIcon:{default:null,type:[Object,Function]},reverseDropDownList:{type:Boolean,required:!0}},setup(t,{expose:s}){const c=t,m=e.ref(null);function i(){c.enableTextFilter||c.parentMethods.openList()}function p(d){c.enableTextFilter?(c.parentMethods.focusInput(),d.stopPropagation(),d.preventDefault()):c.parentMethods.press(d)}function v(d){c.enableTextFilter||c.parentMethods.press(d)}function n(){m?.value&&m.value.blur()}function r(){m?.value&&m.value.focus()}return s({blurInput:n,focusInput:r,buttonRef:m}),(d,a)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"buttonRef",ref:m,tabindex:t.enableTextFilter?-1:0,onKeydown:[a[0]||(a[0]=e.withKeys(g=>p(g),["enter"])),a[1]||(a[1]=e.withKeys(g=>v(g),["space"])),a[2]||(a[2]=e.withKeys(g=>t.parentMethods.press(g),["esc"])),a[3]||(a[3]=e.withKeys(g=>t.parentMethods.press(g),["up"])),a[4]||(a[4]=e.withKeys(g=>t.parentMethods.press(g),["down"]))],onFocusout:a[5]||(a[5]=g=>t.parentMethods.unfocus(g)),onClick:a[6]||(a[6]=g=>i()),type:"button",class:e.normalizeClass([[{"click-through":c.enableTextFilter||c.showDropDown}],"list-button"])},[e.renderSlot(d.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:e.normalizeClass(["list-button-icon-div",{"bigger-gap":c.showDropDown}])},[t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["list-button-icon",[{"rotate-180":!c.showDropDown}]])},[e.createVNode(oe,{"aria-hidden":"true"})],2)),t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["list-button-icon",[{"rotate-180":c.showDropDown}]])},[t.customIcon==null?(e.openBlock(),e.createBlock(oe,{key:0,"aria-hidden":"true"})):e.createCommentVNode("",!0)],2)),t.customIcon?(e.openBlock(),e.createElementBlock("span",ke,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{"aria-hidden":"true"}))])):e.createCommentVNode("",!0)],2)],42,Ie))}}),[["__scopeId","data-v-01ef8e37"]]);return N(e.defineComponent({__name:"super-list",props:{selected:{type:[String,Number,Object,null,void 0]},options:{type:[Function,Array],required:!0},maxListOptions:{type:Number,default:50},maxListHeightPX:{type:Number,default:200},tooltip:{type:String,required:!1},objectLabelKeyName:{type:String,default:""},enumKeyToLabelObjectArray:{type:Object,default:void 0},listAnimationDurationMs:{type:Number,default:300},customIcon:{default:null,type:[Object,Function]},forceTextFilterVisibilityTo:{type:Boolean,default:void 0},customPlaceHolderFunction:{type:Function,default:null},colour:{type:String,default:"black"},scrollTextInputToTopOnMobile:{type:Boolean,default:!0}},emits:{"update:selected":null},setup(t,{expose:s,emit:c}){const m=c,i=t,p=e.ref([]),v=new ue,n=e.ref(0),r=e.computed(()=>i.forceTextFilterVisibilityTo!=null?i.forceTextFilterVisibilityTo:n.value>i.maxListOptions),d=e.ref(!1),a=e.ref(!1),g=e.ref(!1),T=e.ref(!0),L=e.ref(!1),w=e.ref(!1),b=e.ref(ne),h=e.ref(te),K=e.ref(ie),O=e.ref("");e.watch(()=>O.value,(o,l)=>{o!==l&&typeof i.options=="function"&&x(o)});const W=()=>{r.value&&h?.value?.blurInput()},S=()=>{clearTimeout(j),W(),O.value="",d.value=!1,T.value=!0},Q=e.computed(()=>w?.value===!0?"Error loading data":L?.value===!0?"Loading...":C(i.selected)),B=o=>{o&&m("update:selected",o),S()},C=o=>le(o,i.customPlaceHolderFunction,i.objectLabelKeyName,i.enumKeyToLabelObjectArray);function z(){throw L.value=!0,w.value=!0,new Error("Invalid options argument provided to ListInputComponent")}function Z(){throw L.value=!0,w.value=!0,new Error("Invalid response provided to ListInputComponent, no total count key found")}function q(){throw L.value=!0,w.value=!0,new Error("Invalid objectLabelKeyName for provided Dropdown list value.")}e.onMounted(()=>{typeof i.options!="function"&&!Array.isArray(i.options)?z():u()});const A=e.ref(!1),$=e.ref(0),k=e.ref(0),D=e.ref(0);e.watch(()=>k.value,(o,l)=>{o!=l&&!a.value&&(D.value=o)},{immediate:!0}),e.watch(()=>a.value,o=>{o||(D.value=k.value)},{immediate:!0});const M=e.computed(()=>{if(typeof i.options=="function"&&!Array.isArray(i.options))return p.value;const o=O.value,l=p.value;return o===""?l:l.filter(f=>C(f).toLowerCase().includes(o.toLowerCase()))});e.watch(()=>M.value,(o,l)=>{JSON.stringify(o)!==JSON.stringify(l)&&H()},{immediate:!1,deep:!0});const Y=()=>{A.value=!0},H=()=>{const o=X();$.value=o,k.value=o>-1?o:0};function X(){if(i.selected==null)return-1;const o=M.value.map(f=>C(f)),l=o.filter(f=>f===C(i.selected));if(l.length>1){const f=l.map(I=>o.indexOf(I));for(let I=0;I<f.length;I++){const E=JSON.stringify(M.value[f[I]]),ee=JSON.stringify(i.selected);if(E===ee)return f[I]}return-1}return o.indexOf(C(i.selected))}const U=()=>{L.value||(d.value||(a.value=!1,H(),R(),d.value=!0),A.value=!1,T.value=!1)},R=()=>{const o=window?.innerWidth!=null&&window.innerWidth<640,l=screen?.width!=null&&screen.width<640,f=h.value.textInputRef;(o||l)&&r.value&&(G(),i.scrollTextInputToTopOnMobile&&f?.scrollIntoView({block:"start",inline:"center"}))},P=e.ref(!0);let j=setTimeout(()=>{},0);function G(){const o=h.value.textInputRef;if(!o)return;P.value=!1;let l=null;const f=()=>{l&&clearInterval(l),clearTimeout(j),setTimeout(()=>{P.value=!0},100)};j=setTimeout(f,5e3),l=setInterval(()=>{(d.value===!1||o?.scrollTop===0&&document.readyState==="complete")&&f()},100)}const J=()=>{r?.value==!0?h.value.focusInput():K?.value?.focusInput&&K?.value?.focusInput()};async function u(){typeof i.options=="function"?await x(O.value?O.value:void 0,!0):(V(i.options),n.value=p.value.length),y()}s({initializeOptions:u,getLabel:C});function y(){X()==-1&&p.value&&!!p.value[0]&&B(p.value[0])}async function x(o,l=!0){L.value=l;const f=async()=>i.options(i.maxListOptions,o||""),I=E=>{(!E||!("data"in E))&&z(),V(E.data),Ce(E?.data?.length??0).then(()=>{L.value=!1})};await v.resetAndExecute(f,I)}function V(o){Array.isArray(o)||z(),o.length>0&&typeof o[0]=="object"&&Te(o),p.value=o}function Te(o){(!i.objectLabelKeyName||i.objectLabelKeyName.length===0)&&q();const l=i.objectLabelKeyName;for(let f=0;f<o.length;f++)(typeof o[f]!="object"||!(l in o[f]))&&q()}async function Ce(o){const l=async()=>i.options(1,""),f=I=>{(!I||!("totalNum"in I))&&Z(),n.value=I.totalNum??o};await v.resetAndExecute(l,f)}const se=()=>h?.value?.textInputRef?.getElementsByTagName("li")[k.value]??null,De=o=>{d.value==!1?U():o&&Oe(o)},Oe=o=>{const l=o.key||o.code;(l==="Tab"||l==="Escape")&&S(),l==="ArrowDown"&&Be(o),l==="ArrowUp"&&Ee(o),(l==="Enter"||l===" ")&&Me(),o.preventDefault(),o.stopPropagation()},Me=()=>{M.value.length>0?(a.value=!0,B(M.value[k.value])):S()},Be=o=>{T.value=!0,k.value<M.value.length-1&&(o.preventDefault(),A.value=!1,k.value++,se()?.focus())},Ee=o=>{T.value=!0,k.value>0&&(o.preventDefault(),A.value=!1,k.value--,se()?.focus())},_={openList:U,unfocus:o=>{if(d?.value===!1)return;O.value.length>0&&(a.value=!0);const l=b?.value?.listContainerRef,f=h?.value?.textInputRef,I=o?.relatedTarget&&f?.isEqualNode(o?.relatedTarget),E=o?.relatedTarget&&l&&l.contains(o?.relatedTarget),ee=o?.relatedTarget&&l&&l.isEqualNode(o?.relatedTarget);if(!(E||I)){if(ee){J();return}S()}},press:De,mouseOverList:Y,getLabel:C,updatedSelected:B,focusInput:J,closeList:S};return(o,l)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative"},class:e.normalizeClass(o.$attrs.class)},[e.createVNode(ne,{ref_key:"itemListRef",ref:b,"show-drop-down":d.value,filteredListItems:M.value,mouseHoveringOnList:A.value,focusedIndex:D.value,selectedIndex:$.value,"max-list-height-p-x":t.maxListHeightPX,"list-animation-duration-ms":t.listAnimationDurationMs,"parent-methods":_,blockListChange:a.value,"onUpdate:blockListChange":l[1]||(l[1]=f=>a.value=f),"total-options-count":n.value,onReverseDropDownList:l[2]||(l[2]=f=>g.value=f),enableScrollClose:P.value},{default:e.withCtx(()=>[e.createVNode(ie,{ref_key:"dropDownButtonInput",ref:K,"parent-methods":_,"show-drop-down":d.value,"enable-text-filter":r.value,"custom-icon":t.customIcon,"reverse-drop-down-list":g.value},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"dropDownTextInput",ref:h,"enable-text-filter":r.value,"show-drop-down":d.value,placeholder:Q.value,"enable-button-click":T.value,"parent-methods":_,"onUpdate:query":l[0]||(l[0]=f=>O.value=f)},null,8,["enable-text-filter","show-drop-down","placeholder","enable-button-click"])]),_:1},8,["show-drop-down","enable-text-filter","custom-icon","reverse-drop-down-list"])]),_:1},8,["show-drop-down","filteredListItems","mouseHoveringOnList","focusedIndex","selectedIndex","max-list-height-p-x","list-animation-duration-ms","blockListChange","total-options-count","enableScrollClose"])],2))}}),[["__scopeId","data-v-cc38ced5"]])});
3
3
  //# sourceMappingURL=super-list.umd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"super-list.umd.cjs","sources":["../src/DropDownLibrary.ts","../src/ListInputComponents/ListTextInput.vue","../src/ListInputComponents/default-tick.vue","../src/ListInputComponents/ListItem.vue","../src/ListInputComponents/ItemList.vue","../src/ListInputComponents/default-arrow.vue","../src/ListInputComponents/ListButton.vue","../src/super-list.vue"],"sourcesContent":["export interface DocumentViewChangeListener {\n targetNode: HTMLElement\n observe(): void\n unobserve(): void\n pauseMutationObserver(): void\n unpauseMutationObserver(): void\n}\n\nexport class DocumentViewChangeListener implements DocumentViewChangeListener {\n private readonly eventsTypes: string[] = ['resize', 'load', 'scroll', 'wheel', 'touchmove']\n private readonly config: MutationObserverInit = {\n attributes: true,\n childList: true,\n subtree: true\n }\n private mutationObserver: MutationObserver\n private callbackFunction: EventListenerOrEventListenerObject\n\n constructor(targetFunction: Function, targetNode: any = document.body) {\n this.targetNode = targetNode\n this.callbackFunction = ((event: any) =>\n targetFunction(event)) as EventListenerOrEventListenerObject\n this.mutationObserver = new MutationObserver((() => targetFunction()) as MutationCallback)\n }\n\n public observe(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n for (const eventType of this.eventsTypes) this.addListener(eventType)\n this.addResizeListener()\n this.addTransitionEndListener()\n }\n\n pauseMutationObserver(): void {\n this.mutationObserver.disconnect()\n }\n\n unpauseMutationObserver(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n }\n\n public unobserve(): void {\n this.mutationObserver.disconnect()\n for (const eventType of this.eventsTypes) this.removeListener(eventType)\n this.removeResizeListener()\n this.removeTransitionEndListener()\n }\n\n private addListener(eventType: string): void {\n document.addEventListener(eventType, this.callbackFunction, true)\n }\n\n private removeListener(eventType: string): void {\n document.removeEventListener(eventType, this.callbackFunction, true)\n }\n\n private addTransitionEndListener(): void {\n this.targetNode.addEventListener('transitionend', this.callbackFunction)\n }\n\n private removeTransitionEndListener(): void {\n this.targetNode.removeEventListener('transitionend', this.callbackFunction)\n }\n\n private addResizeListener(): void {\n window.addEventListener('resize', this.callbackFunction)\n }\n\n private removeResizeListener(): void {\n window.removeEventListener('resize', this.callbackFunction)\n }\n}\n\nexport function getLabelString(\n value: string | number | object | null | undefined,\n customLabelGetFunction: Function | null | undefined,\n objectLabelKeyName: string | null,\n enumKeyToLabelObjectArray?: EnumType[]\n): string {\n if (customLabelGetFunction != null) return customLabelGetFunction(value)\n if (value == null) return ''\n if (typeof value === 'object') return value[objectLabelKeyName as keyof typeof value]\n if (enumKeyToLabelObjectArray) return getEnumLabel(value, enumKeyToLabelObjectArray)\n return '' + value\n}\n\nfunction getEnumLabel(value: string | number, enumKeyArray: EnumType[]): string {\n return (enumKeyArray.find((eT: EnumType): boolean => eT.type === value)?.label ?? '') as string\n}\n\nexport type ListRequest = (maxNumItems: number, stringFilter?: string) => Promise<DataSet<any>>\n\nexport type EnumType = { type: string; label: string }\n\nexport type DataSet<T> = { data: T[]; totalNum: number; modelName?: string }\n\nexport interface AbortablePromise {\n abortController: AbortController\n func: Function\n then: Function\n}\n\nexport class AbortablePromise implements AbortablePromise {\n constructor() {\n this.abortController = new AbortController()\n this.func = (): void => {}\n this.then = (): void => {}\n }\n\n async abortablePromise(signal: AbortSignal, asyncFunc: Function, then: Function): Promise<any> {\n const response = await asyncFunc()\n if (signal.aborted) return\n return then(response)\n }\n\n setFunc(func: Function): void {\n this.func = func\n }\n\n setThen(then: Function): void {\n this.then = then\n }\n\n execute(): Promise<any> {\n return this.abortablePromise(this.abortController.signal, this.func, this.then)\n }\n\n abort(reason?: string): void {\n this.abortController.abort(reason || 'Aborted By Controller.')\n this.abortController = new AbortController()\n }\n\n resetAndExecute(func: Function, then: Function): Promise<any> {\n this.abort('New Request From Controller.')\n this.setFunc(func)\n this.setThen(then)\n return this.execute()\n }\n}\n","<template>\n <form @submit.prevent>\n <!-- Forces virtual keyboard to display return/enter key when list exists in external form -->\n <input\n ref=\"textInputRef\"\n :tabindex=\"enableTextFilter ? 0 : -1\"\n @keydown.enter=\"parentMethods.press($event)\"\n @keydown.space=\"parentMethods.press()\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusin=\"focusInHandler($event)\"\n @focusout=\"focusOutHandler($event)\"\n @input=\"updateQuery($event as InputEvent)\"\n type=\"text\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n :placeholder=\"placeholder\"\n :size=\"textInputSize\"\n :class=\"[\n pointerEventsClass,\n textInputColourClass,\n { 'text-filter-disabled': !enableTextFilter }\n ]\"\n class=\"list-filter-text-input\"\n />\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType, ref } from 'vue'\n\nconst emit = defineEmits({\n 'update:selected': null,\n 'update:query': null,\n 'update:press': null\n})\n\nconst props = defineProps({\n enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: true\n },\n placeholder: {\n type: String as PropType<string | undefined>,\n default: undefined\n },\n enableButtonClick: {\n type: Boolean as PropType<boolean | null>,\n default: true\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n }\n})\nconst textInputRef = ref(null)\n\nfunction focusInHandler(e: FocusEvent) {\n if ('sourceCapabilities' in e && e.sourceCapabilities == null) props.parentMethods.closeList()\n else props.parentMethods.openList()\n}\n\nfunction focusOutHandler(event: FocusEvent) {\n props.parentMethods.unfocus(event)\n}\n\nfunction updateQuery(event: any) {\n if (event?.target?.value != undefined) emit('update:query', event.target.value)\n}\n\nconst textInputSize = computed(() => {\n const refLength: number = textInputRef?.value ? (textInputRef.value as string).length : 0\n const placeHolderLength: number = props.placeholder?.length || 0\n return refLength > 0 ? refLength : placeHolderLength > 0 ? placeHolderLength : 5\n})\n\nconst pointerEventsClass = computed(() => {\n const enable: boolean = props.enableButtonClick === true && props.enableTextFilter === true\n return enable ? '' : 'click-through'\n})\n\nconst textInputColourClass = computed(() => {\n const dark: boolean = (props.showDropDown && !props.enableTextFilter) || !props.showDropDown\n return dark ? 'dark-placeholder-text' : 'light-placeholder-text'\n})\n\nfunction blurInput() {\n if (textInputRef?.value) {\n const input: HTMLInputElement = textInputRef.value\n input.blur()\n input.value = ''\n }\n}\n\nfunction focusInput() {\n if (textInputRef?.value) (textInputRef.value as HTMLInputElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, textInputRef })\n</script>\n\n<style scoped>\n.list-filter-text-input {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n text-align: center;\n padding: 0.125rem 2rem 0.125rem 0.5rem;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: transparent;\n border: 0 none;\n pointer-events: auto;\n cursor: text;\n}\n\n.list-filter-text-input:focus,\n.list-filter-text-input:focus-visible,\n.list-filter-text-input:active {\n text-align: left;\n}\n\n.click-through {\n pointer-events: none;\n}\n\n.dark-placeholder-text::placeholder {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n}\n\n.light-placeholder-text::placeholder {\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.text-filter-disabled {\n background-color: transparent;\n border: none;\n outline: none;\n box-shadow: none;\n filter: none;\n}\n\n@media (min-width: 640px) {\n .list-filter-text-input {\n font-size: 0.875rem;\n line-height: 1.5rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 -16 16 17\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <li\n v-for=\"(listItem, index) in filteredListItems\"\n :key=\"index\"\n ref=\"items\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n tabindex=\"-1\"\n @mousedown.left=\"parentMethods.updatedSelected(listItem)\"\n :class=\"[\n { 'list-option-selected': selectedIndex === index },\n {\n 'list-option-active':\n filteredListItems.length === 1 || (focusedIndex === index && !mouseHoveringOnList)\n },\n 'list-option'\n ]\"\n >\n <span class=\"list-item-span\">{{ parentMethods.getLabel(listItem) }}</span>\n <default-tick v-if=\"selectedIndex === index\" class=\"list-item-icon\" aria-hidden=\"true\" />\n </li>\n <li\n v-if=\"filteredListItems.length === 0\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">No Items To Display.</span>\n </li>\n <li\n v-if=\"totalOptionsCount && totalOptionsCount > (filteredListItems?.length || 0)\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">\n +{{ totalOptionsCount - filteredListItems?.length || 0 }} More Items...</span\n >\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type ShallowRef, useTemplateRef, watch } from 'vue'\nimport DefaultTick from './default-tick.vue'\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n listElementOpenAndVisible: {\n type: Boolean,\n default: false\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n default: false\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n }\n})\ntype HTMLLIElementOrArray = HTMLLIElement | HTMLLIElement[] | null\nconst iRefs: Readonly<ShallowRef<HTMLLIElementOrArray>> = useTemplateRef('items')\n\nconst focusedLi = computed((): HTMLElement | null => {\n if (!iRefs?.value) return null\n const refs: Array<HTMLLIElement | null> = Array.isArray(iRefs.value) ? iRefs.value : [iRefs.value]\n const focused = refs[props.focusedIndex]\n if (!focused) return null\n const isObject: boolean = typeof focused == 'object'\n const hasScrollIntoView: boolean = isObject && 'scrollIntoView' in focused\n const hasScrollFunc: boolean = hasScrollIntoView && typeof focused['scrollIntoView'] == 'function'\n return hasScrollFunc ? focused : null\n})\n\nwatch(\n () => props.showDropDown,\n () => scrollHighlightedListItemToTop()\n)\nwatch(\n () => props.listElementOpenAndVisible,\n () => scrollHighlightedListItemIntoView()\n)\nwatch(\n () => focusedLi.value,\n () => scrollHighlightedListItemIntoView()\n)\n\nfunction scrollHighlightedListItemToTop(): void {\n if (!props.showDropDown || !focusedLi?.value?.parentElement?.parentElement) return\n focusedLi.value.parentElement.parentElement.scrollTop = focusedLi.value.offsetTop\n}\n\nfunction scrollHighlightedListItemIntoView(): void {\n const li = focusedLi.value\n const liParent = li?.parentElement?.parentElement\n if (!props.showDropDown || !li || !liParent) return\n const aboveTop = li.offsetTop - liParent.scrollTop < 0\n const belowBottom = li.offsetTop + li.offsetHeight - liParent.scrollTop > liParent.clientHeight\n if (aboveTop) liParent.scrollTop = li.offsetTop\n if (belowBottom) liParent.scrollTop = li.offsetTop + li.clientHeight - liParent.clientHeight\n}\n</script>\n\n<style scoped>\n.list-option {\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n transition-property: font-weight, background-color, color, text-shadow;\n transition-duration: 500ms;\n transition-timing-function: ease;\n font-weight: 400;\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n}\n\n.list-option:focus-visible,\n.list-option > span:focus-visible {\n outline: none;\n}\n\n.list-option-selected {\n font-weight: 600;\n}\n\n.list-option-message {\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.list-option-active:hover,\n.list-option-active,\n.list-option-selected:hover,\n.list-option:hover {\n font-weight: 600;\n background-color: var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n color: var(--superlist-background-colour, white);\n text-shadow: 1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n transition-duration: 0s !important;\n}\n\n.list-item-icon {\n display: flex;\n height: 1rem;\n width: 1rem;\n position: absolute;\n right: 0.7rem;\n margin-top: -0.1rem;\n align-self: center;\n}\n\n.list-item-span {\n padding: 0.5rem 1.75rem 0.5rem 0.75rem;\n width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n","<template>\n <div ref=\"dropDownButtonContainer\" class=\"super-list-button-container\">\n <slot></slot>\n </div>\n <div\n id=\"super-list-select-list\"\n ref=\"listContainerRef\"\n @mouseenter=\"parentMethods.mouseOverList()\"\n tabindex=\"-1\"\n :class=\"[\n 'select-list',\n reverseList ? 'list-reverse' : 'list-normal',\n { 'select-list-open': showDropDown },\n { 'no-scroll': noScroll && listElementOpenAndVisible },\n { 'select-list-fixed': listElementOpenAndVisible },\n { 'select-list-scrollable': !noScroll }\n ]\"\n @keydown.space=\"preventSpaceScrollingList($event)\"\n @mouseup.left=\"refocusTextInput($event)\"\n >\n <ul tabindex=\"-1\" ref=\"dropDownListUL\" class=\"list-content\">\n <list-item\n :filteredListItems=\"listItemsToDisplay\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"focusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :listElementOpenAndVisible=\"listElementOpenAndVisible\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :total-options-count=\"totalOptionsCount\"\n />\n </ul>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n type ComputedRef,\n nextTick,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch\n} from 'vue'\nimport ListItem from '../ListInputComponents/ListItem.vue'\nimport { DocumentViewChangeListener } from '../DropDownLibrary'\n\nconst emit = defineEmits(['reverseDropDownList'])\n\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n maxListHeightPX: {\n type: Number,\n required: true\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n required: true\n },\n blockListChange: {\n type: Boolean,\n required: true\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n },\n enableScrollClose: {\n type: Boolean,\n default: true\n }\n})\n\nconst dropDownButtonContainer = ref<HTMLElement | null>(null)\nconst dropDownListUL = ref<HTMLElement | null>(null)\nconst listContainerRef = ref<HTMLElement | null>(null)\nconst offsetLeft = ref<number>(0)\nconst offsetTop = ref<number>(0)\nconst offsetBottom = ref<number>(0)\nconst listOffset = ref<number>(0)\nconst parentWidthPx = ref<string>('0px')\nconst listElementOpenAndVisible = ref<boolean>(false)\nconst listItemsToDisplay = ref<any[]>([])\nconst listHeightPx = ref<number>(0)\n\nconst reverseList = computed((): boolean => {\n if (!listElementOpenAndVisible.value || window?.innerHeight == null) return false\n return sufficientRoomAbove() && insufficientRoomBelow()\n})\n\nconst noScroll = computed((): boolean => {\n return props.maxListHeightPX >= listHeightPx.value\n})\n\nwatch(\n () => reverseList.value,\n (reverse: boolean) => emit('reverseDropDownList', reverse),\n { immediate: true }\n)\n\nconst parentXPx = computed((): string => offsetLeft.value + 'px')\nconst parentYPx = computed((): string => listOffset.value + 'px')\n\ndefineExpose({ listContainerRef })\n\nconst preventSpaceScrollingList = (event: any) => {\n if (event?.key && event.key === ' ') event.preventDefault()\n}\n\nconst refocusTextInput = (event: MouseEvent) => {\n const list = listContainerRef?.value as HTMLElement | null\n const target = event.target as HTMLElement | null\n if (!(list && target && list.contains(target)) || list.isEqualNode(target))\n props.parentMethods.focusInput()\n}\n\nfunction getListULHeight(): number {\n return dropDownListUL?.value ? (dropDownListUL?.value as HTMLElement).clientHeight : 0\n}\n\nfunction displayableListHeight(): number {\n if (!listElementOpenAndVisible.value || getListULHeight() === 0) return props.maxListHeightPX\n const ulHt: number = getListULHeight() === 0 ? props.maxListHeightPX : +getListULHeight()\n return props.maxListHeightPX && props.maxListHeightPX > ulHt ? ulHt : props.maxListHeightPX\n}\n\nfunction sufficientRoomAbove(): boolean {\n return offsetTop.value > displayableListHeight()\n}\n\nfunction insufficientRoomBelow(): boolean {\n return offsetBottom.value < displayableListHeight()\n}\n\nconst maxListHeightPx = computed((): string => (props.maxListHeightPX || 0) + 'px')\n\nconst animationDuration = computed((): string => (props.listAnimationDurationMs || 0) + 'ms')\n\nconst updatedListItemsToDisplay = computed((): any[] => {\n return !props.blockListChange ? props.filteredListItems : listItemsToDisplay.value\n})\n\nwatch(\n () => updatedListItemsToDisplay,\n (newVal: ComputedRef<any[]>) => {\n if (newVal) listItemsToDisplay.value = newVal.value\n },\n { immediate: false, deep: true }\n)\n\nlet unobserveTimeout = setTimeout(() => {}, 0)\n\nlet changeListener: DocumentViewChangeListener | null = null\n\nfunction openAndObserveChangeListener() {\n listHeightPx.value = getListULHeight()\n clearTimeout(unobserveTimeout)\n if (changeListener) changeListener.observe()\n listElementOpenAndVisible.value = true\n buttonRePositionCallback(undefined)\n}\n\nfunction closeAndUnobserveChangeListener() {\n clearTimeout(unobserveTimeout)\n unobserveTimeout = setTimeout(() => {\n if (!props.showDropDown) {\n listElementOpenAndVisible.value = false\n if (changeListener) changeListener.unobserve()\n }\n }, props.listAnimationDurationMs + 50)\n}\n\nwatch(\n () => props.showDropDown,\n (newV, oldV) => {\n if (newV !== oldV) {\n setOffsets()\n if (newV) openAndObserveChangeListener()\n else closeAndUnobserveChangeListener()\n }\n },\n { immediate: true }\n)\n\nfunction buttonRePositionCallback(e: any): void {\n setOffsets()\n nextTick(() => setOffsets())\n closeListOnScrollIfNecessary(e)\n}\n\nfunction closeListOnScrollIfNecessary(e: any) {\n if (!props.enableScrollClose || !props.showDropDown) return\n const notInitialized: boolean = typeof listContainerRef?.value?.contains !== 'function'\n if (notInitialized || e?.target?.nodeType == null || insideListOrOtherList(e)) return\n const isScrollEvent: boolean = ['scroll', 'wheel', 'touchmove'].includes(e?.type)\n if (props.showDropDown && isScrollEvent) props.parentMethods.closeList()\n}\n\nfunction insideListOrOtherList(e: any): boolean {\n const insideButton: boolean = !!dropDownButtonContainer.value?.contains(e?.target as Node)\n const insideList: boolean = !!listContainerRef.value?.contains(e.target as Node)\n const otherList: boolean = [e?.srcElement?.id, e?.target?.id].includes('super-list-select-list')\n return insideButton || insideList || otherList\n}\n\nfunction setOffsets(): void {\n setButtonOffset()\n setListOffset()\n}\n\nfunction setButtonOffset(): void {\n if (dropDownButtonContainer?.value == null) return\n const brc: DOMRect = (dropDownButtonContainer.value as HTMLElement).getBoundingClientRect()\n offsetTop.value = brc.top\n offsetBottom.value = window.innerHeight - brc.bottom\n parentWidthPx.value = brc.width + 'px'\n}\n\nfunction setListOffset(): void {\n /**\n * List container must be used when calculating position and not \"dropDownListUL\".\n * Position must be calculated as window viewport might not match list container viewport.\n **/\n if (dropDownButtonContainer?.value == null || listContainerRef?.value == null) return\n const brc: DOMRect = getButtonContainerElement().getBoundingClientRect()\n const slrc: DOMRect = (listContainerRef.value as HTMLElement).getBoundingClientRect()\n const currentListOffset: number = listOffset.value\n const currentOffsetLeft: number = offsetLeft.value\n if (reverseList.value) listOffset.value = currentListOffset - (brc.top - slrc.bottom)\n else listOffset.value = currentListOffset - (slrc.top - brc.bottom)\n offsetLeft.value = currentOffsetLeft - (slrc.left - brc.left)\n}\n\nfunction getButtonElement(): HTMLButtonElement {\n return (dropDownButtonContainer?.value as HTMLElement).getElementsByTagName('button')[0]\n}\n\nfunction getButtonContainerElement(): HTMLDivElement {\n return dropDownButtonContainer?.value as HTMLDivElement\n}\n\nonMounted(() => {\n changeListener = new DocumentViewChangeListener(buttonRePositionCallback, getButtonElement())\n setTimeout(() => buttonRePositionCallback(undefined), 250)\n})\n\nonUnmounted(() => {\n changeListener?.unobserve()\n})\n</script>\n\n<style scoped>\n.list-normal {\n top: var(--parent-y);\n}\n\n.list-reverse {\n bottom: var(--parent-y);\n}\n\n.select-list {\n --parent-width: v-bind(parentWidthPx);\n --parent-x: v-bind(parentXPx);\n --parent-y: v-bind(parentYPx);\n --duration: v-bind(animationDuration);\n --border-radius: var(--superlist-list-border-radius, 0);\n border-radius: var(--border-radius);\n width: var(--parent-width);\n min-width: var(--parent-width);\n left: var(--parent-x);\n display: block;\n transition-property: max-height, opacity, visibility, box-shadow;\n transition-duration: var(--duration, 300ms);\n transition-timing-function: cubic-bezier(0.1, 0.9, 0.35, 0.98);\n position: absolute;\n backdrop-filter: blur(3px);\n -webkit-backdrop-filter: blur(3px);\n background-color: rgb(255, 255, 255, 0.7);\n align-items: baseline;\n opacity: 0.25;\n z-index: 999;\n visibility: collapse;\n overflow: auto;\n max-height: 0;\n border: none !important; /* can't transition border */\n}\n\n.select-list:focus-visible,\n.select-list > ul:focus-visible,\n.super-list-button-container:focus-visible {\n outline: none;\n}\n\n.super-list-button-container {\n height: 100%;\n width: 100%;\n}\n\n.select-list.select-list-open {\n z-index: 999999;\n --max-height: v-bind(maxListHeightPx);\n max-height: var(--max-height, 0);\n}\n\n.select-list.no-scroll {\n overflow: hidden;\n}\n\n.select-list-fixed {\n position: fixed;\n opacity: 1;\n visibility: visible;\n}\n\n.list-content {\n --duration: v-bind(animationDuration);\n overflow: visible;\n margin: 0;\n padding: 0;\n border-style: none;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n list-style: none;\n max-width: 100%;\n}\n\n.select-list.select-list-scrollable {\n border-radius: var(--border-radius);\n}\n\n.select-list:not(.select-list-fixed) {\n transition: none;\n box-shadow: none !important;\n}\n\n@media (min-width: 640px) {\n .select-list.select-list-scrollable {\n border-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n .list-content {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 0 12 6\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <button\n ref=\"buttonRef\"\n :tabindex=\"enableTextFilter ? -1 : 0\"\n @keydown.enter=\"enterHandler($event)\"\n @keydown.space=\"spaceHandler($event)\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @click=\"clickHandler()\"\n type=\"button\"\n :class=\"[{ 'click-through': props.enableTextFilter || props.showDropDown }]\"\n class=\"list-button\"\n >\n <slot></slot>\n <span class=\"list-button-icon-div\" :class=\"{ 'bigger-gap': props.showDropDown }\">\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': !props.showDropDown }]\"\n >\n <default-arrow aria-hidden=\"true\" />\n </span>\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': props.showDropDown }]\"\n >\n <default-arrow v-if=\"customIcon == null\" aria-hidden=\"true\" />\n </span>\n <span v-if=\"customIcon\" class=\"list-button-icon custom-icon\">\n <component aria-hidden=\"true\" :is=\"customIcon as object\" />\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType, ref } from 'vue'\nimport DefaultArrow from './default-arrow.vue'\n\n// prettier-ignore\nconst props = defineProps({ // eslint-disable-line\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n enableTextFilter: {\n type: Boolean,\n required: true\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n reverseDropDownList: {\n type: Boolean,\n required: true\n }\n})\n\nconst buttonRef = ref(null)\n\nfunction clickHandler() {\n if (props.enableTextFilter) return\n else props.parentMethods.openList()\n}\n\nfunction enterHandler(event: KeyboardEvent) {\n if (props.enableTextFilter) {\n props.parentMethods.focusInput()\n event.stopPropagation()\n event.preventDefault()\n } else {\n props.parentMethods.press(event)\n }\n}\n\nfunction spaceHandler(event: KeyboardEvent) {\n if (!props.enableTextFilter) props.parentMethods.press(event)\n}\n\nfunction blurInput() {\n if (buttonRef?.value) {\n const button: HTMLButtonElement = buttonRef.value\n button.blur()\n }\n}\n\nfunction focusInput() {\n if (buttonRef?.value) (buttonRef.value as HTMLButtonElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, buttonRef })\n</script>\n\n<style scoped>\n.list-button-icon {\n display: flex;\n transition-timing-function: ease-in-out;\n transition-duration: 200ms;\n transition-property: transform;\n width: 0.6rem;\n transform: rotate(0deg);\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n justify-content: center;\n max-height: 18%;\n}\n\n.list-button-icon.custom-icon {\n max-height: 100%;\n width: 1.25rem;\n}\n\n.list-button-icon.rotate-180 {\n transform: rotate(180deg);\n}\n\n.list-button {\n position: relative;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n height: 100%;\n background-color: var(--superlist-background-colour, white);\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n}\n\n.list-button:focus,\n.list-button:focus-visible,\n.list-button:active {\n text-align: left;\n}\n\n.list-button-icon-div {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-right: 0.75rem;\n max-height: 100%;\n height: 100%;\n gap: max(0.15rem, calc(6.25% + 0.075rem));\n transition: gap 200ms;\n}\n\n.list-button-icon-div.bigger-gap {\n gap: calc(40% - 0.25rem);\n}\n\n.click-through {\n pointer-events: none;\n}\n</style>\n","<template>\n <div style=\"position: relative\" :class=\"$attrs.class\">\n <item-list\n ref=\"itemListRef\"\n :show-drop-down=\"showDropDown\"\n :filteredListItems=\"filteredListItems\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"activeFocusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :max-list-height-p-x=\"maxListHeightPX\"\n :list-animation-duration-ms=\"listAnimationDurationMs\"\n :parent-methods=\"parentMethods\"\n v-model:blockListChange=\"blockListUpdates\"\n :total-options-count=\"totalOptionsCount\"\n @reverseDropDownList=\"reverseDropDownList = $event\"\n :enableScrollClose=\"enableScrollClose\"\n >\n <list-button\n ref=\"dropDownButtonInput\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :enable-text-filter=\"enableTextFilter\"\n :custom-icon=\"customIcon\"\n :reverse-drop-down-list=\"reverseDropDownList\"\n >\n <text-input\n ref=\"dropDownTextInput\"\n :enable-text-filter=\"enableTextFilter\"\n :show-drop-down=\"showDropDown\"\n :placeholder=\"placeholder\"\n :enable-button-click=\"enableButtonClick\"\n :parent-methods=\"parentMethods\"\n @update:query=\"query = $event\"\n />\n </list-button>\n </item-list>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, type PropType, ref, watch } from 'vue'\nimport {\n getLabelString,\n AbortablePromise,\n type DataSet,\n type EnumType,\n type ListRequest\n} from './DropDownLibrary'\nimport TextInput from './ListInputComponents/ListTextInput.vue'\nimport ItemList from './ListInputComponents/ItemList.vue'\nimport ListButton from './ListInputComponents/ListButton.vue'\n\nconst emit = defineEmits({ 'update:selected': null })\nconst props = defineProps({\n selected: {\n type: [String, Number, Object, null, undefined] as PropType<\n string | number | object | null | undefined\n >\n },\n options: {\n type: [Function, Array<string | number | object>] as PropType<\n ListRequest | Array<string | number | object>\n >,\n required: true\n },\n maxListOptions: {\n type: Number as PropType<number>,\n default: 50\n },\n maxListHeightPX: {\n type: Number as PropType<number>,\n default: 200\n },\n tooltip: {\n type: String,\n required: false\n },\n objectLabelKeyName: {\n type: String as PropType<string | null>,\n default: ''\n },\n enumKeyToLabelObjectArray: {\n type: Object as PropType<EnumType[]>,\n default: undefined\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n default: 300\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n forceTextFilterVisibilityTo: {\n type: Boolean as PropType<boolean>,\n default: undefined\n },\n customPlaceHolderFunction: {\n type: Function as PropType<Function | null>,\n default: null\n },\n colour: {\n type: String as PropType<string>,\n default: 'black'\n },\n scrollTextInputToTopOnMobile: {\n type: Boolean as PropType<boolean>,\n default: true\n }\n})\n\nconst listOptions = ref([] as Array<string | number | object>)\n\nconst abortablePromise = new AbortablePromise()\n\nconst totalOptionsCount = ref(0)\n\nconst enableTextFilter = computed((): boolean => {\n if (props.forceTextFilterVisibilityTo != undefined) return props.forceTextFilterVisibilityTo\n return totalOptionsCount.value > props.maxListOptions\n})\n\nconst showDropDown = ref<boolean>(false)\n\nconst blockListUpdates = ref<boolean>(false)\n\nconst reverseDropDownList = ref<boolean>(false)\n\nconst enableButtonClick = ref(true)\n\nconst loadingData = ref(false)\nconst errorState = ref(false)\n\nconst itemListRef = ref(ItemList)\nconst dropDownTextInput = ref(TextInput)\nconst dropDownButtonInput = ref(ListButton)\n\nconst query = ref('')\n\nwatch(\n () => query.value,\n (newV, oldV) => {\n if (newV !== oldV && typeof props.options === 'function') loadData(newV)\n }\n)\n\nconst blurInputIfNecessary = () => {\n if (enableTextFilter.value) dropDownTextInput?.value?.blurInput()\n}\n\nconst closeList = () => {\n clearTimeout(blockScrollCloseTimeout)\n blurInputIfNecessary()\n query.value = ''\n showDropDown.value = false\n enableButtonClick.value = true\n}\n\nconst placeholder = computed((): string => {\n if (errorState?.value === true) return 'Error loading data'\n if (loadingData?.value === true) return 'Loading...'\n return getLabel(props.selected)\n})\n\nconst updatedSelected = (newValue: any) => {\n if (newValue) emit('update:selected', newValue)\n closeList()\n}\n\nconst getLabel = (value?: string | number | object | null): string => {\n return getLabelString(\n value,\n props.customPlaceHolderFunction,\n props.objectLabelKeyName,\n props.enumKeyToLabelObjectArray\n )\n}\n\nfunction invalidArgumentError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid options argument provided to ListInputComponent`)\n}\n\nfunction invalidResponseError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid response provided to ListInputComponent, no total count key found`)\n}\n\nfunction invalidListValueKeyError() {\n loadingData.value = true\n errorState.value = true\n throw new Error('Invalid objectLabelKeyName for provided Dropdown list value.')\n}\n\nonMounted(() => {\n if (typeof props.options !== 'function' && !Array.isArray(props.options)) invalidArgumentError()\n else initializeOptions()\n})\n\nconst mouseHoveringOnList = ref(false)\n\nconst selectedIndex = ref(0)\nconst focusedIndex = ref(0)\nconst activeFocusedIndex = ref(0)\n\nwatch(\n () => focusedIndex.value,\n (newV, oldV) => {\n if (newV != oldV && !blockListUpdates.value) {\n activeFocusedIndex.value = newV\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => blockListUpdates.value,\n (newV) => {\n if (!newV) {\n activeFocusedIndex.value = focusedIndex.value\n }\n },\n { immediate: true }\n)\n\nconst filteredListItems = computed(() => {\n // if is function, return listOptions variable which is set by function\n if (typeof props.options === 'function' && !Array.isArray(props.options)) return listOptions.value\n const qry = query.value\n const lo = listOptions.value\n // else, is array, return filtered array\n return qry === '' ? lo : lo.filter((v) => getLabel(v).toLowerCase().includes(qry.toLowerCase()))\n})\n\nwatch(\n () => filteredListItems.value,\n (newV, oldV) => {\n if (JSON.stringify(newV) !== JSON.stringify(oldV)) focusSelectedOrFirstListItem()\n },\n { immediate: false, deep: true }\n)\n\nconst mouseOverList = () => {\n mouseHoveringOnList.value = true\n}\n\nconst focusSelectedOrFirstListItem = () => {\n const existingIndex = getSelectedValueIndex()\n selectedIndex.value = existingIndex /* may not be in the filtered list, allowed to be -1 */\n focusedIndex.value = existingIndex > -1 ? existingIndex : 0 /* default to first value */\n}\n\nfunction getSelectedValueIndex() {\n if (props.selected == null) return -1\n const labelsArray = filteredListItems.value.map((v) => getLabel(v))\n const matchingLabelsArray = labelsArray.filter((v) => v === getLabel(props.selected))\n if (matchingLabelsArray.length > 1) {\n const matchingIndexes = matchingLabelsArray.map((v) => labelsArray.indexOf(v))\n for (let i = 0; i < matchingIndexes.length; i++) {\n const currentMatchingOptionString = JSON.stringify(\n filteredListItems.value[matchingIndexes[i]]\n )\n const selectedOptionString = JSON.stringify(props.selected)\n if (currentMatchingOptionString === selectedOptionString) return matchingIndexes[i]\n }\n return -1\n }\n return labelsArray.indexOf(getLabel(props.selected))\n}\n\nconst openList = () => {\n if (loadingData.value) return\n if (!showDropDown.value) {\n blockListUpdates.value = false\n focusSelectedOrFirstListItem()\n scrollMobileTextInputToTop()\n showDropDown.value = true\n }\n mouseHoveringOnList.value = false\n enableButtonClick.value = false\n}\n\nconst scrollMobileTextInputToTop = () => {\n const mobileWindow: boolean = window?.innerWidth != null && window.innerWidth < 640\n const mobileScreen: boolean = screen?.width != null && screen.width < 640\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if ((mobileWindow || mobileScreen) && enableTextFilter.value) {\n preventScrollClose()\n if (props.scrollTextInputToTopOnMobile)\n textInput?.scrollIntoView({ block: 'start', inline: 'center' })\n }\n}\n\nconst enableScrollClose = ref<boolean>(true)\nlet blockScrollCloseTimeout = setTimeout(() => {}, 0)\n\nfunction preventScrollClose() {\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if (!textInput) return\n enableScrollClose.value = false\n let preventingScrollCloseInterval: NodeJS.Timeout | null = null\n\n const clearAll = () => {\n if (preventingScrollCloseInterval) clearInterval(preventingScrollCloseInterval)\n clearTimeout(blockScrollCloseTimeout)\n setTimeout(() => {\n enableScrollClose.value = true\n }, 100)\n }\n\n blockScrollCloseTimeout = setTimeout(clearAll, 5000)\n\n preventingScrollCloseInterval = setInterval(() => {\n if (\n showDropDown.value === false ||\n (textInput?.scrollTop === 0 && document.readyState === 'complete')\n )\n clearAll()\n }, 100)\n}\n\nconst focusInput = () => {\n if (enableTextFilter?.value == true) dropDownTextInput.value.focusInput()\n else if (dropDownButtonInput?.value?.focusInput) dropDownButtonInput?.value?.focusInput()\n}\n\nasync function initializeOptions(): Promise<void> {\n if (typeof props.options === 'function') {\n await loadData(query.value ? query.value : undefined, true)\n } else {\n validateListOptions(props.options as Array<string | number | object>)\n totalOptionsCount.value = listOptions.value.length\n }\n initializeSelected()\n}\n\ndefineExpose({ initializeOptions, getLabel })\n\nfunction initializeSelected() {\n const invalidSelection = getSelectedValueIndex() == -1\n const existingOptionNotSelected = invalidSelection && listOptions.value && !!listOptions.value[0]\n if (existingOptionNotSelected) updatedSelected(listOptions.value[0])\n}\n\nasync function loadData(stringFilter?: string, disableOnLoad: boolean = true) {\n loadingData.value = disableOnLoad\n const func = async () => (props.options as Function)(props.maxListOptions, stringFilter || '')\n const next = (response: DataSet<any>) => {\n if (!response || !('data' in response)) invalidArgumentError()\n validateListOptions(response.data)\n getOptionsCount(response?.data?.length ?? 0).then(() => {\n loadingData.value = false\n })\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nfunction validateListOptions(optns: Array<string | number | object>) {\n if (!Array.isArray(optns)) invalidArgumentError()\n if (optns.length > 0 && typeof optns[0] === 'object') validateObjectList(optns as Array<object>)\n listOptions.value = optns as Array<string | number | object>\n}\n\nfunction validateObjectList(values: Array<object>) {\n if (!props.objectLabelKeyName || props.objectLabelKeyName.length === 0) invalidListValueKeyError()\n const key: string = props.objectLabelKeyName as string\n for (let i = 0; i < values.length; i++) {\n if (typeof values[i] !== 'object' || !(key in values[i])) invalidListValueKeyError()\n }\n}\n\nasync function getOptionsCount(dataLength: number): Promise<void> {\n const func = async () => (props.options as Function)(1, '')\n const next = (response: DataSet<any>) => {\n if (!response || !('totalNum' in response)) invalidResponseError()\n totalOptionsCount.value = response.totalNum ?? dataLength\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nconst getCurrentlyFocusedListItemElement = (): HTMLElement | null => {\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n return listInput?.getElementsByTagName('li')[focusedIndex.value] ?? null\n}\n\nconst press = (event?: any) => {\n if (showDropDown.value == false) {\n openList()\n } else if (event) {\n keypress(event)\n }\n}\n\nconst keypress = (event: any) => {\n const key: string = event.key || event.code\n if (key === 'Tab' || key === 'Escape') closeList()\n if (key === 'ArrowDown') down(event)\n if (key === 'ArrowUp') up(event)\n if (key === 'Enter' || key === ' ') updateSelectedFromTextQuery()\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst updateSelectedFromTextQuery = () => {\n if (filteredListItems.value.length > 0) {\n blockListUpdates.value = true\n updatedSelected(filteredListItems.value[focusedIndex.value])\n } else {\n closeList()\n }\n}\n\nconst down = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value < filteredListItems.value.length - 1) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value++\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst up = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value > 0) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value--\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst unfocus = (event: any) => {\n if (showDropDown?.value === false) return\n if (query.value.length > 0) blockListUpdates.value = true\n const list: HTMLElement | null = itemListRef?.value?.listContainerRef as HTMLElement | null\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n const isListInput = event?.relatedTarget && listInput?.isEqualNode(event?.relatedTarget)\n const isList = event?.relatedTarget && list && list.contains(event?.relatedTarget)\n const isListItem = event?.relatedTarget && list && list.isEqualNode(event?.relatedTarget)\n if (isList || isListInput) return\n if (isListItem) {\n focusInput()\n return\n }\n closeList()\n}\n\nconst parentMethods = {\n openList: openList,\n unfocus: unfocus,\n press: press,\n mouseOverList: mouseOverList,\n getLabel: getLabel,\n updatedSelected: updatedSelected,\n focusInput: focusInput,\n closeList: closeList\n}\n</script>\n\n<style scoped>\n* {\n box-sizing: border-box;\n}\n</style>\n"],"names":["DocumentViewChangeListener","targetFunction","targetNode","event","eventType","getLabelString","value","customLabelGetFunction","objectLabelKeyName","enumKeyToLabelObjectArray","getEnumLabel","enumKeyArray","eT","AbortablePromise","signal","asyncFunc","then","response","func","reason","emit","__emit","props","__props","textInputRef","ref","focusInHandler","e","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","_createElementVNode","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","iRefs","useTemplateRef","focusedLi","focused","watch","scrollHighlightedListItemToTop","scrollHighlightedListItemIntoView","li","liParent","aboveTop","belowBottom","_Fragment","_renderList","listItem","index","_withModifiers","_hoisted_2","_toDisplayString","_createBlock","DefaultTick","_hoisted_3","dropDownButtonContainer","dropDownListUL","listContainerRef","offsetLeft","offsetTop","offsetBottom","listOffset","parentWidthPx","listElementOpenAndVisible","listItemsToDisplay","listHeightPx","reverseList","sufficientRoomAbove","insufficientRoomBelow","noScroll","reverse","parentXPx","parentYPx","preventSpaceScrollingList","refocusTextInput","list","target","getListULHeight","displayableListHeight","ulHt","maxListHeightPx","animationDuration","updatedListItemsToDisplay","newVal","unobserveTimeout","changeListener","openAndObserveChangeListener","buttonRePositionCallback","closeAndUnobserveChangeListener","newV","oldV","setOffsets","nextTick","closeListOnScrollIfNecessary","insideListOrOtherList","isScrollEvent","insideButton","insideList","otherList","setButtonOffset","setListOffset","brc","getButtonContainerElement","slrc","currentListOffset","currentOffsetLeft","getButtonElement","onMounted","onUnmounted","_renderSlot","_ctx","_createVNode","ListItem","buttonRef","clickHandler","enterHandler","spaceHandler","DefaultArrow","_resolveDynamicComponent","listOptions","abortablePromise","totalOptionsCount","enableTextFilter","showDropDown","blockListUpdates","reverseDropDownList","enableButtonClick","loadingData","errorState","itemListRef","ItemList","dropDownTextInput","TextInput","dropDownButtonInput","ListButton","query","blurInputIfNecessary","closeList","blockScrollCloseTimeout","placeholder","getLabel","updatedSelected","newValue","invalidArgumentError","invalidResponseError","invalidListValueKeyError","initializeOptions","mouseHoveringOnList","selectedIndex","focusedIndex","activeFocusedIndex","filteredListItems","qry","lo","v","focusSelectedOrFirstListItem","mouseOverList","existingIndex","getSelectedValueIndex","labelsArray","matchingLabelsArray","matchingIndexes","i","currentMatchingOptionString","selectedOptionString","openList","scrollMobileTextInputToTop","mobileWindow","mobileScreen","textInput","preventScrollClose","enableScrollClose","preventingScrollCloseInterval","clearAll","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","optns","validateObjectList","values","key","dataLength","getCurrentlyFocusedListItemElement","press","keypress","down","up","updateSelectedFromTextQuery","parentMethods","listInput","isListInput","isList","isListItem","$attrs"],"mappings":";2CAQO,MAAMA,EAAiE,CAC3D,YAAwB,CAAC,SAAU,OAAQ,SAAU,QAAS,WAAW,EACzE,OAA+B,CAC9C,WAAY,GACZ,UAAW,GACX,QAAS,EACX,EACQ,iBACA,iBAER,YAAYC,EAA0BC,EAAkB,SAAS,KAAM,CACrE,KAAK,WAAaA,EAClB,KAAK,iBAAqBC,GACxBF,EAAeE,CAAK,EACtB,KAAK,iBAAmB,IAAI,iBAAkB,IAAMF,GAAqC,CAAA,CAGpF,S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F,EAAAA,YAiCYmB,GAAA,SAhCN,cAAJ,IAAID,EACH,iBAAgBN,EAAY,MAC5B,kBAAmB4B,EAAiB,MACpC,oBAAqBJ,EAAmB,MACxC,aAAcG,EAAkB,MAChC,cAAeF,EAAa,MAC5B,sBAAqB3I,EAAe,gBACpC,6BAA4BA,EAAuB,wBACnD,iBAAgBuL,EACT,gBAAiBpE,EAAgB,gDAAhBA,EAAgB,MAAAhG,GACxC,sBAAqB6F,EAAiB,MACtC,sBAAmB5F,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAEiG,EAAmB,MAAGjG,GAC3C,kBAAmB+I,EAAiB,KAAA,qBAErC,IAiBc,CAjBd5D,EAAAA,YAiBcuB,GAAA,SAhBR,sBAAJ,IAAID,EACH,iBAAgB2D,EAChB,iBAAgBrE,EAAY,MAC5B,qBAAoBD,EAAgB,MACpC,cAAajH,EAAU,WACvB,yBAAwBoH,EAAmB,KAAA,qBAE5C,IAQE,CARFd,EAAAA,YAQEqB,GAAA,SAPI,oBAAJ,IAAID,EACH,qBAAoBT,EAAgB,MACpC,iBAAgBC,EAAY,MAC5B,YAAagB,EAAW,MACxB,sBAAqBb,EAAiB,MACtC,iBAAgBkE,EAChB,iBAAYnK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAE2G,EAAK,MAAG3G,EAAA"}
1
+ {"version":3,"file":"super-list.umd.cjs","sources":["../src/DropDownLibrary.ts","../src/ListInputComponents/ListTextInput.vue","../src/ListInputComponents/default-tick.vue","../src/ListInputComponents/ListItem.vue","../src/ListInputComponents/ItemList.vue","../src/ListInputComponents/default-arrow.vue","../src/ListInputComponents/ListButton.vue","../src/super-list.vue"],"sourcesContent":["export interface DocumentViewChangeListener {\n targetNode: HTMLElement\n observe(): void\n unobserve(): void\n pauseMutationObserver(): void\n unpauseMutationObserver(): void\n}\n\nexport class DocumentViewChangeListener implements DocumentViewChangeListener {\n private readonly eventsTypes: string[] = ['resize', 'load', 'scroll', 'wheel', 'touchmove']\n private readonly config: MutationObserverInit = {\n attributes: true,\n childList: true,\n subtree: true\n }\n private mutationObserver: MutationObserver\n private callbackFunction: EventListenerOrEventListenerObject\n\n constructor(targetFunction: Function, targetNode: any = document.body) {\n this.targetNode = targetNode\n this.callbackFunction = ((event: any) =>\n targetFunction(event)) as EventListenerOrEventListenerObject\n this.mutationObserver = new MutationObserver((() => targetFunction()) as MutationCallback)\n }\n\n public observe(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n for (const eventType of this.eventsTypes) this.addListener(eventType)\n this.addResizeListener()\n this.addTransitionEndListener()\n }\n\n pauseMutationObserver(): void {\n this.mutationObserver.disconnect()\n }\n\n unpauseMutationObserver(): void {\n this.mutationObserver.observe(this.targetNode, this.config)\n }\n\n public unobserve(): void {\n this.mutationObserver.disconnect()\n for (const eventType of this.eventsTypes) this.removeListener(eventType)\n this.removeResizeListener()\n this.removeTransitionEndListener()\n }\n\n private addListener(eventType: string): void {\n document.addEventListener(eventType, this.callbackFunction, true)\n }\n\n private removeListener(eventType: string): void {\n document.removeEventListener(eventType, this.callbackFunction, true)\n }\n\n private addTransitionEndListener(): void {\n this.targetNode.addEventListener('transitionend', this.callbackFunction)\n }\n\n private removeTransitionEndListener(): void {\n this.targetNode.removeEventListener('transitionend', this.callbackFunction)\n }\n\n private addResizeListener(): void {\n window.addEventListener('resize', this.callbackFunction)\n }\n\n private removeResizeListener(): void {\n window.removeEventListener('resize', this.callbackFunction)\n }\n}\n\nexport function getLabelString(\n value: string | number | object | null | undefined,\n customLabelGetFunction: Function | null | undefined,\n objectLabelKeyName: string | null,\n enumKeyToLabelObjectArray?: EnumType[]\n): string {\n if (customLabelGetFunction != null) return customLabelGetFunction(value)\n if (value == null) return ''\n if (typeof value === 'object') return value[objectLabelKeyName as keyof typeof value]\n if (enumKeyToLabelObjectArray) return getEnumLabel(value, enumKeyToLabelObjectArray)\n return '' + value\n}\n\nfunction getEnumLabel(value: string | number, enumKeyArray: EnumType[]): string {\n return (enumKeyArray.find((eT: EnumType): boolean => eT.type === value)?.label ?? '') as string\n}\n\nexport type ListRequest = (maxNumItems: number, stringFilter?: string) => Promise<DataSet<any>>\n\nexport type EnumType = { type: string; label: string }\n\nexport type DataSet<T> = { data: T[]; totalNum: number; modelName?: string }\n\nexport interface AbortablePromise {\n abortController: AbortController\n func: Function\n then: Function\n}\n\nexport class AbortablePromise implements AbortablePromise {\n constructor() {\n this.abortController = new AbortController()\n this.func = (): void => {}\n this.then = (): void => {}\n }\n\n async abortablePromise(signal: AbortSignal, asyncFunc: Function, then: Function): Promise<any> {\n const response = await asyncFunc()\n if (signal.aborted) return\n return then(response)\n }\n\n setFunc(func: Function): void {\n this.func = func\n }\n\n setThen(then: Function): void {\n this.then = then\n }\n\n execute(): Promise<any> {\n return this.abortablePromise(this.abortController.signal, this.func, this.then)\n }\n\n abort(reason?: string): void {\n this.abortController.abort(reason || 'Aborted By Controller.')\n this.abortController = new AbortController()\n }\n\n resetAndExecute(func: Function, then: Function): Promise<any> {\n this.abort('New Request From Controller.')\n this.setFunc(func)\n this.setThen(then)\n return this.execute()\n }\n}\n","<template>\n <form @submit.prevent style=\"display: contents !important;\">\n <!-- Forces virtual keyboard to display return/enter key when list exists in external form -->\n <input\n ref=\"textInputRef\"\n :tabindex=\"enableTextFilter ? 0 : -1\"\n @keydown.enter=\"parentMethods.press($event)\"\n @keydown.space=\"parentMethods.press()\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusin=\"focusInHandler($event)\"\n @focusout=\"focusOutHandler($event)\"\n @input=\"updateQuery($event as InputEvent)\"\n type=\"text\"\n aria-autocomplete=\"none\"\n autocomplete=\"off\"\n :placeholder=\"placeholder\"\n :size=\"textInputSize\"\n :class=\"[\n pointerEventsClass,\n textInputColourClass,\n { 'text-filter-disabled': !enableTextFilter }\n ]\"\n class=\"list-filter-text-input\"\n />\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type PropType, ref } from 'vue'\n\nconst emit = defineEmits({\n 'update:selected': null,\n 'update:query': null,\n 'update:press': null\n})\n\nconst props = defineProps({\n enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: true\n },\n placeholder: {\n type: String as PropType<string | undefined>,\n default: undefined\n },\n enableButtonClick: {\n type: Boolean as PropType<boolean | null>,\n default: true\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n }\n})\nconst textInputRef = ref(null)\n\nfunction focusInHandler(e: FocusEvent) {\n if ('sourceCapabilities' in e && e.sourceCapabilities == null) props.parentMethods.closeList()\n else props.parentMethods.openList()\n}\n\nfunction focusOutHandler(event: FocusEvent) {\n props.parentMethods.unfocus(event)\n}\n\nfunction updateQuery(event: any) {\n if (event?.target?.value != undefined) emit('update:query', event.target.value)\n}\n\nconst textInputSize = computed(() => {\n const refLength: number = textInputRef?.value ? (textInputRef.value as string).length : 0\n const placeHolderLength: number = props.placeholder?.length || 0\n return refLength > 0 ? refLength : placeHolderLength > 0 ? placeHolderLength : 5\n})\n\nconst pointerEventsClass = computed(() => {\n const enable: boolean = props.enableButtonClick === true && props.enableTextFilter === true\n return enable ? '' : 'click-through'\n})\n\nconst textInputColourClass = computed(() => {\n const dark: boolean = (props.showDropDown && !props.enableTextFilter) || !props.showDropDown\n return dark ? 'dark-placeholder-text' : 'light-placeholder-text'\n})\n\nfunction blurInput() {\n if (textInputRef?.value) {\n const input: HTMLInputElement = textInputRef.value\n input.blur()\n input.value = ''\n }\n}\n\nfunction focusInput() {\n if (textInputRef?.value) (textInputRef.value as HTMLInputElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, textInputRef })\n</script>\n\n<style scoped>\n.list-filter-text-input {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n text-align: center;\n padding: 0.125rem 2rem 0.125rem 0.5rem;\n width: 100%;\n height: 100%;\n margin: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: transparent;\n border: 0 none;\n pointer-events: auto;\n cursor: text;\n}\n\n.list-filter-text-input:focus,\n.list-filter-text-input:focus-visible,\n.list-filter-text-input:active {\n text-align: left;\n}\n\n.click-through {\n pointer-events: none;\n}\n\n.dark-placeholder-text::placeholder {\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n}\n\n.light-placeholder-text::placeholder {\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.text-filter-disabled {\n background-color: transparent;\n border: none;\n outline: none;\n box-shadow: none;\n filter: none;\n}\n\n@media (min-width: 640px) {\n .list-filter-text-input {\n font-size: 0.875rem;\n line-height: 1.5rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 -16 16 17\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <li\n v-for=\"(listItem, index) in filteredListItems\"\n :key=\"index\"\n ref=\"items\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n tabindex=\"-1\"\n @mousedown.left=\"parentMethods.updatedSelected(listItem)\"\n :class=\"[\n { 'list-option-selected': selectedIndex === index },\n {\n 'list-option-active':\n filteredListItems.length === 1 || (focusedIndex === index && !mouseHoveringOnList)\n },\n 'list-option'\n ]\"\n >\n <span class=\"list-item-span\">{{ parentMethods.getLabel(listItem) }}</span>\n <default-tick v-if=\"selectedIndex === index\" class=\"list-item-icon\" aria-hidden=\"true\" />\n </li>\n <li\n v-if=\"filteredListItems.length === 0\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">No Items To Display.</span>\n </li>\n <li\n v-if=\"totalOptionsCount && totalOptionsCount > (filteredListItems?.length || 0)\"\n @keyup.enter=\"parentMethods.press($event)\"\n @keyup.space=\"parentMethods.press($event)\"\n @keyup.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @mousedown.left=\"parentMethods.closeList($event)\"\n tabindex=\"-1\"\n class=\"list-option-message\"\n >\n <span class=\"list-item-span\">\n +{{ totalOptionsCount - filteredListItems?.length || 0 }} More Items...</span\n >\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, type ShallowRef, useTemplateRef, watch } from 'vue'\nimport DefaultTick from './default-tick.vue'\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n listElementOpenAndVisible: {\n type: Boolean,\n default: false\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n default: false\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n }\n})\ntype HTMLLIElementOrArray = HTMLLIElement | HTMLLIElement[] | null\nconst iRefs: Readonly<ShallowRef<HTMLLIElementOrArray>> = useTemplateRef('items')\n\nconst focusedLi = computed((): HTMLElement | null => {\n if (!iRefs?.value) return null\n const refs: Array<HTMLLIElement | null> = Array.isArray(iRefs.value) ? iRefs.value : [iRefs.value]\n const focused = refs[props.focusedIndex]\n if (!focused) return null\n const isObject: boolean = typeof focused == 'object'\n const hasScrollIntoView: boolean = isObject && 'scrollIntoView' in focused\n const hasScrollFunc: boolean = hasScrollIntoView && typeof focused['scrollIntoView'] == 'function'\n return hasScrollFunc ? focused : null\n})\n\nwatch(\n () => props.showDropDown,\n () => scrollHighlightedListItemToTop()\n)\nwatch(\n () => props.listElementOpenAndVisible,\n () => scrollHighlightedListItemIntoView()\n)\nwatch(\n () => focusedLi.value,\n () => scrollHighlightedListItemIntoView()\n)\n\nfunction scrollHighlightedListItemToTop(): void {\n if (!props.showDropDown || !focusedLi?.value?.parentElement?.parentElement) return\n focusedLi.value.parentElement.parentElement.scrollTop = focusedLi.value.offsetTop\n}\n\nfunction scrollHighlightedListItemIntoView(): void {\n const li = focusedLi.value\n const liParent = li?.parentElement?.parentElement\n if (!props.showDropDown || !li || !liParent) return\n const aboveTop = li.offsetTop - liParent.scrollTop < 0\n const belowBottom = li.offsetTop + li.offsetHeight - liParent.scrollTop > liParent.clientHeight\n if (aboveTop) liParent.scrollTop = li.offsetTop\n if (belowBottom) liParent.scrollTop = li.offsetTop + li.clientHeight - liParent.clientHeight\n}\n</script>\n\n<style scoped>\n.list-option {\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n transition-property: font-weight, background-color, color, text-shadow;\n transition-duration: 500ms;\n transition-timing-function: ease;\n font-weight: 400;\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n}\n\n.list-option:focus-visible,\n.list-option > span:focus-visible {\n outline: none;\n}\n\n.list-option-selected {\n font-weight: 600;\n}\n\n.list-option-message {\n text-shadow: 1px 1px 3px var(--superlist-background-colour, white);\n text-transform: capitalize;\n display: inline-flex;\n width: 100%;\n position: relative;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: transparent;\n color: var(--superlist-disabled-text-colour, rgb(120, 125, 130));\n}\n\n.list-option-active:hover,\n.list-option-active,\n.list-option-selected:hover,\n.list-option:hover {\n font-weight: 600;\n background-color: var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n color: var(--superlist-background-colour, white);\n text-shadow: 1px 1px 3px var(--superlist-theme-colour, rgb(77, 168, 11, 0.8));\n transition-duration: 0s !important;\n}\n\n.list-item-icon {\n display: flex;\n height: 1rem;\n width: 1rem;\n position: absolute;\n right: 0.7rem;\n margin-top: -0.1rem;\n align-self: center;\n}\n\n.list-item-span {\n padding: 0.5rem 1.75rem 0.5rem 0.75rem;\n width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n","<template>\n <div ref=\"dropDownButtonContainer\" class=\"super-list-button-container\">\n <slot></slot>\n </div>\n <div\n id=\"super-list-select-list\"\n ref=\"listContainerRef\"\n @mouseenter=\"parentMethods.mouseOverList()\"\n tabindex=\"-1\"\n :class=\"[\n 'select-list',\n reverseList ? 'list-reverse' : 'list-normal',\n { 'select-list-open': showDropDown },\n { 'no-scroll': noScroll && listElementOpenAndVisible },\n { 'select-list-fixed': listElementOpenAndVisible },\n { 'select-list-scrollable': !noScroll }\n ]\"\n @keydown.space=\"preventSpaceScrollingList($event)\"\n @mouseup.left=\"refocusTextInput($event)\"\n >\n <ul tabindex=\"-1\" ref=\"dropDownListUL\" class=\"list-content\">\n <list-item\n :filteredListItems=\"listItemsToDisplay\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"focusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :listElementOpenAndVisible=\"listElementOpenAndVisible\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :total-options-count=\"totalOptionsCount\"\n />\n </ul>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n type ComputedRef,\n nextTick,\n onMounted,\n onUnmounted,\n type PropType,\n ref,\n watch\n} from 'vue'\nimport ListItem from '../ListInputComponents/ListItem.vue'\nimport { DocumentViewChangeListener } from '../DropDownLibrary'\n\nconst emit = defineEmits(['reverseDropDownList'])\n\nconst props = defineProps({\n mouseHoveringOnList: {\n type: Boolean,\n default: false\n },\n filteredListItems: {\n type: Array,\n default: () => []\n },\n focusedIndex: {\n type: Number,\n default: null\n },\n selectedIndex: {\n type: Number,\n default: null\n },\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n maxListHeightPX: {\n type: Number,\n required: true\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n required: true\n },\n blockListChange: {\n type: Boolean,\n required: true\n },\n totalOptionsCount: {\n type: Number,\n default: 0\n },\n enableScrollClose: {\n type: Boolean,\n default: true\n }\n})\n\nconst dropDownButtonContainer = ref<HTMLElement | null>(null)\nconst dropDownListUL = ref<HTMLElement | null>(null)\nconst listContainerRef = ref<HTMLElement | null>(null)\nconst offsetLeft = ref<number>(0)\nconst offsetTop = ref<number>(0)\nconst offsetBottom = ref<number>(0)\nconst listOffset = ref<number>(0)\nconst parentWidthPx = ref<string>('0px')\nconst listElementOpenAndVisible = ref<boolean>(false)\nconst listItemsToDisplay = ref<any[]>([])\nconst listHeightPx = ref<number>(0)\n\nconst reverseList = computed((): boolean => {\n if (!listElementOpenAndVisible.value || window?.innerHeight == null) return false\n return sufficientRoomAbove() && insufficientRoomBelow()\n})\n\nconst noScroll = computed((): boolean => {\n return props.maxListHeightPX >= listHeightPx.value\n})\n\nwatch(\n () => reverseList.value,\n (reverse: boolean) => emit('reverseDropDownList', reverse),\n { immediate: true }\n)\n\nconst parentXPx = computed((): string => offsetLeft.value + 'px')\nconst parentYPx = computed((): string => listOffset.value + 'px')\n\ndefineExpose({ listContainerRef })\n\nconst preventSpaceScrollingList = (event: any) => {\n if (event?.key && event.key === ' ') event.preventDefault()\n}\n\nconst refocusTextInput = (event: MouseEvent) => {\n const list = listContainerRef?.value as HTMLElement | null\n const target = event.target as HTMLElement | null\n if (!(list && target && list.contains(target)) || list.isEqualNode(target))\n props.parentMethods.focusInput()\n}\n\nfunction getListULHeight(): number {\n return dropDownListUL?.value ? (dropDownListUL?.value as HTMLElement).clientHeight : 0\n}\n\nfunction displayableListHeight(): number {\n if (!listElementOpenAndVisible.value || getListULHeight() === 0) return props.maxListHeightPX\n const ulHt: number = getListULHeight() === 0 ? props.maxListHeightPX : +getListULHeight()\n return props.maxListHeightPX && props.maxListHeightPX > ulHt ? ulHt : props.maxListHeightPX\n}\n\nfunction sufficientRoomAbove(): boolean {\n return offsetTop.value > displayableListHeight()\n}\n\nfunction insufficientRoomBelow(): boolean {\n return offsetBottom.value < displayableListHeight()\n}\n\nconst maxListHeightPx = computed((): string => (props.maxListHeightPX || 0) + 'px')\n\nconst animationDuration = computed((): string => (props.listAnimationDurationMs || 0) + 'ms')\n\nconst updatedListItemsToDisplay = computed((): any[] => {\n return !props.blockListChange ? props.filteredListItems : listItemsToDisplay.value\n})\n\nwatch(\n () => updatedListItemsToDisplay,\n (newVal: ComputedRef<any[]>) => {\n if (newVal) listItemsToDisplay.value = newVal.value\n },\n { immediate: false, deep: true }\n)\n\nlet unobserveTimeout = setTimeout(() => {}, 0)\n\nlet changeListener: DocumentViewChangeListener | null = null\n\nfunction openAndObserveChangeListener() {\n listHeightPx.value = getListULHeight()\n clearTimeout(unobserveTimeout)\n if (changeListener) changeListener.observe()\n listElementOpenAndVisible.value = true\n buttonRePositionCallback(undefined)\n}\n\nfunction closeAndUnobserveChangeListener() {\n clearTimeout(unobserveTimeout)\n unobserveTimeout = setTimeout(() => {\n if (!props.showDropDown) {\n listElementOpenAndVisible.value = false\n if (changeListener) changeListener.unobserve()\n }\n }, props.listAnimationDurationMs + 50)\n}\n\nwatch(\n () => props.showDropDown,\n (newV, oldV) => {\n if (newV !== oldV) {\n setOffsets()\n if (newV) openAndObserveChangeListener()\n else closeAndUnobserveChangeListener()\n }\n },\n { immediate: true }\n)\n\nfunction buttonRePositionCallback(e: any): void {\n setOffsets()\n nextTick(() => setOffsets())\n closeListOnScrollIfNecessary(e)\n}\n\nfunction closeListOnScrollIfNecessary(e: any) {\n if (!props.enableScrollClose || !props.showDropDown) return\n const notInitialized: boolean = typeof listContainerRef?.value?.contains !== 'function'\n if (notInitialized || e?.target?.nodeType == null || insideListOrOtherList(e)) return\n const isScrollEvent: boolean = ['scroll', 'wheel', 'touchmove'].includes(e?.type)\n if (props.showDropDown && isScrollEvent) props.parentMethods.closeList()\n}\n\nfunction insideListOrOtherList(e: any): boolean {\n const insideButton: boolean = !!dropDownButtonContainer.value?.contains(e?.target as Node)\n const insideList: boolean = !!listContainerRef.value?.contains(e.target as Node)\n const otherList: boolean = [e?.srcElement?.id, e?.target?.id].includes('super-list-select-list')\n return insideButton || insideList || otherList\n}\n\nfunction setOffsets(): void {\n setButtonOffset()\n setListOffset()\n}\n\nfunction setButtonOffset(): void {\n if (dropDownButtonContainer?.value == null) return\n const brc: DOMRect = (dropDownButtonContainer.value as HTMLElement).getBoundingClientRect()\n offsetTop.value = brc.top\n offsetBottom.value = window.innerHeight - brc.bottom\n parentWidthPx.value = brc.width + 'px'\n}\n\nfunction setListOffset(): void {\n /**\n * List container must be used when calculating position and not \"dropDownListUL\".\n * Position must be calculated as window viewport might not match list container viewport.\n **/\n if (dropDownButtonContainer?.value == null || listContainerRef?.value == null) return\n const brc: DOMRect = getButtonContainerElement().getBoundingClientRect()\n const slrc: DOMRect = (listContainerRef.value as HTMLElement).getBoundingClientRect()\n const currentListOffset: number = listOffset.value\n const currentOffsetLeft: number = offsetLeft.value\n if (reverseList.value) listOffset.value = currentListOffset - (brc.top - slrc.bottom)\n else listOffset.value = currentListOffset - (slrc.top - brc.bottom)\n offsetLeft.value = currentOffsetLeft - (slrc.left - brc.left)\n}\n\nfunction getButtonElement(): HTMLButtonElement {\n return (dropDownButtonContainer?.value as HTMLElement).getElementsByTagName('button')[0]\n}\n\nfunction getButtonContainerElement(): HTMLDivElement {\n return dropDownButtonContainer?.value as HTMLDivElement\n}\n\nonMounted(() => {\n changeListener = new DocumentViewChangeListener(buttonRePositionCallback, getButtonElement())\n setTimeout(() => buttonRePositionCallback(undefined), 250)\n})\n\nonUnmounted(() => {\n changeListener?.unobserve()\n})\n</script>\n\n<style scoped>\n.list-normal {\n top: var(--parent-y);\n}\n\n.list-reverse {\n bottom: var(--parent-y);\n}\n\n.select-list {\n --parent-width: v-bind(parentWidthPx);\n --parent-x: v-bind(parentXPx);\n --parent-y: v-bind(parentYPx);\n --duration: v-bind(animationDuration);\n --border-radius: var(--superlist-list-border-radius, 0);\n border-radius: var(--border-radius);\n width: var(--parent-width);\n min-width: var(--parent-width);\n left: var(--parent-x);\n display: block;\n transition-property: max-height, opacity, visibility, box-shadow;\n transition-duration: var(--duration, 300ms);\n transition-timing-function: cubic-bezier(0.1, 0.9, 0.35, 0.98);\n position: absolute;\n backdrop-filter: blur(3px);\n -webkit-backdrop-filter: blur(3px);\n background-color: rgb(255, 255, 255, 0.7);\n align-items: baseline;\n opacity: 0.25;\n z-index: 999;\n visibility: collapse;\n overflow: auto;\n max-height: 0;\n border: none !important; /* can't transition border */\n}\n\n.select-list:focus-visible,\n.select-list > ul:focus-visible,\n.super-list-button-container:focus-visible {\n outline: none;\n}\n\n.super-list-button-container {\n height: 100%;\n width: 100%;\n}\n\n.select-list.select-list-open {\n z-index: 999999;\n --max-height: v-bind(maxListHeightPx);\n max-height: var(--max-height, 0);\n}\n\n.select-list.no-scroll {\n overflow: hidden;\n}\n\n.select-list-fixed {\n position: fixed;\n opacity: 1;\n visibility: visible;\n}\n\n.list-content {\n --duration: v-bind(animationDuration);\n overflow: visible;\n margin: 0;\n padding: 0;\n border-style: none;\n color: var(--superlist-text-colour, rgb(55, 60, 65));\n list-style: none;\n max-width: 100%;\n}\n\n.select-list.select-list-scrollable {\n border-radius: var(--border-radius);\n}\n\n.select-list:not(.select-list-fixed) {\n transition: none;\n box-shadow: none !important;\n}\n\n@media (min-width: 640px) {\n .select-list.select-list-scrollable {\n border-radius: var(--border-radius) 0 0 var(--border-radius);\n }\n .list-content {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n</style>\n","<template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n viewBox=\"0 0 12 6\"\n >\n <path\n shape-rendering=\"geometricPrecision\"\n 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\"\n />\n </svg>\n</template>\n","<template>\n <button\n ref=\"buttonRef\"\n :tabindex=\"enableTextFilter ? -1 : 0\"\n @keydown.enter=\"enterHandler($event)\"\n @keydown.space=\"spaceHandler($event)\"\n @keydown.esc=\"parentMethods.press($event)\"\n @keydown.up=\"parentMethods.press($event)\"\n @keydown.down=\"parentMethods.press($event)\"\n @focusout=\"parentMethods.unfocus($event)\"\n @click=\"clickHandler()\"\n type=\"button\"\n :class=\"[{ 'click-through': props.enableTextFilter || props.showDropDown }]\"\n class=\"list-button\"\n >\n <slot></slot>\n <span class=\"list-button-icon-div\" :class=\"{ 'bigger-gap': props.showDropDown }\">\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': !props.showDropDown }]\"\n >\n <default-arrow aria-hidden=\"true\" />\n </span>\n <span\n v-if=\"!customIcon\"\n class=\"list-button-icon\"\n :class=\"[{ 'rotate-180': props.showDropDown }]\"\n >\n <default-arrow v-if=\"customIcon == null\" aria-hidden=\"true\" />\n </span>\n <span v-if=\"customIcon\" class=\"list-button-icon custom-icon\">\n <component aria-hidden=\"true\" :is=\"customIcon as object\" />\n </span>\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { type PropType, ref } from 'vue'\nimport DefaultArrow from './default-arrow.vue'\n\n// prettier-ignore\nconst props = defineProps({ // eslint-disable-line\n parentMethods: {\n type: Object,\n required: true\n },\n showDropDown: {\n type: Boolean,\n required: true\n },\n enableTextFilter: {\n type: Boolean,\n required: true\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n reverseDropDownList: {\n type: Boolean,\n required: true\n }\n})\n\nconst buttonRef = ref(null)\n\nfunction clickHandler() {\n if (props.enableTextFilter) return\n else props.parentMethods.openList()\n}\n\nfunction enterHandler(event: KeyboardEvent) {\n if (props.enableTextFilter) {\n props.parentMethods.focusInput()\n event.stopPropagation()\n event.preventDefault()\n } else {\n props.parentMethods.press(event)\n }\n}\n\nfunction spaceHandler(event: KeyboardEvent) {\n if (!props.enableTextFilter) props.parentMethods.press(event)\n}\n\nfunction blurInput() {\n if (buttonRef?.value) {\n const button: HTMLButtonElement = buttonRef.value\n button.blur()\n }\n}\n\nfunction focusInput() {\n if (buttonRef?.value) (buttonRef.value as HTMLButtonElement).focus()\n}\n\ndefineExpose({ blurInput, focusInput, buttonRef })\n</script>\n\n<style scoped>\n.list-button-icon {\n display: flex;\n transition-timing-function: ease-in-out;\n transition-duration: 200ms;\n transition-property: transform;\n width: 0.6rem;\n transform: rotate(0deg);\n color: var(--superlist-text-colour, rgb(17, 24, 39));\n justify-content: center;\n max-height: 18%;\n}\n\n.list-button-icon.custom-icon {\n max-height: 100%;\n width: 1.25rem;\n}\n\n.list-button-icon.rotate-180 {\n transform: rotate(180deg);\n}\n\n.list-button {\n position: relative;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n height: 100%;\n background-color: var(--superlist-background-colour, white);\n align-items: center;\n pointer-events: auto;\n cursor: pointer;\n}\n\n.list-button:focus,\n.list-button:focus-visible,\n.list-button:active {\n text-align: left;\n}\n\n.list-button-icon-div {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-right: 0.75rem;\n max-height: 100%;\n height: 100%;\n gap: max(0.15rem, calc(6.25% + 0.075rem));\n transition: gap 200ms;\n}\n\n.list-button-icon-div.bigger-gap {\n gap: calc(40% - 0.25rem);\n}\n\n.click-through {\n pointer-events: none;\n}\n</style>\n","<template>\n <div style=\"position: relative\" :class=\"$attrs.class\">\n <item-list\n ref=\"itemListRef\"\n :show-drop-down=\"showDropDown\"\n :filteredListItems=\"filteredListItems\"\n :mouseHoveringOnList=\"mouseHoveringOnList\"\n :focusedIndex=\"activeFocusedIndex\"\n :selectedIndex=\"selectedIndex\"\n :max-list-height-p-x=\"maxListHeightPX\"\n :list-animation-duration-ms=\"listAnimationDurationMs\"\n :parent-methods=\"parentMethods\"\n v-model:blockListChange=\"blockListUpdates\"\n :total-options-count=\"totalOptionsCount\"\n @reverseDropDownList=\"reverseDropDownList = $event\"\n :enableScrollClose=\"enableScrollClose\"\n >\n <list-button\n ref=\"dropDownButtonInput\"\n :parent-methods=\"parentMethods\"\n :show-drop-down=\"showDropDown\"\n :enable-text-filter=\"enableTextFilter\"\n :custom-icon=\"customIcon\"\n :reverse-drop-down-list=\"reverseDropDownList\"\n >\n <text-input\n ref=\"dropDownTextInput\"\n :enable-text-filter=\"enableTextFilter\"\n :show-drop-down=\"showDropDown\"\n :placeholder=\"placeholder\"\n :enable-button-click=\"enableButtonClick\"\n :parent-methods=\"parentMethods\"\n @update:query=\"query = $event\"\n />\n </list-button>\n </item-list>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, type PropType, ref, watch } from 'vue'\nimport {\n getLabelString,\n AbortablePromise,\n type DataSet,\n type EnumType,\n type ListRequest\n} from './DropDownLibrary'\nimport TextInput from './ListInputComponents/ListTextInput.vue'\nimport ItemList from './ListInputComponents/ItemList.vue'\nimport ListButton from './ListInputComponents/ListButton.vue'\n\nconst emit = defineEmits({ 'update:selected': null })\nconst props = defineProps({\n selected: {\n type: [String, Number, Object, null, undefined] as PropType<\n string | number | object | null | undefined\n >\n },\n options: {\n type: [Function, Array<string | number | object>] as PropType<\n ListRequest | Array<string | number | object>\n >,\n required: true\n },\n maxListOptions: {\n type: Number as PropType<number>,\n default: 50\n },\n maxListHeightPX: {\n type: Number as PropType<number>,\n default: 200\n },\n tooltip: {\n type: String,\n required: false\n },\n objectLabelKeyName: {\n type: String as PropType<string | null>,\n default: ''\n },\n enumKeyToLabelObjectArray: {\n type: Object as PropType<EnumType[]>,\n default: undefined\n },\n listAnimationDurationMs: {\n type: Number as PropType<number>,\n default: 300\n },\n customIcon: {\n default: null,\n type: [Object, Function] as PropType<object | Function | null>\n },\n forceTextFilterVisibilityTo: {\n type: Boolean as PropType<boolean>,\n default: undefined\n },\n customPlaceHolderFunction: {\n type: Function as PropType<Function | null>,\n default: null\n },\n colour: {\n type: String as PropType<string>,\n default: 'black'\n },\n scrollTextInputToTopOnMobile: {\n type: Boolean as PropType<boolean>,\n default: true\n }\n})\n\nconst listOptions = ref([] as Array<string | number | object>)\n\nconst abortablePromise = new AbortablePromise()\n\nconst totalOptionsCount = ref(0)\n\nconst enableTextFilter = computed((): boolean => {\n if (props.forceTextFilterVisibilityTo != undefined) return props.forceTextFilterVisibilityTo\n return totalOptionsCount.value > props.maxListOptions\n})\n\nconst showDropDown = ref<boolean>(false)\n\nconst blockListUpdates = ref<boolean>(false)\n\nconst reverseDropDownList = ref<boolean>(false)\n\nconst enableButtonClick = ref(true)\n\nconst loadingData = ref(false)\nconst errorState = ref(false)\n\nconst itemListRef = ref(ItemList)\nconst dropDownTextInput = ref(TextInput)\nconst dropDownButtonInput = ref(ListButton)\n\nconst query = ref('')\n\nwatch(\n () => query.value,\n (newV, oldV) => {\n if (newV !== oldV && typeof props.options === 'function') loadData(newV)\n }\n)\n\nconst blurInputIfNecessary = () => {\n if (enableTextFilter.value) dropDownTextInput?.value?.blurInput()\n}\n\nconst closeList = () => {\n clearTimeout(blockScrollCloseTimeout)\n blurInputIfNecessary()\n query.value = ''\n showDropDown.value = false\n enableButtonClick.value = true\n}\n\nconst placeholder = computed((): string => {\n if (errorState?.value === true) return 'Error loading data'\n if (loadingData?.value === true) return 'Loading...'\n return getLabel(props.selected)\n})\n\nconst updatedSelected = (newValue: any) => {\n if (newValue) emit('update:selected', newValue)\n closeList()\n}\n\nconst getLabel = (value?: string | number | object | null): string => {\n return getLabelString(\n value,\n props.customPlaceHolderFunction,\n props.objectLabelKeyName,\n props.enumKeyToLabelObjectArray\n )\n}\n\nfunction invalidArgumentError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid options argument provided to ListInputComponent`)\n}\n\nfunction invalidResponseError() {\n loadingData.value = true\n errorState.value = true\n throw new Error(`Invalid response provided to ListInputComponent, no total count key found`)\n}\n\nfunction invalidListValueKeyError() {\n loadingData.value = true\n errorState.value = true\n throw new Error('Invalid objectLabelKeyName for provided Dropdown list value.')\n}\n\nonMounted(() => {\n if (typeof props.options !== 'function' && !Array.isArray(props.options)) invalidArgumentError()\n else initializeOptions()\n})\n\nconst mouseHoveringOnList = ref(false)\n\nconst selectedIndex = ref(0)\nconst focusedIndex = ref(0)\nconst activeFocusedIndex = ref(0)\n\nwatch(\n () => focusedIndex.value,\n (newV, oldV) => {\n if (newV != oldV && !blockListUpdates.value) {\n activeFocusedIndex.value = newV\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => blockListUpdates.value,\n (newV) => {\n if (!newV) {\n activeFocusedIndex.value = focusedIndex.value\n }\n },\n { immediate: true }\n)\n\nconst filteredListItems = computed(() => {\n // if is function, return listOptions variable which is set by function\n if (typeof props.options === 'function' && !Array.isArray(props.options)) return listOptions.value\n const qry = query.value\n const lo = listOptions.value\n // else, is array, return filtered array\n return qry === '' ? lo : lo.filter((v) => getLabel(v).toLowerCase().includes(qry.toLowerCase()))\n})\n\nwatch(\n () => filteredListItems.value,\n (newV, oldV) => {\n if (JSON.stringify(newV) !== JSON.stringify(oldV)) focusSelectedOrFirstListItem()\n },\n { immediate: false, deep: true }\n)\n\nconst mouseOverList = () => {\n mouseHoveringOnList.value = true\n}\n\nconst focusSelectedOrFirstListItem = () => {\n const existingIndex = getSelectedValueIndex()\n selectedIndex.value = existingIndex /* may not be in the filtered list, allowed to be -1 */\n focusedIndex.value = existingIndex > -1 ? existingIndex : 0 /* default to first value */\n}\n\nfunction getSelectedValueIndex() {\n if (props.selected == null) return -1\n const labelsArray = filteredListItems.value.map((v) => getLabel(v))\n const matchingLabelsArray = labelsArray.filter((v) => v === getLabel(props.selected))\n if (matchingLabelsArray.length > 1) {\n const matchingIndexes = matchingLabelsArray.map((v) => labelsArray.indexOf(v))\n for (let i = 0; i < matchingIndexes.length; i++) {\n const currentMatchingOptionString = JSON.stringify(\n filteredListItems.value[matchingIndexes[i]]\n )\n const selectedOptionString = JSON.stringify(props.selected)\n if (currentMatchingOptionString === selectedOptionString) return matchingIndexes[i]\n }\n return -1\n }\n return labelsArray.indexOf(getLabel(props.selected))\n}\n\nconst openList = () => {\n if (loadingData.value) return\n if (!showDropDown.value) {\n blockListUpdates.value = false\n focusSelectedOrFirstListItem()\n scrollMobileTextInputToTop()\n showDropDown.value = true\n }\n mouseHoveringOnList.value = false\n enableButtonClick.value = false\n}\n\nconst scrollMobileTextInputToTop = () => {\n const mobileWindow: boolean = window?.innerWidth != null && window.innerWidth < 640\n const mobileScreen: boolean = screen?.width != null && screen.width < 640\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if ((mobileWindow || mobileScreen) && enableTextFilter.value) {\n preventScrollClose()\n if (props.scrollTextInputToTopOnMobile)\n textInput?.scrollIntoView({ block: 'start', inline: 'center' })\n }\n}\n\nconst enableScrollClose = ref<boolean>(true)\nlet blockScrollCloseTimeout = setTimeout(() => {}, 0)\n\nfunction preventScrollClose() {\n const textInput: HTMLElement | null = dropDownTextInput.value.textInputRef as HTMLElement | null\n if (!textInput) return\n enableScrollClose.value = false\n let preventingScrollCloseInterval: NodeJS.Timeout | null = null\n\n const clearAll = () => {\n if (preventingScrollCloseInterval) clearInterval(preventingScrollCloseInterval)\n clearTimeout(blockScrollCloseTimeout)\n setTimeout(() => {\n enableScrollClose.value = true\n }, 100)\n }\n\n blockScrollCloseTimeout = setTimeout(clearAll, 5000)\n\n preventingScrollCloseInterval = setInterval(() => {\n if (\n showDropDown.value === false ||\n (textInput?.scrollTop === 0 && document.readyState === 'complete')\n )\n clearAll()\n }, 100)\n}\n\nconst focusInput = () => {\n if (enableTextFilter?.value == true) dropDownTextInput.value.focusInput()\n else if (dropDownButtonInput?.value?.focusInput) dropDownButtonInput?.value?.focusInput()\n}\n\nasync function initializeOptions(): Promise<void> {\n if (typeof props.options === 'function') {\n await loadData(query.value ? query.value : undefined, true)\n } else {\n validateListOptions(props.options as Array<string | number | object>)\n totalOptionsCount.value = listOptions.value.length\n }\n initializeSelected()\n}\n\ndefineExpose({ initializeOptions, getLabel })\n\nfunction initializeSelected() {\n const invalidSelection = getSelectedValueIndex() == -1\n const existingOptionNotSelected = invalidSelection && listOptions.value && !!listOptions.value[0]\n if (existingOptionNotSelected) updatedSelected(listOptions.value[0])\n}\n\nasync function loadData(stringFilter?: string, disableOnLoad: boolean = true) {\n loadingData.value = disableOnLoad\n const func = async () => (props.options as Function)(props.maxListOptions, stringFilter || '')\n const next = (response: DataSet<any>) => {\n if (!response || !('data' in response)) invalidArgumentError()\n validateListOptions(response.data)\n getOptionsCount(response?.data?.length ?? 0).then(() => {\n loadingData.value = false\n })\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nfunction validateListOptions(optns: Array<string | number | object>) {\n if (!Array.isArray(optns)) invalidArgumentError()\n if (optns.length > 0 && typeof optns[0] === 'object') validateObjectList(optns as Array<object>)\n listOptions.value = optns as Array<string | number | object>\n}\n\nfunction validateObjectList(values: Array<object>) {\n if (!props.objectLabelKeyName || props.objectLabelKeyName.length === 0) invalidListValueKeyError()\n const key: string = props.objectLabelKeyName as string\n for (let i = 0; i < values.length; i++) {\n if (typeof values[i] !== 'object' || !(key in values[i])) invalidListValueKeyError()\n }\n}\n\nasync function getOptionsCount(dataLength: number): Promise<void> {\n const func = async () => (props.options as Function)(1, '')\n const next = (response: DataSet<any>) => {\n if (!response || !('totalNum' in response)) invalidResponseError()\n totalOptionsCount.value = response.totalNum ?? dataLength\n }\n await abortablePromise.resetAndExecute(func, next)\n}\n\nconst getCurrentlyFocusedListItemElement = (): HTMLElement | null => {\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n return listInput?.getElementsByTagName('li')[focusedIndex.value] ?? null\n}\n\nconst press = (event?: any) => {\n if (showDropDown.value == false) {\n openList()\n } else if (event) {\n keypress(event)\n }\n}\n\nconst keypress = (event: any) => {\n const key: string = event.key || event.code\n if (key === 'Tab' || key === 'Escape') closeList()\n if (key === 'ArrowDown') down(event)\n if (key === 'ArrowUp') up(event)\n if (key === 'Enter' || key === ' ') updateSelectedFromTextQuery()\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst updateSelectedFromTextQuery = () => {\n if (filteredListItems.value.length > 0) {\n blockListUpdates.value = true\n updatedSelected(filteredListItems.value[focusedIndex.value])\n } else {\n closeList()\n }\n}\n\nconst down = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value < filteredListItems.value.length - 1) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value++\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst up = (event: any) => {\n enableButtonClick.value = true\n if (focusedIndex.value > 0) {\n event.preventDefault()\n mouseHoveringOnList.value = false\n focusedIndex.value--\n getCurrentlyFocusedListItemElement()?.focus()\n }\n}\n\nconst unfocus = (event: any) => {\n if (showDropDown?.value === false) return\n if (query.value.length > 0) blockListUpdates.value = true\n const list: HTMLElement | null = itemListRef?.value?.listContainerRef as HTMLElement | null\n const listInput: HTMLElement | null = dropDownTextInput?.value?.textInputRef as HTMLElement | null\n const isListInput = event?.relatedTarget && listInput?.isEqualNode(event?.relatedTarget)\n const isList = event?.relatedTarget && list && list.contains(event?.relatedTarget)\n const isListItem = event?.relatedTarget && list && list.isEqualNode(event?.relatedTarget)\n if (isList || isListInput) return\n if (isListItem) {\n focusInput()\n return\n }\n closeList()\n}\n\nconst parentMethods = {\n openList: openList,\n unfocus: unfocus,\n press: press,\n mouseOverList: mouseOverList,\n getLabel: getLabel,\n updatedSelected: updatedSelected,\n focusInput: focusInput,\n closeList: closeList\n}\n</script>\n\n<style scoped>\n* {\n box-sizing: border-box;\n}\n</style>\n"],"names":["DocumentViewChangeListener","targetFunction","targetNode","event","eventType","getLabelString","value","customLabelGetFunction","objectLabelKeyName","enumKeyToLabelObjectArray","getEnumLabel","enumKeyArray","eT","AbortablePromise","signal","asyncFunc","then","response","func","reason","emit","__emit","props","__props","textInputRef","ref","focusInHandler","e","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","_createElementVNode","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","iRefs","useTemplateRef","focusedLi","focused","watch","scrollHighlightedListItemToTop","scrollHighlightedListItemIntoView","li","liParent","aboveTop","belowBottom","_Fragment","_renderList","listItem","index","_withModifiers","_hoisted_2","_toDisplayString","_createBlock","DefaultTick","_hoisted_3","dropDownButtonContainer","dropDownListUL","listContainerRef","offsetLeft","offsetTop","offsetBottom","listOffset","parentWidthPx","listElementOpenAndVisible","listItemsToDisplay","listHeightPx","reverseList","sufficientRoomAbove","insufficientRoomBelow","noScroll","reverse","parentXPx","parentYPx","preventSpaceScrollingList","refocusTextInput","list","target","getListULHeight","displayableListHeight","ulHt","maxListHeightPx","animationDuration","updatedListItemsToDisplay","newVal","unobserveTimeout","changeListener","openAndObserveChangeListener","buttonRePositionCallback","closeAndUnobserveChangeListener","newV","oldV","setOffsets","nextTick","closeListOnScrollIfNecessary","insideListOrOtherList","isScrollEvent","insideButton","insideList","otherList","setButtonOffset","setListOffset","brc","getButtonContainerElement","slrc","currentListOffset","currentOffsetLeft","getButtonElement","onMounted","onUnmounted","_renderSlot","_ctx","_createVNode","ListItem","buttonRef","clickHandler","enterHandler","spaceHandler","DefaultArrow","_resolveDynamicComponent","listOptions","abortablePromise","totalOptionsCount","enableTextFilter","showDropDown","blockListUpdates","reverseDropDownList","enableButtonClick","loadingData","errorState","itemListRef","ItemList","dropDownTextInput","TextInput","dropDownButtonInput","ListButton","query","blurInputIfNecessary","closeList","blockScrollCloseTimeout","placeholder","getLabel","updatedSelected","newValue","invalidArgumentError","invalidResponseError","invalidListValueKeyError","initializeOptions","mouseHoveringOnList","selectedIndex","focusedIndex","activeFocusedIndex","filteredListItems","qry","lo","v","focusSelectedOrFirstListItem","mouseOverList","existingIndex","getSelectedValueIndex","labelsArray","matchingLabelsArray","matchingIndexes","i","currentMatchingOptionString","selectedOptionString","openList","scrollMobileTextInputToTop","mobileWindow","mobileScreen","textInput","preventScrollClose","enableScrollClose","preventingScrollCloseInterval","clearAll","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","optns","validateObjectList","values","key","dataLength","getCurrentlyFocusedListItemElement","press","keypress","down","up","updateSelectedFromTextQuery","parentMethods","listInput","isListInput","isList","isListItem","$attrs"],"mappings":";2CAQO,MAAMA,EAAiE,CAC3D,YAAwB,CAAC,SAAU,OAAQ,SAAU,QAAS,WAAW,EACzE,OAA+B,CAC9C,WAAY,GACZ,UAAW,GACX,QAAS,EACX,EACQ,iBACA,iBAER,YAAYC,EAA0BC,EAAkB,SAAS,KAAM,CACrE,KAAK,WAAaA,EAClB,KAAK,iBAAqBC,GACxBF,EAAeE,CAAK,EACtB,KAAK,iBAAmB,IAAI,iBAAkB,IAAMF,GAAqC,CAAA,CAGpF,SAAgB,CACrB,KAAK,iBAAiB,QAAQ,KAAK,WAAY,KAAK,MAAM,EAC1D,UAAWG,KAAa,KAAK,YAAa,KAAK,YAAYA,CAAS,EACpE,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,CAAA,CAGhC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AAkB,MAChC,cAAeF,EAAa,MAC5B,sBAAqB3I,EAAe,gBACpC,6BAA4BA,EAAuB,wBACnD,iBAAgBuL,EACT,gBAAiBpE,EAAgB,gDAAhBA,EAAgB,MAAAhG,GACxC,sBAAqB6F,EAAiB,MACtC,sBAAmB5F,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAEiG,EAAmB,MAAGjG,GAC3C,kBAAmB+I,EAAiB,KAAA,qBAErC,IAiBc,CAjBd5D,EAAAA,YAiBcuB,GAAA,SAhBR,sBAAJ,IAAID,EACH,iBAAgB2D,EAChB,iBAAgBrE,EAAY,MAC5B,qBAAoBD,EAAgB,MACpC,cAAajH,EAAU,WACvB,yBAAwBoH,EAAmB,KAAA,qBAE5C,IAQE,CARFd,EAAAA,YAQEqB,GAAA,SAPI,oBAAJ,IAAID,EACH,qBAAoBT,EAAgB,MACpC,iBAAgBC,EAAY,MAC5B,YAAagB,EAAW,MACxB,sBAAqBb,EAAiB,MACtC,iBAAgBkE,EAChB,iBAAYnK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAE2G,EAAK,MAAG3G,EAAA"}
package/package.json CHANGED
@@ -1,19 +1,8 @@
1
1
  {
2
2
  "name": "@jblehm/super-list",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "type": "module",
5
- "files": [
6
- "dist/ListInputComponents",
7
- "dist/DropDownLibrary.d.ts",
8
- "dist/index.css",
9
- "dist/index.d.ts",
10
- "dist/main.d.ts",
11
- "dist/super-list.js",
12
- "dist/super-list.js.map",
13
- "dist/super-list.umd.cjs",
14
- "dist/super-list.umd.cjs.map",
15
- "dist/super-list.vue.d.ts"
16
- ],
5
+ "files": [ "dist" ],
17
6
  "main": "./dist/super-list.umd.cjs",
18
7
  "module": "./dist/super-list.js",
19
8
  "exports": {
@@ -21,9 +10,11 @@
21
10
  "import": "./dist/super-list.js",
22
11
  "require": "./dist/super-list.umd.js"
23
12
  },
24
- "./dist/style.css": "./dist/style.css"
13
+ "./dist/index.css": "./dist/index.css",
14
+ "./dist/style.css": "./dist/index.css"
25
15
  },
26
16
  "types": "./dist/index.d.ts",
17
+ "style": "./dist/index.css",
27
18
  "scripts": {
28
19
  "dev": "vite",
29
20
  "build": "vite build && vue-tsc --emitDeclarationOnly",