-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
autocomplete.min.js.map
7 lines (7 loc) · 53.9 KB
/
autocomplete.min.js.map
1
2
3
4
5
6
7
{
"version": 3,
"sources": ["autocomplete.js"],
"sourcesContent": ["/**\n * Bootstrap 5 autocomplete\n * https://github.com/lekoala/bootstrap5-autocomplete\n * @license MIT\n */\n\n// #region config\n\n/**\n * @callback RenderCallback\n * @param {Object} item\n * @param {String} label\n * @param {Autocomplete} inst\n * @returns {string}\n */\n\n/**\n * @callback ItemCallback\n * @param {Object} item\n * @param {Autocomplete} inst\n * @returns {void}\n */\n\n/**\n * @callback ServerCallback\n * @param {Response} response\n * @param {Autocomplete} inst\n * @returns {Promise}\n */\n\n/**\n * @callback ErrorCallback\n * @param {Error} e\n * @param {AbortSignal} signal\n * @param {Autocomplete} inst\n * @returns {void}\n */\n\n/**\n * @callback FetchCallback\n * @param {Autocomplete} inst\n * @returns {void}\n */\n\n/**\n * @typedef Config\n * @property {Boolean} showAllSuggestions Show all suggestions even if they don't match\n * @property {Number} suggestionsThreshold Number of chars required to show suggestions\n * @property {Number} maximumItems Maximum number of items to display\n * @property {Boolean} autoselectFirst Always select the first item\n * @property {Boolean} ignoreEnter Ignore enter if no items are selected (play nicely with autoselectFirst=0)\n * @property {Boolean} tabSelect Tab will trigger selection if active\n * @property {Boolean} updateOnSelect Update input value on selection (doesn't play nice with autoselectFirst)\n * @property {Boolean} highlightTyped Highlight matched part of the label\n * @property {String} highlightClass Class added to the mark label\n * @property {Boolean} fullWidth Match the width on the input field\n * @property {Boolean} fixed Use fixed positioning (solve overflow issues)\n * @property {Boolean} fuzzy Fuzzy search\n * @property {Boolean} startsWith Must start with the string. Defaults to false (it matches any position).\n * @property {Boolean} fillIn Show fill in icon.\n * @property {Boolean} preventBrowserAutocomplete Additional measures to prevent browser autocomplete\n * @property {String} itemClass Applied to the dropdown item. Accepts space separated classes.\n * @property {Array} activeClasses By default: [\"bg-primary\", \"text-white\"]\n * @property {String} labelField Key for the label\n * @property {String} valueField Key for the value\n * @property {Array} searchFields Key for the search\n * @property {String} queryParam Key for the query parameter for server\n * @property {Array|Object} items An array of label/value objects or an object with key/values\n * @property {Function} source A function that provides the list of items\n * @property {Boolean} hiddenInput Create an hidden input which stores the valueField\n * @property {String} hiddenValue Populate the initial hidden value. Mostly useful with liveServer.\n * @property {String} clearControl Selector that will clear the input on click.\n * @property {String} datalist The id of the source datalist\n * @property {String} server Endpoint for data provider\n * @property {String} serverMethod HTTP request method for data provider, default is GET\n * @property {String|Object} serverParams Parameters to pass along to the server. You can specify a \"related\" key with the id of a related field.\n * @property {String} serverDataKey By default: data\n * @property {Object} fetchOptions Any other fetch options (https://developer.mozilla.org/en-US/docs/Web/API/fetch#syntax)\n * @property {Boolean} liveServer Should the endpoint be called each time on input\n * @property {Boolean} noCache Prevent caching by appending a timestamp\n * @property {Number} debounceTime Debounce time for live server\n * @property {String} notFoundMessage Display a no suggestions found message. Leave empty to disable\n * @property {RenderCallback} onRenderItem Callback function that returns the label\n * @property {ItemCallback} onSelectItem Callback function to call on selection\n * @property {ServerCallback} onServerResponse Callback function to process server response. Must return a Promise\n * @property {ErrorCallback} onServerError Callback function to process server errors.\n * @property {ItemCallback} onChange Callback function to call on change-event. Returns currently selected item if any\n * @property {FetchCallback} onBeforeFetch Callback function before fetch\n * @property {FetchCallback} onAfterFetch Callback function after fetch\n */\n\n/**\n * @type {Config}\n */\nconst DEFAULTS = {\n showAllSuggestions: false,\n suggestionsThreshold: 1,\n maximumItems: 0,\n autoselectFirst: true,\n ignoreEnter: false,\n tabSelect: false,\n updateOnSelect: false,\n highlightTyped: false,\n highlightClass: \"\",\n fullWidth: false,\n fixed: false,\n fuzzy: false,\n startsWith: false,\n fillIn: false,\n preventBrowserAutocomplete: false,\n itemClass: \"\",\n activeClasses: [\"bg-primary\", \"text-white\"],\n labelField: \"label\",\n valueField: \"value\",\n searchFields: [\"label\"],\n queryParam: \"query\",\n items: [],\n source: null,\n hiddenInput: false,\n hiddenValue: \"\",\n clearControl: \"\",\n datalist: \"\",\n server: \"\",\n serverMethod: \"GET\",\n serverParams: {},\n serverDataKey: \"data\",\n fetchOptions: {},\n liveServer: false,\n noCache: true,\n debounceTime: 300,\n notFoundMessage: \"\",\n onRenderItem: (item, label, inst) => {\n return label;\n },\n onSelectItem: (item, inst) => {},\n onServerResponse: (response, inst) => {\n return response.json();\n },\n onServerError: (e, signal, inst) => {\n // Current version of Firefox rejects the promise with a DOMException\n if (e.name === \"AbortError\" || signal.aborted) {\n return;\n }\n console.error(e);\n },\n onChange: (item, inst) => {},\n onBeforeFetch: (inst) => {},\n onAfterFetch: (inst) => {},\n};\n\n// #endregion\n\n// #region constants\n\nconst LOADING_CLASS = \"is-loading\";\nconst ACTIVE_CLASS = \"is-active\";\nconst SHOW_CLASS = \"show\";\nconst NEXT = \"next\";\nconst PREV = \"prev\";\n\nconst INSTANCE_MAP = new WeakMap();\nlet counter = 0;\nlet activeCounter = 0;\n\n// #endregion\n\n// #region functions\n\n/**\n * @param {Function} func\n * @param {number} timeout\n * @returns {Function}\n */\nfunction debounce(func, timeout = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n //@ts-ignore\n func.apply(this, args);\n }, timeout);\n };\n}\n\n/**\n * @param {String} str\n * @returns {String}\n */\nfunction removeDiacritics(str) {\n return str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\n/**\n * @param {String|Number} str\n * @returns {String}\n */\nfunction normalize(str) {\n if (!str) {\n return \"\";\n }\n return removeDiacritics(str.toString()).toLowerCase();\n}\n\n/**\n * A simple fuzzy match algorithm that checks if chars are matched\n * in order in the target string\n *\n * @param {String} str\n * @param {String} lookup\n * @returns {Boolean}\n */\nfunction fuzzyMatch(str, lookup) {\n if (str.indexOf(lookup) >= 0) {\n return true;\n }\n let pos = 0;\n for (let i = 0; i < lookup.length; i++) {\n const c = lookup[i];\n if (c == \" \") continue;\n pos = str.indexOf(c, pos) + 1;\n if (pos <= 0) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {HTMLElement} el\n * @param {HTMLElement} newEl\n * @returns {HTMLElement}\n */\nfunction insertAfter(el, newEl) {\n return el.parentNode.insertBefore(newEl, el.nextSibling);\n}\n\n/**\n * @param {string} html\n * @returns {string}\n */\nfunction decodeHtml(html) {\n var txt = document.createElement(\"textarea\");\n txt.innerHTML = html;\n return txt.value;\n}\n\n/**\n * @param {HTMLElement} el\n * @param {Object} attrs\n */\nfunction attrs(el, attrs) {\n for (const [k, v] of Object.entries(attrs)) {\n el.setAttribute(k, v);\n }\n}\n\n/**\n * Add a zero width join between chars\n * @param {HTMLElement|Element} el\n */\nfunction zwijit(el) {\n //@ts-ignore\n el.ariaLabel = el.innerText;\n //@ts-ignore\n el.innerHTML = el.innerText\n .split(\"\")\n .map((char) => char + \"‍\")\n .join(\"\");\n}\n\nfunction nested(str, obj = \"window\") {\n return str.split(\".\").reduce((r, p) => r[p], obj);\n}\n\n// #endregion\n\nclass Autocomplete {\n /**\n * @param {HTMLInputElement} el\n * @param {Config|Object} config\n */\n constructor(el, config = {}) {\n if (!(el instanceof HTMLElement)) {\n console.error(\"Invalid element\", el);\n return;\n }\n INSTANCE_MAP.set(el, this);\n counter++;\n activeCounter++;\n this._searchInput = el;\n\n this._configure(config);\n\n // Private vars\n this._isMouse = false;\n this._preventInput = false;\n this._keyboardNavigation = false;\n this._searchFunc = debounce(() => {\n this._loadFromServer(true);\n }, this._config.debounceTime);\n\n // Create html\n this._configureSearchInput();\n this._configureDropElement();\n\n if (this._config.fixed) {\n document.addEventListener(\"scroll\", this, true);\n window.addEventListener(\"resize\", this);\n }\n\n const clearControl = this._getClearControl();\n if (clearControl) {\n clearControl.addEventListener(\"click\", this);\n }\n\n // Add listeners (remove then on dispose()). See handleEvent.\n [\"focus\", \"change\", \"blur\", \"input\", \"keydown\"].forEach((type) => {\n this._searchInput.addEventListener(type, this);\n });\n [\"mousemove\", \"mouseenter\", \"mouseleave\"].forEach((type) => {\n this._dropElement.addEventListener(type, this);\n });\n\n this._fetchData();\n }\n\n // #region Core\n\n /**\n * Attach to all elements matched by the selector\n * @param {string} selector\n * @param {Config|Object} config\n */\n static init(selector = \"input.autocomplete\", config = {}) {\n /**\n * @type {NodeListOf<HTMLInputElement>}\n */\n const nodes = document.querySelectorAll(selector);\n nodes.forEach((el) => {\n this.getOrCreateInstance(el, config);\n });\n }\n\n /**\n * @param {HTMLInputElement} el\n */\n static getInstance(el) {\n return INSTANCE_MAP.has(el) ? INSTANCE_MAP.get(el) : null;\n }\n\n /**\n * @param {HTMLInputElement} el\n * @param {Object} config\n */\n static getOrCreateInstance(el, config = {}) {\n return this.getInstance(el) || new this(el, config);\n }\n\n dispose() {\n activeCounter--;\n\n [\"focus\", \"change\", \"blur\", \"input\", \"keydown\"].forEach((type) => {\n this._searchInput.removeEventListener(type, this);\n });\n [\"mousemove\", \"mouseenter\", \"mouseleave\"].forEach((type) => {\n this._dropElement.removeEventListener(type, this);\n });\n\n const clearControl = this._getClearControl();\n if (clearControl) {\n clearControl.removeEventListener(\"click\", this);\n }\n\n // only remove if there are no more active elements\n if (this._config.fixed && activeCounter <= 0) {\n document.removeEventListener(\"scroll\", this, true);\n window.removeEventListener(\"resize\", this);\n }\n\n this._dropElement.parentElement.removeChild(this._dropElement);\n\n INSTANCE_MAP.delete(this._searchInput);\n }\n\n _getClearControl() {\n if (this._config.clearControl) {\n return document.querySelector(this._config.clearControl);\n }\n }\n\n /**\n * @link https://github.com/lifaon74/events-polyfill/issues/10\n * @link https://gist.github.com/WebReflection/ec9f6687842aa385477c4afca625bbf4#handling-events\n * @param {Event} event\n */\n handleEvent = (event) => {\n // debounce scroll and resize\n const debounced = [\"scroll\", \"resize\"];\n if (debounced.includes(event.type)) {\n if (this._timer) window.cancelAnimationFrame(this._timer);\n this._timer = window.requestAnimationFrame(() => {\n this[`on${event.type}`](event);\n });\n } else {\n this[`on${event.type}`](event);\n }\n };\n\n /**\n * @param {Config|Object} config\n */\n _configure(config = {}) {\n this._config = Object.assign({}, DEFAULTS);\n\n // Handle options, using arguments first and data attr as override\n const o = { ...config, ...this._searchInput.dataset };\n\n // Allow 1/0, true/false as strings\n const parseBool = (value) => [\"true\", \"false\", \"1\", \"0\", true, false].includes(value) && !!JSON.parse(value);\n\n // Typecast provided options based on defaults types\n for (const [key, defaultValue] of Object.entries(DEFAULTS)) {\n // Check for undefined keys\n if (o[key] === void 0) {\n continue;\n }\n const value = o[key];\n switch (typeof defaultValue) {\n case \"number\":\n this._config[key] = parseInt(value);\n break;\n case \"boolean\":\n this._config[key] = parseBool(value);\n break;\n case \"string\":\n this._config[key] = value.toString();\n break;\n case \"object\":\n // Arrays have a type object in js\n if (Array.isArray(defaultValue)) {\n if (typeof value === \"string\") {\n const separator = value.includes(\"|\") ? \"|\" : \",\";\n this._config[key] = value.split(separator);\n } else {\n this._config[key] = value;\n }\n } else {\n this._config[key] = typeof value === \"string\" ? JSON.parse(value) : value;\n }\n break;\n case \"function\":\n this._config[key] = typeof value === \"string\" ? window[value] : value;\n break;\n default:\n this._config[key] = value;\n break;\n }\n }\n }\n\n // #endregion\n\n // #region Html\n\n _configureSearchInput() {\n this._searchInput.autocomplete = \"off\";\n this._searchInput.spellcheck = false;\n // note: firefox doesn't support the properties so we use attributes\n // @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete\n // @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded\n // use the aria-expanded state on the element with role combobox to communicate that the list is displayed.\n attrs(this._searchInput, {\n \"aria-autocomplete\": \"list\",\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": \"false\",\n role: \"combobox\",\n });\n\n // Even with autocomplete \"off\" we can get suggestion from browser due to label\n if (this._searchInput.id && this._config.preventBrowserAutocomplete) {\n const label = document.querySelector(`[for=\"${this._searchInput.id}\"]`);\n if (label) {\n zwijit(label);\n }\n }\n\n // Hidden input?\n this._hiddenInput = null;\n if (this._config.hiddenInput) {\n this._hiddenInput = document.createElement(\"input\");\n this._hiddenInput.type = \"hidden\";\n this._hiddenInput.value = this._config.hiddenValue;\n this._hiddenInput.name = this._searchInput.name;\n this._searchInput.name = \"_\" + this._searchInput.name;\n insertAfter(this._searchInput, this._hiddenInput);\n }\n }\n\n _configureDropElement() {\n this._dropElement = document.createElement(\"ul\");\n this._dropElement.id = \"ac-menu-\" + counter;\n this._dropElement.classList.add(...[\"dropdown-menu\", \"autocomplete-menu\", \"p-0\"]);\n this._dropElement.style.maxHeight = \"280px\";\n if (!this._config.fullWidth) {\n this._dropElement.style.maxWidth = \"360px\";\n }\n if (this._config.fixed) {\n this._dropElement.style.position = \"fixed\";\n }\n this._dropElement.style.overflowY = \"auto\";\n // Prevent scrolling the menu from scrolling the page\n // @link https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior\n this._dropElement.style.overscrollBehavior = \"contain\";\n this._dropElement.style.textAlign = \"unset\"; // otherwise RTL is not good\n\n insertAfter(this._searchInput, this._dropElement);\n // include aria-controls with the value of the id of the suggested list of values.\n this._searchInput.setAttribute(\"aria-controls\", this._dropElement.id);\n }\n\n // #endregion\n\n // #region Events\n\n onclick(e) {\n if (e.target.matches(this._config.clearControl)) {\n this.clear();\n }\n }\n\n oninput(e) {\n if (this._preventInput) {\n return;\n }\n // Input has changed, clear value\n if (this._hiddenInput) {\n this._hiddenInput.value = null;\n }\n this.showOrSearch();\n }\n\n onchange(e) {\n const search = this._searchInput.value;\n const item = this._items.find((item) => item.label === search);\n this._config.onChange(item, this);\n }\n\n onblur(e) {\n const related = e.relatedTarget;\n // Clicking on the scroll in a modal blur the element incorrectly\n // In chrome >= 127, the related target is the dropdown menu\n if (this._isMouse && related && (related.classList.contains(\"modal\") || related.classList.contains(\"autocomplete-menu\"))) {\n // Restore focus\n this._searchInput.focus();\n return;\n }\n setTimeout(() => {\n this.hideSuggestions();\n }, 100);\n }\n\n onfocus(e) {\n this.showOrSearch();\n }\n\n /**\n * keypress doesn't send arrow keys, so we use keydown\n * @param {KeyboardEvent} e\n */\n onkeydown(e) {\n const key = e.keyCode || e.key;\n switch (key) {\n case 13:\n case \"Enter\":\n if (this.isDropdownVisible()) {\n const selection = this.getSelection();\n if (selection) {\n selection.click();\n }\n if (selection || !this._config.ignoreEnter) {\n e.preventDefault();\n }\n }\n break;\n case 9:\n case \"Tab\":\n if (this.isDropdownVisible() && this._config.tabSelect) {\n const selection = this.getSelection();\n if (selection) {\n selection.click();\n e.preventDefault();\n }\n }\n break;\n case 38:\n case \"ArrowUp\":\n e.preventDefault();\n this._keyboardNavigation = true;\n this._moveSelection(PREV);\n break;\n case 40:\n case \"ArrowDown\":\n e.preventDefault();\n this._keyboardNavigation = true;\n if (this.isDropdownVisible()) {\n this._moveSelection(NEXT);\n } else {\n // show menu regardless of input length\n this.showOrSearch(false);\n }\n break;\n case 27:\n case \"Escape\":\n if (this.isDropdownVisible()) {\n this._searchInput.focus();\n this.hideSuggestions();\n }\n break;\n }\n }\n\n onmouseenter(e) {\n this._isMouse = true;\n }\n\n onmousemove(e) {\n this._isMouse = true;\n // Moving the mouse means no longer using keyboard\n this._keyboardNavigation = false;\n }\n\n onmouseleave(e) {\n this._isMouse = false;\n // Remove selection\n this.removeSelection();\n }\n\n onscroll(e) {\n this._positionMenu();\n }\n\n onresize(e) {\n this._positionMenu();\n }\n\n // #endregion\n\n // #region Api\n\n /**\n * @param {String} k\n * @returns {Config}\n */\n getConfig(k = null) {\n if (k !== null) {\n return this._config[k];\n }\n return this._config;\n }\n\n /**\n * @param {String} k\n * @param {*} v\n */\n setConfig(k, v) {\n this._config[k] = v;\n }\n\n setData(src) {\n this._items = [];\n this._addItems(src);\n }\n\n enable() {\n this._searchInput.setAttribute(\"disabled\", \"\");\n }\n\n disable() {\n this._searchInput.removeAttribute(\"disabled\");\n }\n\n /**\n * @returns {boolean}\n */\n isDisabled() {\n return this._searchInput.hasAttribute(\"disabled\") || this._searchInput.disabled || this._searchInput.hasAttribute(\"readonly\");\n }\n\n /**\n * @returns {boolean}\n */\n isDropdownVisible() {\n return this._dropElement.classList.contains(SHOW_CLASS);\n }\n\n clear() {\n this._searchInput.value = \"\";\n if (this._hiddenInput) {\n this._hiddenInput.value = \"\";\n }\n }\n\n // #endregion\n\n // #region Selection management\n\n /**\n * @returns {HTMLElement}\n */\n getSelection() {\n return this._dropElement.querySelector(\"a.\" + ACTIVE_CLASS);\n }\n\n removeSelection() {\n const selection = this.getSelection();\n if (selection) {\n selection.classList.remove(...this._activeClasses());\n }\n }\n\n /**\n * @returns {Array}\n */\n _activeClasses() {\n return [...this._config.activeClasses, ...[ACTIVE_CLASS]];\n }\n\n /**\n * @param {HTMLElement} li\n * @returns {Boolean}\n */\n _isItemEnabled(li) {\n if (li.style.display === \"none\") {\n return false;\n }\n const fc = li.firstElementChild;\n return fc.tagName === \"A\" && !fc.classList.contains(\"disabled\");\n }\n\n /**\n * @param {String} dir\n * @param {*|HTMLElement} sel\n * @returns {HTMLElement}\n */\n _moveSelection(dir = NEXT, sel = null) {\n const active = this.getSelection();\n\n // select first li\n if (!active) {\n // no active selection, cannot go back\n if (dir === PREV) {\n return sel;\n }\n // find first enabled item\n if (!sel) {\n sel = this._dropElement.firstChild;\n while (sel && !this._isItemEnabled(sel)) {\n sel = sel[\"nextSibling\"];\n }\n }\n } else {\n const sibling = dir === NEXT ? \"nextSibling\" : \"previousSibling\";\n\n // Iterate over enabled li\n sel = active.parentNode;\n do {\n sel = sel[sibling];\n } while (sel && !this._isItemEnabled(sel));\n\n // We have a new selection\n if (sel) {\n // Change classes\n active.classList.remove(...this._activeClasses());\n\n // Scroll if necessary\n if (dir === PREV) {\n // Don't use scrollIntoView as it scrolls the whole window\n sel.parentNode.scrollTop = sel.offsetTop - sel.parentNode.offsetTop;\n } else {\n // This is the equivalent of scrollIntoView(false) but only for parent node\n if (sel.offsetTop > sel.parentNode.offsetHeight - sel.offsetHeight) {\n sel.parentNode.scrollTop += sel.offsetHeight;\n }\n }\n } else if (active) {\n sel = active.parentElement;\n }\n }\n\n if (sel) {\n const a = sel.querySelector(\"a\");\n a.classList.add(...this._activeClasses());\n this._searchInput.setAttribute(\"aria-activedescendant\", a.id);\n if (this._config.updateOnSelect) {\n this._searchInput.value = a.dataset.label;\n }\n } else {\n this._searchInput.setAttribute(\"aria-activedescendant\", \"\");\n }\n return sel;\n }\n\n // #endregion\n\n // #region Implementation\n\n /**\n * Do we have enough input to show suggestions ?\n * @returns {Boolean}\n */\n _shouldShow() {\n if (this.isDisabled()) {\n return false;\n }\n return this._searchInput.value.length >= this._config.suggestionsThreshold;\n }\n\n /**\n * Show suggestions or load them\n * @param {Boolean} check\n */\n showOrSearch(check = true) {\n if (check && !this._shouldShow()) {\n this.hideSuggestions();\n return;\n }\n if (this._config.liveServer) {\n this._searchFunc();\n } else if (this._config.source) {\n this._config.source(this._searchInput.value, (items) => {\n this.setData(items);\n this._showSuggestions();\n });\n } else {\n this._showSuggestions();\n }\n }\n\n /**\n * @param {String} name\n * @returns {HTMLElement}\n */\n _createGroup(name) {\n const newChild = this._createLi();\n const newChildSpan = document.createElement(\"span\");\n newChild.append(newChildSpan);\n newChildSpan.classList.add(...[\"dropdown-header\", \"text-truncate\"]);\n newChildSpan.innerHTML = name;\n return newChild;\n }\n\n /**\n * @param {String} lookup\n * @param {Object} item\n * @returns {HTMLElement}\n */\n _createItem(lookup, item) {\n let label = item.label;\n\n if (this._config.highlightTyped) {\n const idx = normalize(label).indexOf(lookup);\n if (idx !== -1) {\n label =\n label.substring(0, idx) +\n `<mark class=\"${this._config.highlightClass}\">${label.substring(idx, idx + lookup.length)}</mark>` +\n label.substring(idx + lookup.length, label.length);\n }\n }\n\n label = this._config.onRenderItem(item, label, this);\n\n const newChild = this._createLi();\n const newChildLink = document.createElement(\"a\");\n newChild.append(newChildLink);\n newChildLink.id = this._dropElement.id + \"-\" + this._dropElement.children.length;\n newChildLink.classList.add(...[\"dropdown-item\", \"text-truncate\"]);\n if (this._config.itemClass) {\n newChildLink.classList.add(...this._config.itemClass.split(\" \"));\n }\n newChildLink.setAttribute(\"data-value\", item.value);\n newChildLink.setAttribute(\"data-label\", item.label);\n // Behave like a datalist (tab doesn't allow item selection)\n // @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist\n newChildLink.setAttribute(\"tabindex\", \"-1\");\n newChildLink.setAttribute(\"role\", \"menuitem\");\n newChildLink.setAttribute(\"href\", \"#\");\n newChildLink.innerHTML = label;\n if (item.data) {\n for (const [key, value] of Object.entries(item.data)) {\n newChildLink.dataset[key] = value;\n }\n }\n\n if (this._config.fillIn) {\n const fillIn = document.createElement(\"button\");\n fillIn.type = \"button\"; // prevent submit\n fillIn.classList.add(...[\"btn\", \"btn-link\", \"border-0\"]);\n fillIn.innerHTML = `<svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M2 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H3.707l10.147 10.146a.5.5 0 0 1-.708.708L3 3.707V8.5a.5.5 0 0 1-1 0z\"/>\n </svg>`;\n newChild.append(fillIn);\n newChild.classList.add(...[\"d-flex\", \"justify-content-between\"]);\n fillIn.addEventListener(\"click\", (event) => {\n this._searchInput.value = item.label;\n this._searchInput.focus(); // focus back to keep editing\n });\n }\n\n // Hover sets active item\n newChildLink.addEventListener(\"mouseenter\", (event) => {\n // Don't trigger enter if using arrows or not currently using the mouse\n if (this._keyboardNavigation || !this._isMouse) {\n return;\n }\n this.removeSelection();\n const a = newChild.querySelector(\"a\");\n a.classList.add(...this._activeClasses());\n this._searchInput.setAttribute(\"aria-activedescendant\", a.id);\n });\n // Prevent searchInput losing focus and close the menu\n newChildLink.addEventListener(\"mousedown\", (event) => {\n event.preventDefault();\n });\n // Apply value\n newChildLink.addEventListener(\"click\", (event) => {\n event.preventDefault();\n\n // Prevent input otherwise it might trigger autocomplete due to value change\n this._preventInput = true;\n this._searchInput.value = decodeHtml(item.label);\n // Populate value in hidden input\n if (this._hiddenInput) {\n this._hiddenInput.value = item.value;\n }\n this._config.onSelectItem(item, this);\n this.hideSuggestions();\n this._preventInput = false;\n });\n\n return newChild;\n }\n\n /**\n * Show drop menu with suggestions\n */\n _showSuggestions() {\n // It's not focused anymore\n if (document.activeElement != this._searchInput) {\n return;\n }\n const lookup = normalize(this._searchInput.value);\n this._dropElement.innerHTML = \"\";\n\n let count = 0;\n let firstItem = null;\n\n const groups = [];\n for (const entry of this._items) {\n // Check search length since we can trigger dropdown with arrow\n const showAllSuggestions = this._config.showAllSuggestions || lookup.length === 0;\n // Do we find a matching string or do we display immediately ?\n let isMatched = lookup.length == 0 && this._config.suggestionsThreshold === 0;\n if (!showAllSuggestions && lookup.length > 0) {\n // match on any field\n this._config.searchFields.forEach((sf) => {\n const text = normalize(entry[sf]);\n let found = false;\n if (this._config.fuzzy) {\n found = fuzzyMatch(text, lookup);\n } else {\n const idx = text.indexOf(lookup);\n found = this._config.startsWith ? idx === 0 : idx >= 0;\n }\n if (found) {\n isMatched = true;\n }\n });\n }\n const selectFirst = isMatched || lookup.length === 0;\n if (showAllSuggestions || isMatched) {\n count++;\n\n // Group\n if (entry.group && !groups.includes(entry.group)) {\n const newItem = this._createGroup(entry.group);\n this._dropElement.appendChild(newItem);\n groups.push(entry.group);\n }\n\n const newItem = this._createItem(lookup, entry);\n // Only select as first item if its matching or no lookup\n if (!firstItem && selectFirst) {\n firstItem = newItem;\n }\n this._dropElement.appendChild(newItem);\n if (this._config.maximumItems > 0 && count >= this._config.maximumItems) {\n break;\n }\n }\n }\n\n if (firstItem && this._config.autoselectFirst) {\n this.removeSelection();\n this._moveSelection(NEXT, firstItem);\n }\n\n if (count === 0) {\n if (this._config.notFoundMessage) {\n const newChild = this._createLi();\n newChild.innerHTML = `<span class=\"dropdown-item\">${this._config.notFoundMessage}</span>`;\n this._dropElement.appendChild(newChild);\n this._showDropdown();\n } else {\n // Remove dropdown if not found\n this.hideSuggestions();\n }\n } else {\n // Or show it if necessary\n this._showDropdown();\n }\n }\n\n /**\n * @returns {HTMLLIElement}\n */\n _createLi() {\n const newChild = document.createElement(\"li\");\n newChild.setAttribute(\"role\", \"presentation\");\n return newChild;\n }\n\n /**\n * Show and position dropdown\n */\n _showDropdown() {\n this._dropElement.classList.add(SHOW_CLASS);\n // Register role when shown to avoid empty children issues\n this._dropElement.setAttribute(\"role\", \"menu\");\n attrs(this._searchInput, {\n \"aria-expanded\": \"true\",\n });\n this._positionMenu();\n }\n\n /**\n * Show or hide suggestions\n * @param {Boolean} check\n */\n toggleSuggestions(check = true) {\n if (this._dropElement.classList.contains(SHOW_CLASS)) {\n this.hideSuggestions();\n } else {\n this.showOrSearch(check);\n }\n }\n\n /**\n * Hide the dropdown menu\n */\n hideSuggestions() {\n this._dropElement.classList.remove(SHOW_CLASS);\n attrs(this._searchInput, {\n \"aria-expanded\": \"false\",\n });\n this.removeSelection();\n }\n\n /**\n * @returns {HTMLInputElement}\n */\n getInput() {\n return this._searchInput;\n }\n\n /**\n * @returns {HTMLUListElement}\n */\n getDropMenu() {\n return this._dropElement;\n }\n\n /**\n * Position the dropdown menu\n */\n _positionMenu() {\n const styles = window.getComputedStyle(this._searchInput);\n const bounds = this._searchInput.getBoundingClientRect();\n const isRTL = styles.direction === \"rtl\";\n const fullWidth = this._config.fullWidth;\n const fixed = this._config.fixed;\n\n // Don't position left if not fixed since it may not work in all situations\n // due to offsetParent margin or in tables\n let left = null;\n let top = null;\n\n if (fixed) {\n left = bounds.x;\n top = bounds.y + bounds.height;\n\n // Align end\n if (isRTL && !fullWidth) {\n left -= this._dropElement.offsetWidth - bounds.width;\n }\n }\n\n // Reset any height overflow adjustement\n this._dropElement.style.transform = \"unset\";\n\n // Use full holder width\n if (fullWidth) {\n this._dropElement.style.width = this._searchInput.offsetWidth + \"px\";\n }\n\n // Position element\n if (left !== null) {\n this._dropElement.style.left = left + \"px\";\n }\n if (top !== null) {\n this._dropElement.style.top = top + \"px\";\n }\n\n // Overflow height\n const dropBounds = this._dropElement.getBoundingClientRect();\n const h = window.innerHeight;\n\n // We display above input if it overflows\n if (dropBounds.y + dropBounds.height > h) {\n // We need to add the offset twice\n const topOffset = fullWidth ? bounds.height + 4 : bounds.height;\n // In chrome, we need 100.1% to avoid blurry text\n // @link https://stackoverflow.com/questions/32034574/font-looks-blurry-after-translate-in-chrome\n this._dropElement.style.transform = \"translateY(calc(-100.1% - \" + topOffset + \"px))\";\n }\n }\n\n _fetchData() {\n this._items = [];\n\n // From an array of items or an object\n this._addItems(this._config.items);\n\n // From a datalist\n const dl = this._config.datalist;\n if (dl) {\n const datalist = document.querySelector(`#${dl}`);\n if (datalist) {\n const items = Array.from(datalist.children).map((o) => {\n const value = o.getAttribute(\"value\") ?? o.innerHTML.toLowerCase();\n const label = o.innerHTML;\n\n return {\n value,\n label,\n };\n });\n this._addItems(items);\n } else {\n console.error(`Datalist not found ${dl}`);\n }\n }\n this._setHiddenVal();\n\n // From an external source\n if (this._config.server && !this._config.liveServer) {\n this._loadFromServer();\n }\n }\n\n _setHiddenVal() {\n if (this._config.hiddenInput && !this._config.hiddenValue) {\n for (const entry of this._items) {\n if (entry.label == this._searchInput.value) {\n this._hiddenInput.value = entry.value;\n }\n }\n }\n }\n\n _normalizeData(src) {\n if (Array.isArray(src)) {\n return src;\n }\n\n let arr = [];\n // Normalize objects into an array of value/label objects\n for (const [value, label] of Object.entries(src)) {\n arr.push({\n value,\n label,\n });\n }\n return arr;\n }\n\n /**\n * @param {Array|Object} src An array of items or a value:label object\n */\n _addItems(src) {\n src = this._normalizeData(src);\n for (const entry of src) {\n if (entry.group && entry.items) {\n entry.items.forEach((e) => (e.group = entry.group));\n this._addItems(entry.items);\n continue;\n }\n\n const label = typeof entry === \"string\" ? entry : entry.label;\n const item = typeof entry !== \"object\" ? {} : entry;\n\n // Normalize entry when the entry is just a string (value = label)\n item.label = entry[this._config.labelField] ?? label;\n item.value = entry[this._config.valueField] ?? label;\n\n // Make sure we have a label\n if (item.label) {\n this._items.push(item);\n }\n }\n }\n\n /**\n * @param {boolean} show\n */\n _loadFromServer(show = false) {\n if (this._abortController) {\n this._abortController.abort();\n }\n this._abortController = new AbortController();\n\n // Read data params dynamically as well\n let extraParams = this._searchInput.dataset.serverParams || {};\n if (typeof extraParams == \"string\") {\n extraParams = JSON.parse(extraParams);\n }\n const params = Object.assign({}, this._config.serverParams, extraParams);\n // Pass current value\n params[this._config.queryParam] = this._searchInput.value;\n // Prevent caching\n if (this._config.noCache) {\n params.t = Date.now();\n }\n // We have a related field\n if (params.related) {\n /**\n * @type {HTMLInputElement}\n */\n //@ts-ignore\n const input = document.getElementById(params.related);\n if (input) {\n params.related = input.value;\n const inputName = input.getAttribute(\"name\");\n if (inputName) {\n params[inputName] = input.value;\n }\n }\n }\n\n const urlParams = new URLSearchParams(params);\n let url = this._config.server;\n let fetchOptions = Object.assign(this._config.fetchOptions, {\n method: this._config.serverMethod || \"GET\",\n signal: this._abortController.signal,\n });\n\n if (fetchOptions.method === \"POST\") {\n fetchOptions.body = urlParams;\n } else {\n url += \"?\" + urlParams.toString();\n }\n\n this._searchInput.classList.add(LOADING_CLASS);\n this._config.onBeforeFetch(this);\n\n fetch(url, fetchOptions)\n .then((r) => this._config.onServerResponse(r, this))\n .then((suggestions) => {\n const data = nested(this._config.serverDataKey, suggestions) || suggestions;\n this.setData(data);\n this._setHiddenVal();\n this._abortController = null;\n if (show) {\n this._showSuggestions();\n }\n })\n .catch((e) => {\n this._config.onServerError(e, this._abortController.signal, this);\n })\n .finally((e) => {\n this._searchInput.classList.remove(LOADING_CLASS);\n this._config.onAfterFetch(this);\n });\n }\n\n // #endregion\n}\n\nexport default Autocomplete;\n"],
"mappings": "AA8FA,IAAMA,EAAW,CACf,mBAAoB,GACpB,qBAAsB,EACtB,aAAc,EACd,gBAAiB,GACjB,YAAa,GACb,UAAW,GACX,eAAgB,GAChB,eAAgB,GAChB,eAAgB,GAChB,UAAW,GACX,MAAO,GACP,MAAO,GACP,WAAY,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AAM,MACvB,IAAMC,EAAYD,EAAM,aAAa,MAAM,EACvCC,IACFF,EAAOE,CAAS,EAAID,EAAM,QAKhC,IAAME,EAAY,IAAI,gBAAgBH,CAAM,EACxCI,EAAM,KAAKlF,EAAQ,OACnBmF,EAAe,OAAO,OAAO,KAAKnF,EAAQ,aAAc,CAC1D,OAAQ,KAAKA,EAAQ,cAAgB,MACrC,OAAQ,KAAK4E,EAAiB,MAChC,CAAC,EAEGO,EAAa,SAAW,OAC1BA,EAAa,KAAOF,EAEpBC,GAAO,IAAMD,EAAU,SAAS,EAGlC,KAAKxF,EAAa,UAAU,IAAItC,CAAa,EAC7C,KAAK6C,EAAQ,cAAc,IAAI,EAE/B,MAAMkF,EAAKC,CAAY,EACpB,KAAM9F,GAAM,KAAKW,EAAQ,iBAAiBX,EAAG,IAAI,CAAC,EAClD,KAAM+F,GAAgB,CACrB,IAAMC,EAAOlG,EAAO,KAAKa,EAAQ,cAAeoF,CAAW,GAAKA,EAChE,KAAK,QAAQC,CAAI,EACjB,KAAKb,EAAc,EACnB,KAAKI,EAAmB,KACpBD,GACF,KAAKrC,EAAiB,CAE1B,CAAC,EACA,MAAOrF,GAAM,CACZ,KAAK+C,EAAQ,cAAc/C,EAAG,KAAK2H,EAAiB,OAAQ,IAAI,CAClE,CAAC,EACA,QAAS3H,GAAM,CACd,KAAKwC,EAAa,UAAU,OAAOtC,CAAa,EAChD,KAAK6C,EAAQ,aAAa,IAAI,CAChC,CAAC,CACL,CAGF,EAEOsF,EAAQ/F",
"names": ["DEFAULTS", "item", "label", "inst", "response", "e", "signal", "LOADING_CLASS", "ACTIVE_CLASS", "SHOW_CLASS", "NEXT", "PREV", "INSTANCE_MAP", "counter", "activeCounter", "debounce", "func", "timeout", "timer", "args", "removeDiacritics", "str", "normalize", "fuzzyMatch", "lookup", "pos", "i", "c", "insertAfter", "el", "newEl", "decodeHtml", "html", "txt", "attrs", "k", "v", "zwijit", "char", "nested", "obj", "r", "p", "Autocomplete", "config", "_searchInput", "_configure", "_isMouse", "_preventInput", "_keyboardNavigation", "_searchFunc", "_loadFromServer", "_config", "_configureSearchInput", "_configureDropElement", "clearControl", "_getClearControl", "type", "_dropElement", "_fetchData", "selector", "event", "_timer", "o", "parseBool", "value", "key", "defaultValue", "separator", "_hiddenInput", "search", "_items", "related", "selection", "_moveSelection", "_positionMenu", "src", "_addItems", "_activeClasses", "_isItemEnabled", "li", "fc", "dir", "sel", "active", "sibling", "a", "_shouldShow", "check", "items", "_showSuggestions", "_createGroup", "name", "newChild", "_createLi", "newChildSpan", "_createItem", "idx", "newChildLink", "fillIn", "count", "firstItem", "groups", "entry", "showAllSuggestions", "isMatched", "sf", "text", "found", "selectFirst", "newItem", "_showDropdown", "styles", "bounds", "isRTL", "fullWidth", "fixed", "left", "top", "dropBounds", "h", "topOffset", "dl", "datalist", "_setHiddenVal", "_normalizeData", "arr", "show", "_abortController", "extraParams", "params", "input", "inputName", "urlParams", "url", "fetchOptions", "suggestions", "data", "autocomplete_default"]
}