@jblehm/super-list 1.0.25 → 1.0.26

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.25
1
+ # superlist V1.0.26
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)
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .list-filter-text-input[data-v-5cd54d87]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem!important;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-5cd54d87]:focus,.list-filter-text-input[data-v-5cd54d87]:focus-visible,.list-filter-text-input[data-v-5cd54d87]:active{text-align:left}.click-through[data-v-5cd54d87]{pointer-events:none}.dark-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-5cd54d87]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-5cd54d87]{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-fdca8800]{top:var(--parent-y)}.list-reverse[data-v-fdca8800]{bottom:var(--parent-y)}.select-list[data-v-fdca8800]{--parent-width: var(--2a14c112);--parent-x: var(--042fa144);--parent-y: var(--042fa505);--duration: var(--e090ee34);--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;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-fdca8800]:focus-visible,.select-list>ul[data-v-fdca8800]:focus-visible,.super-list-button-container[data-v-fdca8800]:focus-visible{outline:none}.super-list-button-container[data-v-fdca8800]{height:100%;width:100%}.select-list.select-list-open[data-v-fdca8800]{z-index:999999;--max-height: var(--6e261aff);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-fdca8800]{overflow:hidden}.select-list-fixed[data-v-fdca8800]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-fdca8800]{--duration: var(--e090ee34);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-fdca8800]{border-radius:var(--border-radius)}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-fdca8800]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-fdca8800]{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-e1f079fa]{box-sizing:border-box}
1
+ .list-filter-text-input[data-v-5cd54d87]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem!important;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-5cd54d87]:focus,.list-filter-text-input[data-v-5cd54d87]:focus-visible,.list-filter-text-input[data-v-5cd54d87]:active{text-align:left}.click-through[data-v-5cd54d87]{pointer-events:none}.dark-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-5cd54d87]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-5cd54d87]{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-36d8d106]{top:var(--parent-y)}.list-reverse[data-v-36d8d106]{bottom:var(--parent-y)}.select-list[data-v-36d8d106]{--parent-width: var(--583c4ee4);--parent-x: var(--19dae816);--parent-y: var(--19daebd7);--duration: var(--20dfddb8);--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-36d8d106]:focus-visible,.select-list>ul[data-v-36d8d106]:focus-visible,.super-list-button-container[data-v-36d8d106]:focus-visible{outline:none}.super-list-button-container[data-v-36d8d106]{height:100%;width:100%}.select-list.select-list-open[data-v-36d8d106]{z-index:999999;--max-height: var(--9ebd075e);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-36d8d106]{overflow:hidden}.select-list-fixed[data-v-36d8d106]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-36d8d106]{--duration: var(--20dfddb8);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-36d8d106]{border-radius:var(--border-radius)}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-36d8d106]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-36d8d106]{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-e1f079fa]{box-sizing:border-box}
@@ -364,11 +364,11 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
364
364
  emits: ["reverseDropDownList"],
365
365
  setup(e, { expose: i, emit: a }) {
366
366
  Fe((r) => ({
367
- "2a14c112": k.value,
368
- "042fa144": N.value,
369
- "042fa505": se.value,
370
- e090ee34: q.value,
371
- "6e261aff": Y.value
367
+ "583c4ee4": k.value,
368
+ "19dae816": N.value,
369
+ "19daebd7": se.value,
370
+ "20dfddb8": q.value,
371
+ "9ebd075e": Y.value
372
372
  }));
373
373
  const v = a, o = e, d = f(null), w = f(null), t = f(null), s = f(0), c = f(0), l = f(0), g = f(0), k = f("0px"), D = f(!1), y = f([]), b = f(0), h = O(() => !D.value || window?.innerHeight == null ? !1 : X() && le()), V = O(() => o.maxListHeightPX >= b.value);
374
374
  F(
@@ -503,7 +503,7 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
503
503
  ], 34)
504
504
  ], 64));
505
505
  }
506
- }), ge = /* @__PURE__ */ K(Ye, [["__scopeId", "data-v-fdca8800"]]), Ge = {}, _e = {
506
+ }), ge = /* @__PURE__ */ K(Ye, [["__scopeId", "data-v-36d8d106"]]), Ge = {}, _e = {
507
507
  xmlns: "http://www.w3.org/2000/svg",
508
508
  fill: "currentColor",
509
509
  "aria-hidden": "true",
@@ -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 <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()\"\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</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() {\n 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 !important;\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 enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: 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 (!props.showDropDown || 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 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 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;\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@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 :enable-text-filter=\"enableTextFilter\"\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})\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 = listOptions.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(listOptions.value[matchingIndexes[i]])\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 textInput?.scrollIntoView({ block: 'start' })\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) {\n clearTimeout(blockScrollCloseTimeout)\n enableScrollClose.value = false\n blockScrollCloseTimeout = setTimeout(() => {\n enableScrollClose.value = true\n }, 300)\n }\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\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\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\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","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","_createElementVNode","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","e","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","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","dataLength","getCurrentlyFocusedListItemElement","press","keypress","key","down","up","updateSelectedFromTextQuery","unfocus","listInput","isListInput","isList","isListItem","optns","validateObjectList","values","parentMethods","$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,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ACvB,0BAAwBoH,EAAmB;AAAA,UAAA;wBAE5C,MAQE;AAAA,cARFd,EAQEqB,IAAA;AAAA,yBAPI;AAAA,gBAAJ,KAAID;AAAA,gBACH,sBAAoBT,EAAgB;AAAA,gBACpC,kBAAgBC,EAAY;AAAA,gBAC5B,aAAagB,GAAW;AAAA,gBACxB,uBAAqBb,EAAiB;AAAA,gBACtC,kBAAgBqE;AAAA,gBAChB,kBAAYxK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAD,MAAE6G,EAAK,QAAG7G;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 <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()\"\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</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() {\n 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 !important;\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 enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: 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 (!props.showDropDown || 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 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 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@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 :enable-text-filter=\"enableTextFilter\"\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})\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 = listOptions.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(listOptions.value[matchingIndexes[i]])\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 textInput?.scrollIntoView({ block: 'start' })\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) {\n clearTimeout(blockScrollCloseTimeout)\n enableScrollClose.value = false\n blockScrollCloseTimeout = setTimeout(() => {\n enableScrollClose.value = true\n }, 300)\n }\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\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\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\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","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","_createElementVNode","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","e","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","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","dataLength","getCurrentlyFocusedListItemElement","press","keypress","key","down","up","updateSelectedFromTextQuery","unfocus","listInput","isListInput","isList","isListItem","optns","validateObjectList","values","parentMethods","$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,IA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AA,YAChB,kBAAgBxE,EAAY;AAAA,YAC5B,sBAAoBD,EAAgB;AAAA,YACpC,eAAajH,EAAU;AAAA,YACvB,0BAAwBoH,EAAmB;AAAA,UAAA;wBAE5C,MAQE;AAAA,cARFd,EAQEqB,IAAA;AAAA,yBAPI;AAAA,gBAAJ,KAAID;AAAA,gBACH,sBAAoBT,EAAgB;AAAA,gBACpC,kBAAgBC,EAAY;AAAA,gBAC5B,aAAagB,GAAW;AAAA,gBACxB,uBAAqBb,EAAiB;AAAA,gBACtC,kBAAgBqE;AAAA,gBAChB,kBAAYxK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAD,MAAE6G,EAAK,QAAG7G;AAAA,cAAA;;;;;;;;;;"}
@@ -1,3 +1,3 @@
1
- (function(e,A){typeof exports=="object"&&typeof module<"u"?module.exports=A(require("vue")):typeof define=="function"&&define.amd?define(["vue"],A):(e=typeof globalThis<"u"?globalThis:e||self,e.SuperList=A(e.Vue))})(this,function(e){"use strict";var A=document.createElement("style");A.textContent=`.list-filter-text-input[data-v-5cd54d87]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem!important;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-5cd54d87]:focus,.list-filter-text-input[data-v-5cd54d87]:focus-visible,.list-filter-text-input[data-v-5cd54d87]:active{text-align:left}.click-through[data-v-5cd54d87]{pointer-events:none}.dark-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-5cd54d87]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-5cd54d87]{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-fdca8800]{top:var(--parent-y)}.list-reverse[data-v-fdca8800]{bottom:var(--parent-y)}.select-list[data-v-fdca8800]{--parent-width: var(--2a14c112);--parent-x: var(--042fa144);--parent-y: var(--042fa505);--duration: var(--e090ee34);--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;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-fdca8800]:focus-visible,.select-list>ul[data-v-fdca8800]:focus-visible,.super-list-button-container[data-v-fdca8800]:focus-visible{outline:none}.super-list-button-container[data-v-fdca8800]{height:100%;width:100%}.select-list.select-list-open[data-v-fdca8800]{z-index:999999;--max-height: var(--6e261aff);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-fdca8800]{overflow:hidden}.select-list-fixed[data-v-fdca8800]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-fdca8800]{--duration: var(--e090ee34);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-fdca8800]{border-radius:var(--border-radius)}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-fdca8800]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-fdca8800]{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-e1f079fa]{box-sizing:border-box}
2
- /*$vite$:1*/`,document.head.appendChild(A);class le{eventsTypes=["resize","load","scroll","wheel","touchmove"];config={attributes:!0,childList:!0,subtree:!0};mutationObserver;callbackFunction;constructor(r,d=document.body){this.targetNode=d,this.callbackFunction=m=>r(m),this.mutationObserver=new MutationObserver(()=>r())}observe(){this.mutationObserver.observe(this.targetNode,this.config);for(const r of this.eventsTypes)this.addListener(r);this.addResizeListener(),this.addTransitionEndListener()}pauseMutationObserver(){this.mutationObserver.disconnect()}unpauseMutationObserver(){this.mutationObserver.observe(this.targetNode,this.config)}unobserve(){this.mutationObserver.disconnect();for(const r of this.eventsTypes)this.removeListener(r);this.removeResizeListener(),this.removeTransitionEndListener()}addListener(r){document.addEventListener(r,this.callbackFunction,!0)}removeListener(r){document.removeEventListener(r,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 ae(t,r,d,m){return r!=null?r(t):t==null?"":typeof t=="object"?t[d]:m?ue(t,m):""+t}function ue(t,r){return r.find(d=>d.type===t)?.label??""}class de{constructor(){this.abortController=new AbortController,this.func=()=>{},this.then=()=>{}}async abortablePromise(r,d,m){const i=await d();if(!r.aborted)return m(i)}setFunc(r){this.func=r}setThen(r){this.then=r}execute(){return this.abortablePromise(this.abortController.signal,this.func,this.then)}abort(r){this.abortController.abort(r||"Aborted By Controller."),this.abortController=new AbortController}resetAndExecute(r,d){return this.abort("New Request From Controller."),this.setFunc(r),this.setThen(d),this.execute()}}const ce=["tabindex","placeholder","size"],fe=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:r,emit:d}){const m=d,i=t,c=e.ref(null);function v(){i.parentMethods.openList()}function n(w){i.parentMethods.unfocus(w)}function s(w){w?.target?.value!=null&&m("update:query",w.target.value)}const f=e.computed(()=>{const w=c?.value?c.value.length:0,h=i.placeholder?.length||0;return w>0?w:h>0?h:5}),l=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(c?.value){const w=c.value;w.blur(),w.value=""}}function L(){c?.value&&c.value.focus()}return r({blurInput:T,focusInput:L,textInputRef:c}),(w,h)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"textInputRef",ref:c,tabindex:t.enableTextFilter?0:-1,onKeydown:[h[0]||(h[0]=e.withKeys(b=>t.parentMethods.press(b),["enter"])),h[1]||(h[1]=e.withKeys(b=>t.parentMethods.press(),["space"])),h[2]||(h[2]=e.withKeys(b=>t.parentMethods.press(b),["esc"])),h[3]||(h[3]=e.withKeys(b=>t.parentMethods.press(b),["up"])),h[4]||(h[4]=e.withKeys(b=>t.parentMethods.press(b),["down"]))],onFocusin:h[5]||(h[5]=b=>v()),onFocusout:h[6]||(h[6]=b=>n(b)),onInput:h[7]||(h[7]=b=>s(b)),type:"text","aria-autocomplete":"none",autocomplete:"off",placeholder:t.placeholder,size:f.value,class:e.normalizeClass([[l.value,g.value,{"text-filter-disabled":!t.enableTextFilter}],"list-filter-text-input"])},null,42,ce))}}),E=(t,r)=>{const d=t.__vccOpts||t;for(const[m,i]of r)d[m]=i;return d},te=E(fe,[["__scopeId","data-v-5cd54d87"]]),pe={},me={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 -16 16 17"};function he(t,r){return e.openBlock(),e.createElementBlock("svg",me,r[0]||(r[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=E(pe,[["render",he]]),ge=["onMousedown"],we={class:"list-item-span"},ve={class:"list-item-span"},ye=E(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 r=t,d=e.useTemplateRef("items"),m=e.computed(()=>{if(!d?.value)return null;const n=(Array.isArray(d.value)?d.value:[d.value])[r.focusedIndex];return n&&typeof n=="object"&&"scrollIntoView"in n&&typeof n.scrollIntoView=="function"?n:null});e.watch(()=>r.showDropDown,()=>i()),e.watch(()=>r.listElementOpenAndVisible,()=>c()),e.watch(()=>m.value,()=>c());function i(){!r.showDropDown||!m?.value?.parentElement?.parentElement||(m.value.parentElement.parentElement.scrollTop=m.value.offsetTop)}function c(){const v=m.value,n=v?.parentElement?.parentElement;if(!r.showDropDown||!v||!n)return;const s=v.offsetTop-n.scrollTop<0,f=v.offsetTop+v.offsetHeight-n.scrollTop>n.clientHeight;s&&(n.scrollTop=v.offsetTop),f&&(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,(s,f)=>(e.openBlock(),e.createElementBlock("li",{key:f,ref_for:!0,ref:"items",onKeyup:[n[0]||(n[0]=e.withKeys(l=>t.parentMethods.press(l),["enter"])),n[1]||(n[1]=e.withKeys(l=>t.parentMethods.press(l),["space"])),n[2]||(n[2]=e.withKeys(l=>t.parentMethods.press(l),["esc"]))],onKeydown:[n[3]||(n[3]=e.withKeys(l=>t.parentMethods.press(l),["up"])),n[4]||(n[4]=e.withKeys(l=>t.parentMethods.press(l),["down"]))],onFocusout:n[5]||(n[5]=l=>t.parentMethods.unfocus(l)),tabindex:"-1",onMousedown:e.withModifiers(l=>t.parentMethods.updatedSelected(s),["left"]),class:e.normalizeClass([{"list-option-selected":t.selectedIndex===f},{"list-option-active":t.filteredListItems.length===1||t.focusedIndex===f&&!t.mouseHoveringOnList},"list-option"])},[e.createElementVNode("span",we,e.toDisplayString(t.parentMethods.getLabel(s)),1),t.selectedIndex===f?(e.openBlock(),e.createBlock(be,{key:0,class:"list-item-icon","aria-hidden":"true"})):e.createCommentVNode("",!0)],42,ge))),128)),t.filteredListItems.length===0?(e.openBlock(),e.createElementBlock("li",{key:0,onKeyup:[n[6]||(n[6]=e.withKeys(s=>t.parentMethods.press(s),["enter"])),n[7]||(n[7]=e.withKeys(s=>t.parentMethods.press(s),["space"])),n[8]||(n[8]=e.withKeys(s=>t.parentMethods.press(s),["esc"]))],onKeydown:[n[9]||(n[9]=e.withKeys(s=>t.parentMethods.press(s),["up"])),n[10]||(n[10]=e.withKeys(s=>t.parentMethods.press(s),["down"]))],onFocusout:n[11]||(n[11]=s=>t.parentMethods.unfocus(s)),onMousedown:n[12]||(n[12]=e.withModifiers(s=>t.parentMethods.closeList(s),["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(s=>t.parentMethods.press(s),["enter"])),n[14]||(n[14]=e.withKeys(s=>t.parentMethods.press(s),["space"])),n[15]||(n[15]=e.withKeys(s=>t.parentMethods.press(s),["esc"]))],onKeydown:[n[16]||(n[16]=e.withKeys(s=>t.parentMethods.press(s),["up"])),n[17]||(n[17]=e.withKeys(s=>t.parentMethods.press(s),["down"]))],onFocusout:n[18]||(n[18]=s=>t.parentMethods.unfocus(s)),onMousedown:n[19]||(n[19]=e.withModifiers(s=>t.parentMethods.closeList(s),["left"])),tabindex:"-1",class:"list-option-message"},[e.createElementVNode("span",ve," +"+e.toDisplayString(t.totalOptionsCount-t.filteredListItems?.length||0)+" More Items...",1)],32)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-e4eeb2f7"]]),ne=E(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},enableTextFilter:{type:Boolean,required:!0}},emits:["reverseDropDownList"],setup(t,{expose:r,emit:d}){e.useCssVars(a=>({"2a14c112":T.value,"042fa144":O.value,"042fa505":W.value,e090ee34:S.value,"6e261aff":q.value}));const m=d,i=t,c=e.ref(null),v=e.ref(null),n=e.ref(null),s=e.ref(0),f=e.ref(0),l=e.ref(0),g=e.ref(0),T=e.ref("0px"),L=e.ref(!1),w=e.ref([]),h=e.ref(0),b=e.computed(()=>!L.value||window?.innerHeight==null?!1:V()&&Z()),K=e.computed(()=>i.maxListHeightPX>=h.value);e.watch(()=>b.value,a=>m("reverseDropDownList",a),{immediate:!0});const O=e.computed(()=>s.value+"px"),W=e.computed(()=>g.value+"px");r({listContainerRef:n});const N=a=>{a?.key&&a.key===" "&&a.preventDefault()},Q=a=>{const y=n?.value,x=a.target;(!(y&&x&&y.contains(x))||y.isEqualNode(x))&&i.parentMethods.focusInput()};function B(){return v?.value?(v?.value).clientHeight:0}function D(){if(!i.showDropDown||B()===0)return i.maxListHeightPX;const a=B()===0?i.maxListHeightPX:+B();return i.maxListHeightPX&&i.maxListHeightPX>a?a:i.maxListHeightPX}function V(){return f.value>D()}function Z(){return l.value<D()}const q=e.computed(()=>(i.maxListHeightPX||0)+"px"),S=e.computed(()=>(i.listAnimationDurationMs||0)+"ms"),j=e.computed(()=>i.blockListChange?w.value:i.filteredListItems);e.watch(()=>j,a=>{a&&(w.value=a.value)},{immediate:!1,deep:!0});let k=setTimeout(()=>{},0),C=null;function F(){h.value=B(),clearTimeout(k),C&&C.observe(),L.value=!0,H(void 0)}function Y(){clearTimeout(k),k=setTimeout(()=>{i.showDropDown||(L.value=!1,C&&C.unobserve())},i.listAnimationDurationMs+50)}e.watch(()=>i.showDropDown,(a,y)=>{a!==y&&(a?F():Y())},{immediate:!0});function H(a){U(),e.nextTick(()=>U()),$(a)}function $(a){if(typeof n?.value?.contains!="function"||a?.target?.nodeType==null||X(a))return;const x=["scroll","wheel","touchmove"].includes(a?.type);i.showDropDown&&x&&i.parentMethods.closeList()}function X(a){const y=!!c.value?.contains(a?.target),x=!!n.value?.contains(a.target),P=[a?.srcElement?.id,a?.target?.id].includes("super-list-select-list");return y||x||P}function U(){z(),R()}function z(){if(c?.value==null)return;const a=c.value.getBoundingClientRect();f.value=a.top,l.value=window.innerHeight-a.bottom,T.value=a.width+"px"}function R(){if(c?.value==null||n?.value==null)return;const a=J().getBoundingClientRect(),y=n.value.getBoundingClientRect(),x=g.value,P=s.value;b.value?g.value=x-(a.top-y.bottom):g.value=x-(y.top-a.bottom),s.value=P-(y.left-a.left)}function G(){return(c?.value).getElementsByTagName("button")[0]}function J(){return c?.value}return e.onMounted(()=>{C=new le(H,G()),setTimeout(()=>H(void 0),250)}),e.onUnmounted(()=>{C?.unobserve()}),(a,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropDownButtonContainer",ref:c,class:"super-list-button-container"},[e.renderSlot(a.$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",b.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=>N(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(ye,{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-fdca8800"]]),xe={},Le={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 0 12 6"};function Ie(t,r){return e.openBlock(),e.createElementBlock("svg",Le,r[0]||(r[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=E(xe,[["render",Ie]]),ke=["tabindex"],Te={key:2,class:"list-button-icon custom-icon"},ie=E(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:r}){const d=t,m=e.ref(null);function i(){d.enableTextFilter||d.parentMethods.openList()}function c(f){d.enableTextFilter?(d.parentMethods.focusInput(),f.stopPropagation(),f.preventDefault()):d.parentMethods.press(f)}function v(f){d.enableTextFilter||d.parentMethods.press(f)}function n(){m?.value&&m.value.blur()}function s(){m?.value&&m.value.focus()}return r({blurInput:n,focusInput:s,buttonRef:m}),(f,l)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"buttonRef",ref:m,tabindex:t.enableTextFilter?-1:0,onKeydown:[l[0]||(l[0]=e.withKeys(g=>c(g),["enter"])),l[1]||(l[1]=e.withKeys(g=>v(g),["space"])),l[2]||(l[2]=e.withKeys(g=>t.parentMethods.press(g),["esc"])),l[3]||(l[3]=e.withKeys(g=>t.parentMethods.press(g),["up"])),l[4]||(l[4]=e.withKeys(g=>t.parentMethods.press(g),["down"]))],onFocusout:l[5]||(l[5]=g=>t.parentMethods.unfocus(g)),onClick:l[6]||(l[6]=g=>i()),type:"button",class:e.normalizeClass([[{"click-through":d.enableTextFilter||d.showDropDown}],"list-button"])},[e.renderSlot(f.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:e.normalizeClass(["list-button-icon-div",{"bigger-gap":d.showDropDown}])},[t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["list-button-icon",[{"rotate-180":!d.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":d.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",Te,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{"aria-hidden":"true"}))])):e.createCommentVNode("",!0)],2)],42,ke))}}),[["__scopeId","data-v-01ef8e37"]]);return E(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"}},emits:{"update:selected":null},setup(t,{expose:r,emit:d}){const m=d,i=t,c=e.ref([]),v=new de,n=e.ref(0),s=e.computed(()=>i.forceTextFilterVisibilityTo!=null?i.forceTextFilterVisibilityTo:n.value>i.maxListOptions),f=e.ref(!1),l=e.ref(!1),g=e.ref(!1),T=e.ref(!0),L=e.ref(!1),w=e.ref(!1),h=e.ref(ne),b=e.ref(te),K=e.ref(ie),O=e.ref("");e.watch(()=>O.value,(o,u)=>{o!==u&&typeof i.options=="function"&&x(o)});const W=()=>{s.value&&b?.value?.blurInput()},N=()=>{clearTimeout(R),W(),O.value="",f.value=!1,T.value=!0},Q=e.computed(()=>w?.value===!0?"Error loading data":L?.value===!0?"Loading...":D(i.selected)),B=o=>{o&&m("update:selected",o),N()},D=o=>ae(o,i.customPlaceHolderFunction,i.objectLabelKeyName,i.enumKeyToLabelObjectArray);function V(){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)?V():a()});const S=e.ref(!1),j=e.ref(0),k=e.ref(0),C=e.ref(0);e.watch(()=>k.value,(o,u)=>{o!=u&&!l.value&&(C.value=o)},{immediate:!0}),e.watch(()=>l.value,o=>{o||(C.value=k.value)},{immediate:!0});const F=e.computed(()=>{if(typeof i.options=="function"&&!Array.isArray(i.options))return c.value;const o=O.value,u=c.value;return o===""?u:u.filter(p=>D(p).toLowerCase().includes(o.toLowerCase()))});e.watch(()=>F.value,(o,u)=>{JSON.stringify(o)!==JSON.stringify(u)&&H()},{immediate:!1,deep:!0});const Y=()=>{S.value=!0},H=()=>{const o=$();j.value=o,k.value=o>-1?o:0};function $(){if(i.selected==null)return-1;const o=c.value.map(p=>D(p)),u=o.filter(p=>p===D(i.selected));if(u.length>1){const p=u.map(I=>o.indexOf(I));for(let I=0;I<p.length;I++){const M=JSON.stringify(c.value[p[I]]),ee=JSON.stringify(i.selected);if(M===ee)return p[I]}return-1}return o.indexOf(D(i.selected))}const X=()=>{L.value||(f.value||(l.value=!1,H(),U(),f.value=!0),S.value=!1,T.value=!1)},U=()=>{const o=window?.innerWidth!=null&&window.innerWidth<640,u=screen?.width!=null&&screen.width<640,p=b.value.textInputRef;(o||u)&&s.value&&(G(),p?.scrollIntoView({block:"start"}))},z=e.ref(!0);let R=setTimeout(()=>{},0);function G(){b.value.textInputRef&&(clearTimeout(R),z.value=!1,R=setTimeout(()=>{z.value=!0},300))}const J=()=>{s?.value==!0?b.value.focusInput():K?.value?.focusInput&&K?.value?.focusInput()};async function a(){typeof i.options=="function"?await x(O.value?O.value:void 0,!0):(re(i.options),n.value=c.value.length),y()}r({initializeOptions:a,getLabel:D});function y(){$()==-1&&c.value&&!!c.value[0]&&B(c.value[0])}async function x(o,u=!0){L.value=u;const p=async()=>i.options(i.maxListOptions,o||""),I=M=>{(!M||!("data"in M))&&V(),re(M.data),P(M?.data?.length??0).then(()=>{L.value=!1})};await v.resetAndExecute(p,I)}async function P(o){const u=async()=>i.options(1,""),p=I=>{(!I||!("totalNum"in I))&&Z(),n.value=I.totalNum??o};await v.resetAndExecute(u,p)}const se=()=>b?.value?.textInputRef?.getElementsByTagName("li")[k.value]??null,De=o=>{f.value==!1?X():o&&Ce(o)},Ce=o=>{const u=o.key||o.code;(u==="Tab"||u==="Escape")&&N(),u==="ArrowDown"&&Be(o),u==="ArrowUp"&&Me(o),(u==="Enter"||u===" ")&&Oe(),o.preventDefault(),o.stopPropagation()},Oe=()=>{F.value.length>0?(l.value=!0,B(F.value[k.value])):N()},Be=o=>{T.value=!0,k.value<F.value.length-1&&(o.preventDefault(),S.value=!1,k.value++,se()?.focus())},Me=o=>{T.value=!0,k.value>0&&(o.preventDefault(),S.value=!1,k.value--,se()?.focus())},Ee=o=>{if(f?.value===!1)return;O.value.length>0&&(l.value=!0);const u=h?.value?.listContainerRef,p=b?.value?.textInputRef,I=o?.relatedTarget&&p?.isEqualNode(o?.relatedTarget),M=o?.relatedTarget&&u&&u.contains(o?.relatedTarget),ee=o?.relatedTarget&&u&&u.isEqualNode(o?.relatedTarget);if(!(M||I)){if(ee){J();return}N()}};function re(o){Array.isArray(o)||V(),o.length>0&&typeof o[0]=="object"&&Ne(o),c.value=o}function Ne(o){(!i.objectLabelKeyName||i.objectLabelKeyName.length===0)&&q();const u=i.objectLabelKeyName;for(let p=0;p<o.length;p++)(typeof o[p]!="object"||!(u in o[p]))&&q()}const _={openList:X,unfocus:Ee,press:De,mouseOverList:Y,getLabel:D,updatedSelected:B,focusInput:J,closeList:N};return(o,u)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative"},class:e.normalizeClass(o.$attrs.class)},[e.createVNode(ne,{ref_key:"itemListRef",ref:h,"show-drop-down":f.value,filteredListItems:F.value,mouseHoveringOnList:S.value,focusedIndex:C.value,selectedIndex:j.value,"max-list-height-p-x":t.maxListHeightPX,"list-animation-duration-ms":t.listAnimationDurationMs,"parent-methods":_,blockListChange:l.value,"onUpdate:blockListChange":u[1]||(u[1]=p=>l.value=p),"total-options-count":n.value,onReverseDropDownList:u[2]||(u[2]=p=>g.value=p),enableScrollClose:z.value,"enable-text-filter":s.value},{default:e.withCtx(()=>[e.createVNode(ie,{ref_key:"dropDownButtonInput",ref:K,"parent-methods":_,"show-drop-down":f.value,"enable-text-filter":s.value,"custom-icon":t.customIcon,"reverse-drop-down-list":g.value},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"dropDownTextInput",ref:b,"enable-text-filter":s.value,"show-drop-down":f.value,placeholder:Q.value,"enable-button-click":T.value,"parent-methods":_,"onUpdate:query":u[0]||(u[0]=p=>O.value=p)},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","enable-text-filter"])],2))}}),[["__scopeId","data-v-e1f079fa"]])});
1
+ (function(e,A){typeof exports=="object"&&typeof module<"u"?module.exports=A(require("vue")):typeof define=="function"&&define.amd?define(["vue"],A):(e=typeof globalThis<"u"?globalThis:e||self,e.SuperList=A(e.Vue))})(this,function(e){"use strict";var A=document.createElement("style");A.textContent=`.list-filter-text-input[data-v-5cd54d87]{color:var(--superlist-text-colour, rgb(17, 24, 39));text-align:center;padding:.125rem 2rem .125rem .5rem!important;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-5cd54d87]:focus,.list-filter-text-input[data-v-5cd54d87]:focus-visible,.list-filter-text-input[data-v-5cd54d87]:active{text-align:left}.click-through[data-v-5cd54d87]{pointer-events:none}.dark-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-text-colour, rgb(17, 24, 39))}.light-placeholder-text[data-v-5cd54d87]::placeholder{color:var(--superlist-disabled-text-colour, rgb(120, 125, 130))}.text-filter-disabled[data-v-5cd54d87]{background-color:transparent;border:none;outline:none;box-shadow:none;filter:none}@media (min-width: 640px){.list-filter-text-input[data-v-5cd54d87]{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-36d8d106]{top:var(--parent-y)}.list-reverse[data-v-36d8d106]{bottom:var(--parent-y)}.select-list[data-v-36d8d106]{--parent-width: var(--583c4ee4);--parent-x: var(--19dae816);--parent-y: var(--19daebd7);--duration: var(--20dfddb8);--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-36d8d106]:focus-visible,.select-list>ul[data-v-36d8d106]:focus-visible,.super-list-button-container[data-v-36d8d106]:focus-visible{outline:none}.super-list-button-container[data-v-36d8d106]{height:100%;width:100%}.select-list.select-list-open[data-v-36d8d106]{z-index:999999;--max-height: var(--9ebd075e);max-height:var(--max-height, 0)}.select-list.no-scroll[data-v-36d8d106]{overflow:hidden}.select-list-fixed[data-v-36d8d106]{position:fixed;opacity:1;visibility:visible}.list-content[data-v-36d8d106]{--duration: var(--20dfddb8);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-36d8d106]{border-radius:var(--border-radius)}@media (min-width: 640px){.select-list.select-list-scrollable[data-v-36d8d106]{border-radius:var(--border-radius) 0 0 var(--border-radius)}.list-content[data-v-36d8d106]{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-e1f079fa]{box-sizing:border-box}
2
+ /*$vite$:1*/`,document.head.appendChild(A);class le{eventsTypes=["resize","load","scroll","wheel","touchmove"];config={attributes:!0,childList:!0,subtree:!0};mutationObserver;callbackFunction;constructor(r,d=document.body){this.targetNode=d,this.callbackFunction=m=>r(m),this.mutationObserver=new MutationObserver(()=>r())}observe(){this.mutationObserver.observe(this.targetNode,this.config);for(const r of this.eventsTypes)this.addListener(r);this.addResizeListener(),this.addTransitionEndListener()}pauseMutationObserver(){this.mutationObserver.disconnect()}unpauseMutationObserver(){this.mutationObserver.observe(this.targetNode,this.config)}unobserve(){this.mutationObserver.disconnect();for(const r of this.eventsTypes)this.removeListener(r);this.removeResizeListener(),this.removeTransitionEndListener()}addListener(r){document.addEventListener(r,this.callbackFunction,!0)}removeListener(r){document.removeEventListener(r,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 ae(t,r,d,m){return r!=null?r(t):t==null?"":typeof t=="object"?t[d]:m?ue(t,m):""+t}function ue(t,r){return r.find(d=>d.type===t)?.label??""}class de{constructor(){this.abortController=new AbortController,this.func=()=>{},this.then=()=>{}}async abortablePromise(r,d,m){const i=await d();if(!r.aborted)return m(i)}setFunc(r){this.func=r}setThen(r){this.then=r}execute(){return this.abortablePromise(this.abortController.signal,this.func,this.then)}abort(r){this.abortController.abort(r||"Aborted By Controller."),this.abortController=new AbortController}resetAndExecute(r,d){return this.abort("New Request From Controller."),this.setFunc(r),this.setThen(d),this.execute()}}const ce=["tabindex","placeholder","size"],fe=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:r,emit:d}){const m=d,i=t,c=e.ref(null);function v(){i.parentMethods.openList()}function n(g){i.parentMethods.unfocus(g)}function s(g){g?.target?.value!=null&&m("update:query",g.target.value)}const f=e.computed(()=>{const g=c?.value?c.value.length:0,b=i.placeholder?.length||0;return g>0?g:b>0?b:5}),l=e.computed(()=>i.enableButtonClick===!0&&i.enableTextFilter===!0?"":"click-through"),w=e.computed(()=>i.showDropDown&&!i.enableTextFilter||!i.showDropDown?"dark-placeholder-text":"light-placeholder-text");function T(){if(c?.value){const g=c.value;g.blur(),g.value=""}}function L(){c?.value&&c.value.focus()}return r({blurInput:T,focusInput:L,textInputRef:c}),(g,b)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"textInputRef",ref:c,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()),onFocusout:b[6]||(b[6]=h=>n(h)),onInput:b[7]||(b[7]=h=>s(h)),type:"text","aria-autocomplete":"none",autocomplete:"off",placeholder:t.placeholder,size:f.value,class:e.normalizeClass([[l.value,w.value,{"text-filter-disabled":!t.enableTextFilter}],"list-filter-text-input"])},null,42,ce))}}),E=(t,r)=>{const d=t.__vccOpts||t;for(const[m,i]of r)d[m]=i;return d},te=E(fe,[["__scopeId","data-v-5cd54d87"]]),pe={},me={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 -16 16 17"};function be(t,r){return e.openBlock(),e.createElementBlock("svg",me,r[0]||(r[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 he=E(pe,[["render",be]]),we=["onMousedown"],ge={class:"list-item-span"},ve={class:"list-item-span"},ye=E(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 r=t,d=e.useTemplateRef("items"),m=e.computed(()=>{if(!d?.value)return null;const n=(Array.isArray(d.value)?d.value:[d.value])[r.focusedIndex];return n&&typeof n=="object"&&"scrollIntoView"in n&&typeof n.scrollIntoView=="function"?n:null});e.watch(()=>r.showDropDown,()=>i()),e.watch(()=>r.listElementOpenAndVisible,()=>c()),e.watch(()=>m.value,()=>c());function i(){!r.showDropDown||!m?.value?.parentElement?.parentElement||(m.value.parentElement.parentElement.scrollTop=m.value.offsetTop)}function c(){const v=m.value,n=v?.parentElement?.parentElement;if(!r.showDropDown||!v||!n)return;const s=v.offsetTop-n.scrollTop<0,f=v.offsetTop+v.offsetHeight-n.scrollTop>n.clientHeight;s&&(n.scrollTop=v.offsetTop),f&&(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,(s,f)=>(e.openBlock(),e.createElementBlock("li",{key:f,ref_for:!0,ref:"items",onKeyup:[n[0]||(n[0]=e.withKeys(l=>t.parentMethods.press(l),["enter"])),n[1]||(n[1]=e.withKeys(l=>t.parentMethods.press(l),["space"])),n[2]||(n[2]=e.withKeys(l=>t.parentMethods.press(l),["esc"]))],onKeydown:[n[3]||(n[3]=e.withKeys(l=>t.parentMethods.press(l),["up"])),n[4]||(n[4]=e.withKeys(l=>t.parentMethods.press(l),["down"]))],onFocusout:n[5]||(n[5]=l=>t.parentMethods.unfocus(l)),tabindex:"-1",onMousedown:e.withModifiers(l=>t.parentMethods.updatedSelected(s),["left"]),class:e.normalizeClass([{"list-option-selected":t.selectedIndex===f},{"list-option-active":t.filteredListItems.length===1||t.focusedIndex===f&&!t.mouseHoveringOnList},"list-option"])},[e.createElementVNode("span",ge,e.toDisplayString(t.parentMethods.getLabel(s)),1),t.selectedIndex===f?(e.openBlock(),e.createBlock(he,{key:0,class:"list-item-icon","aria-hidden":"true"})):e.createCommentVNode("",!0)],42,we))),128)),t.filteredListItems.length===0?(e.openBlock(),e.createElementBlock("li",{key:0,onKeyup:[n[6]||(n[6]=e.withKeys(s=>t.parentMethods.press(s),["enter"])),n[7]||(n[7]=e.withKeys(s=>t.parentMethods.press(s),["space"])),n[8]||(n[8]=e.withKeys(s=>t.parentMethods.press(s),["esc"]))],onKeydown:[n[9]||(n[9]=e.withKeys(s=>t.parentMethods.press(s),["up"])),n[10]||(n[10]=e.withKeys(s=>t.parentMethods.press(s),["down"]))],onFocusout:n[11]||(n[11]=s=>t.parentMethods.unfocus(s)),onMousedown:n[12]||(n[12]=e.withModifiers(s=>t.parentMethods.closeList(s),["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(s=>t.parentMethods.press(s),["enter"])),n[14]||(n[14]=e.withKeys(s=>t.parentMethods.press(s),["space"])),n[15]||(n[15]=e.withKeys(s=>t.parentMethods.press(s),["esc"]))],onKeydown:[n[16]||(n[16]=e.withKeys(s=>t.parentMethods.press(s),["up"])),n[17]||(n[17]=e.withKeys(s=>t.parentMethods.press(s),["down"]))],onFocusout:n[18]||(n[18]=s=>t.parentMethods.unfocus(s)),onMousedown:n[19]||(n[19]=e.withModifiers(s=>t.parentMethods.closeList(s),["left"])),tabindex:"-1",class:"list-option-message"},[e.createElementVNode("span",ve," +"+e.toDisplayString(t.totalOptionsCount-t.filteredListItems?.length||0)+" More Items...",1)],32)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-e4eeb2f7"]]),ne=E(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},enableTextFilter:{type:Boolean,required:!0}},emits:["reverseDropDownList"],setup(t,{expose:r,emit:d}){e.useCssVars(a=>({"583c4ee4":T.value,"19dae816":O.value,"19daebd7":W.value,"20dfddb8":S.value,"9ebd075e":q.value}));const m=d,i=t,c=e.ref(null),v=e.ref(null),n=e.ref(null),s=e.ref(0),f=e.ref(0),l=e.ref(0),w=e.ref(0),T=e.ref("0px"),L=e.ref(!1),g=e.ref([]),b=e.ref(0),h=e.computed(()=>!L.value||window?.innerHeight==null?!1:V()&&Z()),K=e.computed(()=>i.maxListHeightPX>=b.value);e.watch(()=>h.value,a=>m("reverseDropDownList",a),{immediate:!0});const O=e.computed(()=>s.value+"px"),W=e.computed(()=>w.value+"px");r({listContainerRef:n});const N=a=>{a?.key&&a.key===" "&&a.preventDefault()},Q=a=>{const y=n?.value,x=a.target;(!(y&&x&&y.contains(x))||y.isEqualNode(x))&&i.parentMethods.focusInput()};function B(){return v?.value?(v?.value).clientHeight:0}function D(){if(!i.showDropDown||B()===0)return i.maxListHeightPX;const a=B()===0?i.maxListHeightPX:+B();return i.maxListHeightPX&&i.maxListHeightPX>a?a:i.maxListHeightPX}function V(){return f.value>D()}function Z(){return l.value<D()}const q=e.computed(()=>(i.maxListHeightPX||0)+"px"),S=e.computed(()=>(i.listAnimationDurationMs||0)+"ms"),j=e.computed(()=>i.blockListChange?g.value:i.filteredListItems);e.watch(()=>j,a=>{a&&(g.value=a.value)},{immediate:!1,deep:!0});let k=setTimeout(()=>{},0),C=null;function F(){b.value=B(),clearTimeout(k),C&&C.observe(),L.value=!0,H(void 0)}function Y(){clearTimeout(k),k=setTimeout(()=>{i.showDropDown||(L.value=!1,C&&C.unobserve())},i.listAnimationDurationMs+50)}e.watch(()=>i.showDropDown,(a,y)=>{a!==y&&(a?F():Y())},{immediate:!0});function H(a){U(),e.nextTick(()=>U()),$(a)}function $(a){if(typeof n?.value?.contains!="function"||a?.target?.nodeType==null||X(a))return;const x=["scroll","wheel","touchmove"].includes(a?.type);i.showDropDown&&x&&i.parentMethods.closeList()}function X(a){const y=!!c.value?.contains(a?.target),x=!!n.value?.contains(a.target),P=[a?.srcElement?.id,a?.target?.id].includes("super-list-select-list");return y||x||P}function U(){z(),R()}function z(){if(c?.value==null)return;const a=c.value.getBoundingClientRect();f.value=a.top,l.value=window.innerHeight-a.bottom,T.value=a.width+"px"}function R(){if(c?.value==null||n?.value==null)return;const a=J().getBoundingClientRect(),y=n.value.getBoundingClientRect(),x=w.value,P=s.value;h.value?w.value=x-(a.top-y.bottom):w.value=x-(y.top-a.bottom),s.value=P-(y.left-a.left)}function G(){return(c?.value).getElementsByTagName("button")[0]}function J(){return c?.value}return e.onMounted(()=>{C=new le(H,G()),setTimeout(()=>H(void 0),250)}),e.onUnmounted(()=>{C?.unobserve()}),(a,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropDownButtonContainer",ref:c,class:"super-list-button-container"},[e.renderSlot(a.$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=>N(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(ye,{filteredListItems:g.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-36d8d106"]]),xe={},Le={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true","data-slot":"icon",viewBox:"0 0 12 6"};function Ie(t,r){return e.openBlock(),e.createElementBlock("svg",Le,r[0]||(r[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=E(xe,[["render",Ie]]),ke=["tabindex"],Te={key:2,class:"list-button-icon custom-icon"},ie=E(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:r}){const d=t,m=e.ref(null);function i(){d.enableTextFilter||d.parentMethods.openList()}function c(f){d.enableTextFilter?(d.parentMethods.focusInput(),f.stopPropagation(),f.preventDefault()):d.parentMethods.press(f)}function v(f){d.enableTextFilter||d.parentMethods.press(f)}function n(){m?.value&&m.value.blur()}function s(){m?.value&&m.value.focus()}return r({blurInput:n,focusInput:s,buttonRef:m}),(f,l)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"buttonRef",ref:m,tabindex:t.enableTextFilter?-1:0,onKeydown:[l[0]||(l[0]=e.withKeys(w=>c(w),["enter"])),l[1]||(l[1]=e.withKeys(w=>v(w),["space"])),l[2]||(l[2]=e.withKeys(w=>t.parentMethods.press(w),["esc"])),l[3]||(l[3]=e.withKeys(w=>t.parentMethods.press(w),["up"])),l[4]||(l[4]=e.withKeys(w=>t.parentMethods.press(w),["down"]))],onFocusout:l[5]||(l[5]=w=>t.parentMethods.unfocus(w)),onClick:l[6]||(l[6]=w=>i()),type:"button",class:e.normalizeClass([[{"click-through":d.enableTextFilter||d.showDropDown}],"list-button"])},[e.renderSlot(f.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:e.normalizeClass(["list-button-icon-div",{"bigger-gap":d.showDropDown}])},[t.customIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["list-button-icon",[{"rotate-180":!d.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":d.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",Te,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{"aria-hidden":"true"}))])):e.createCommentVNode("",!0)],2)],42,ke))}}),[["__scopeId","data-v-01ef8e37"]]);return E(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"}},emits:{"update:selected":null},setup(t,{expose:r,emit:d}){const m=d,i=t,c=e.ref([]),v=new de,n=e.ref(0),s=e.computed(()=>i.forceTextFilterVisibilityTo!=null?i.forceTextFilterVisibilityTo:n.value>i.maxListOptions),f=e.ref(!1),l=e.ref(!1),w=e.ref(!1),T=e.ref(!0),L=e.ref(!1),g=e.ref(!1),b=e.ref(ne),h=e.ref(te),K=e.ref(ie),O=e.ref("");e.watch(()=>O.value,(o,u)=>{o!==u&&typeof i.options=="function"&&x(o)});const W=()=>{s.value&&h?.value?.blurInput()},N=()=>{clearTimeout(R),W(),O.value="",f.value=!1,T.value=!0},Q=e.computed(()=>g?.value===!0?"Error loading data":L?.value===!0?"Loading...":D(i.selected)),B=o=>{o&&m("update:selected",o),N()},D=o=>ae(o,i.customPlaceHolderFunction,i.objectLabelKeyName,i.enumKeyToLabelObjectArray);function V(){throw L.value=!0,g.value=!0,new Error("Invalid options argument provided to ListInputComponent")}function Z(){throw L.value=!0,g.value=!0,new Error("Invalid response provided to ListInputComponent, no total count key found")}function q(){throw L.value=!0,g.value=!0,new Error("Invalid objectLabelKeyName for provided Dropdown list value.")}e.onMounted(()=>{typeof i.options!="function"&&!Array.isArray(i.options)?V():a()});const S=e.ref(!1),j=e.ref(0),k=e.ref(0),C=e.ref(0);e.watch(()=>k.value,(o,u)=>{o!=u&&!l.value&&(C.value=o)},{immediate:!0}),e.watch(()=>l.value,o=>{o||(C.value=k.value)},{immediate:!0});const F=e.computed(()=>{if(typeof i.options=="function"&&!Array.isArray(i.options))return c.value;const o=O.value,u=c.value;return o===""?u:u.filter(p=>D(p).toLowerCase().includes(o.toLowerCase()))});e.watch(()=>F.value,(o,u)=>{JSON.stringify(o)!==JSON.stringify(u)&&H()},{immediate:!1,deep:!0});const Y=()=>{S.value=!0},H=()=>{const o=$();j.value=o,k.value=o>-1?o:0};function $(){if(i.selected==null)return-1;const o=c.value.map(p=>D(p)),u=o.filter(p=>p===D(i.selected));if(u.length>1){const p=u.map(I=>o.indexOf(I));for(let I=0;I<p.length;I++){const M=JSON.stringify(c.value[p[I]]),ee=JSON.stringify(i.selected);if(M===ee)return p[I]}return-1}return o.indexOf(D(i.selected))}const X=()=>{L.value||(f.value||(l.value=!1,H(),U(),f.value=!0),S.value=!1,T.value=!1)},U=()=>{const o=window?.innerWidth!=null&&window.innerWidth<640,u=screen?.width!=null&&screen.width<640,p=h.value.textInputRef;(o||u)&&s.value&&(G(),p?.scrollIntoView({block:"start"}))},z=e.ref(!0);let R=setTimeout(()=>{},0);function G(){h.value.textInputRef&&(clearTimeout(R),z.value=!1,R=setTimeout(()=>{z.value=!0},300))}const J=()=>{s?.value==!0?h.value.focusInput():K?.value?.focusInput&&K?.value?.focusInput()};async function a(){typeof i.options=="function"?await x(O.value?O.value:void 0,!0):(re(i.options),n.value=c.value.length),y()}r({initializeOptions:a,getLabel:D});function y(){$()==-1&&c.value&&!!c.value[0]&&B(c.value[0])}async function x(o,u=!0){L.value=u;const p=async()=>i.options(i.maxListOptions,o||""),I=M=>{(!M||!("data"in M))&&V(),re(M.data),P(M?.data?.length??0).then(()=>{L.value=!1})};await v.resetAndExecute(p,I)}async function P(o){const u=async()=>i.options(1,""),p=I=>{(!I||!("totalNum"in I))&&Z(),n.value=I.totalNum??o};await v.resetAndExecute(u,p)}const se=()=>h?.value?.textInputRef?.getElementsByTagName("li")[k.value]??null,De=o=>{f.value==!1?X():o&&Ce(o)},Ce=o=>{const u=o.key||o.code;(u==="Tab"||u==="Escape")&&N(),u==="ArrowDown"&&Be(o),u==="ArrowUp"&&Me(o),(u==="Enter"||u===" ")&&Oe(),o.preventDefault(),o.stopPropagation()},Oe=()=>{F.value.length>0?(l.value=!0,B(F.value[k.value])):N()},Be=o=>{T.value=!0,k.value<F.value.length-1&&(o.preventDefault(),S.value=!1,k.value++,se()?.focus())},Me=o=>{T.value=!0,k.value>0&&(o.preventDefault(),S.value=!1,k.value--,se()?.focus())},Ee=o=>{if(f?.value===!1)return;O.value.length>0&&(l.value=!0);const u=b?.value?.listContainerRef,p=h?.value?.textInputRef,I=o?.relatedTarget&&p?.isEqualNode(o?.relatedTarget),M=o?.relatedTarget&&u&&u.contains(o?.relatedTarget),ee=o?.relatedTarget&&u&&u.isEqualNode(o?.relatedTarget);if(!(M||I)){if(ee){J();return}N()}};function re(o){Array.isArray(o)||V(),o.length>0&&typeof o[0]=="object"&&Ne(o),c.value=o}function Ne(o){(!i.objectLabelKeyName||i.objectLabelKeyName.length===0)&&q();const u=i.objectLabelKeyName;for(let p=0;p<o.length;p++)(typeof o[p]!="object"||!(u in o[p]))&&q()}const _={openList:X,unfocus:Ee,press:De,mouseOverList:Y,getLabel:D,updatedSelected:B,focusInput:J,closeList:N};return(o,u)=>(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":f.value,filteredListItems:F.value,mouseHoveringOnList:S.value,focusedIndex:C.value,selectedIndex:j.value,"max-list-height-p-x":t.maxListHeightPX,"list-animation-duration-ms":t.listAnimationDurationMs,"parent-methods":_,blockListChange:l.value,"onUpdate:blockListChange":u[1]||(u[1]=p=>l.value=p),"total-options-count":n.value,onReverseDropDownList:u[2]||(u[2]=p=>w.value=p),enableScrollClose:z.value,"enable-text-filter":s.value},{default:e.withCtx(()=>[e.createVNode(ie,{ref_key:"dropDownButtonInput",ref:K,"parent-methods":_,"show-drop-down":f.value,"enable-text-filter":s.value,"custom-icon":t.customIcon,"reverse-drop-down-list":w.value},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"dropDownTextInput",ref:h,"enable-text-filter":s.value,"show-drop-down":f.value,placeholder:Q.value,"enable-button-click":T.value,"parent-methods":_,"onUpdate:query":u[0]||(u[0]=p=>O.value=p)},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","enable-text-filter"])],2))}}),[["__scopeId","data-v-e1f079fa"]])});
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 <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()\"\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</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() {\n 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 !important;\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 enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: 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 (!props.showDropDown || 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 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 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;\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@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 :enable-text-filter=\"enableTextFilter\"\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})\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 = listOptions.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(listOptions.value[matchingIndexes[i]])\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 textInput?.scrollIntoView({ block: 'start' })\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) {\n clearTimeout(blockScrollCloseTimeout)\n enableScrollClose.value = false\n blockScrollCloseTimeout = setTimeout(() => {\n enableScrollClose.value = true\n }, 300)\n }\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\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\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\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","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","_createElementVNode","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","e","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","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","dataLength","getCurrentlyFocusedListItemElement","press","keypress","key","down","up","updateSelectedFromTextQuery","unfocus","listInput","isListInput","isList","isListItem","optns","validate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uB,wBACnD,iBAAgB0L,EACT,gBAAiBvE,EAAgB,gDAAhBA,EAAgB,MAAAlG,GACxC,sBAAqB+F,EAAiB,MACtC,sBAAmB9F,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAEmG,EAAmB,MAAGnG,GAC3C,kBAAmBiJ,EAAiB,MACpC,qBAAoBjD,EAAgB,KAAA,qBAErC,IAiBc,CAjBdX,EAAAA,YAiBcuB,GAAA,SAhBR,sBAAJ,IAAID,EACH,iBAAgB8D,EAChB,iBAAgBxE,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,iBAAgBqE,EAChB,iBAAYxK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAE6G,EAAK,MAAG7G,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 <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()\"\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</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() {\n 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 !important;\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 enableTextFilter: {\n type: Boolean as PropType<boolean | null>,\n required: 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 (!props.showDropDown || 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 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 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@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 :enable-text-filter=\"enableTextFilter\"\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})\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 = listOptions.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(listOptions.value[matchingIndexes[i]])\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 textInput?.scrollIntoView({ block: 'start' })\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) {\n clearTimeout(blockScrollCloseTimeout)\n enableScrollClose.value = false\n blockScrollCloseTimeout = setTimeout(() => {\n enableScrollClose.value = true\n }, 300)\n }\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\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\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\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","focusOutHandler","updateQuery","textInputSize","computed","refLength","placeHolderLength","pointerEventsClass","textInputColourClass","blurInput","input","focusInput","__expose","_createElementBlock","$event","_cache","_withKeys","_normalizeClass","_openBlock","_hoisted_1","_createElementVNode","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","e","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","loadData","validateListOptions","initializeSelected","stringFilter","disableOnLoad","next","getOptionsCount","dataLength","getCurrentlyFocusedListItemElement","press","keypress","key","down","up","updateSelectedFromTextQuery","unfocus","listInput","isListInput","isList","isListItem","optns","validateObjectList","values","parentMethods","$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,uBAA8B,CAC5B,KAAK,iBAAiB,WAAW,CAAA,CAGnC,yBAAgC,CAC9B,KAAK,iBAAiB,QAAQ,KAAK,WAAY,KAAK,MAAM,CAAA,CAGrD,WAAkB,CACvB,KAAK,iBAAiB,WAAW,EACjC,UAAWA,KAAa,KAAK,YAAa,KAAK,eAAeA,CAAS,EACvE,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,CAAA,CAG3B,YAAYA,EAAyB,CAC3C,SAAS,iBAAiBA,EAAW,KAAK,iBAAkB,EAAI,CAAA,CAG1D,eAAeA,EAAyB,CAC9C,SAAS,oBAAoBA,EAAW,KAAK,iBAAkB,EAAI,CAAA,CAG7D,0BAAiC,CACvC,KAAK,WAAW,iBAAiB,gBAAiB,KAAK,gBAAgB,CAAA,CAGjE,6BAAoC,CAC1C,KAAK,WAAW,oBAAoB,gBAAiB,KAAK,gBAAgB,CAAA,CAGpE,mBAA0B,CACzB,OAAA,iBAAiB,SAAU,KAAK,gBAAgB,CAAA,CAGjD,sBAA6B,CAC5B,OAAA,oBAAoB,SAAU,KAAK,gBAAgB,CA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AAeF,EAAa,MAC5B,sBAAqB3I,EAAe,gBACpC,6BAA4BA,EAAuB,wBACnD,iBAAgB0L,EACT,gBAAiBvE,EAAgB,gDAAhBA,EAAgB,MAAAlG,GACxC,sBAAqB+F,EAAiB,MACtC,sBAAmB9F,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAEmG,EAAmB,MAAGnG,GAC3C,kBAAmBiJ,EAAiB,MACpC,qBAAoBjD,EAAgB,KAAA,qBAErC,IAiBc,CAjBdX,EAAAA,YAiBcuB,GAAA,SAhBR,sBAAJ,IAAID,EACH,iBAAgB8D,EAChB,iBAAgBxE,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,iBAAgBqE,EAChB,iBAAYxK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAD,GAAE6G,EAAK,MAAG7G,EAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jblehm/super-list",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/ListInputComponents",