{ "version": 3, "sources": ["../src/dual-listbox.js"], "sourcesContent": ["const MAIN_BLOCK = \"dual-listbox\";\n\nconst CONTAINER_ELEMENT = \"dual-listbox__container\";\nconst AVAILABLE_ELEMENT = \"dual-listbox__available\";\nconst SELECTED_ELEMENT = \"dual-listbox__selected\";\nconst TITLE_ELEMENT = \"dual-listbox__title\";\nconst ITEM_ELEMENT = \"dual-listbox__item\";\nconst BUTTONS_ELEMENT = \"dual-listbox__buttons\";\nconst BUTTON_ELEMENT = \"dual-listbox__button\";\nconst SEARCH_ELEMENT = \"dual-listbox__search\";\n\nconst SELECTED_MODIFIER = \"dual-listbox__item--selected\";\n\nconst DIRECTION_UP = \"up\";\nconst DIRECTION_DOWN = \"down\";\n\n/**\n * Dual select interface allowing the user to select items from a list of provided options.\n * @class\n */\nclass DualListbox {\n constructor(selector, options = {}) {\n this.setDefaults();\n this.dragged = null;\n this.options = [];\n\n if (DualListbox.isDomElement(selector)) {\n this.select = selector;\n } else {\n this.select = document.querySelector(selector);\n }\n\n this._initOptions(options);\n this._initReusableElements();\n if (options.options !== undefined) {\n this.options = options.options;\n } else {\n this._splitOptions(this.select.options);\n }\n\n this._buildDualListbox(this.select.parentNode);\n this._addActions();\n\n if (this.showSortButtons) {\n this._initializeSortButtons();\n }\n\n this.redraw();\n }\n\n /**\n * Sets the default values that can be overwritten.\n */\n setDefaults() {\n this.availableTitle = \"Available options\";\n this.selectedTitle = \"Selected options\";\n\n this.showAddButton = true;\n this.addButtonText = \"add\";\n\n this.showRemoveButton = true;\n this.removeButtonText = \"remove\";\n\n this.showAddAllButton = true;\n this.addAllButtonText = \"add all\";\n\n this.showRemoveAllButton = true;\n this.removeAllButtonText = \"remove all\";\n\n this.searchPlaceholder = \"Search\";\n\n this.showSortButtons = false;\n this.sortFunction = (a, b) => {\n if (a.selected) {\n return -1;\n }\n if (b.selected) {\n return 1;\n }\n if (a.order < b.order) {\n return -1;\n }\n if (a.order > b.order) {\n return 1;\n }\n return 0;\n };\n this.upButtonText = \"up\";\n this.downButtonText = \"down\";\n\n this.enableDoubleClick = true;\n this.draggable = true;\n }\n\n changeOrder(liItem, newPosition) {\n console.log(liItem);\n const index = this.options.findIndex((option) => {\n console.log(option, liItem.dataset.id);\n return option.value === liItem.dataset.id;\n });\n console.log(index);\n const cutOptions = this.options.splice(index, 1);\n console.log(cutOptions);\n this.options.splice(newPosition, 0, cutOptions[0]);\n }\n\n addOptions(options) {\n options.forEach((option) => {\n this.addOption(option);\n });\n }\n\n addOption(option, index = null) {\n if (index) {\n this.options.splice(index, 0, option);\n } else {\n this.options.push(option);\n }\n }\n\n /**\n * Add eventListener to the dualListbox element.\n *\n * @param {String} eventName\n * @param {function} callback\n */\n addEventListener(eventName, callback) {\n this.dualListbox.addEventListener(eventName, callback);\n }\n\n /**\n * Add the listItem to the selected list.\n *\n * @param {NodeElement} listItem\n */\n changeSelected(listItem) {\n const changeOption = this.options.find(\n (option) => option.value === listItem.dataset.id\n );\n changeOption.selected = !changeOption.selected;\n this.redraw();\n\n setTimeout(() => {\n let event = document.createEvent(\"HTMLEvents\");\n if (changeOption.selected) {\n event.initEvent(\"added\", false, true);\n event.addedElement = listItem;\n } else {\n event.initEvent(\"removed\", false, true);\n event.removedElement = listItem;\n }\n\n this.dualListbox.dispatchEvent(event);\n }, 0);\n }\n\n actionAllSelected(event) {\n if (event) {\n event.preventDefault();\n }\n this.options.forEach((option) => (option.selected = true));\n this.redraw();\n }\n\n actionAllDeselected(event) {\n if (event) {\n event.preventDefault();\n }\n this.options.forEach((option) => (option.selected = false));\n this.redraw();\n }\n\n /**\n * Redraws the Dual listbox content\n */\n redraw() {\n this.options.sort(this.sortFunction);\n\n this.updateAvailableListbox();\n this.updateSelectedListbox();\n this.syncSelect();\n }\n\n /**\n * Filters the listboxes with the given searchString.\n *\n * @param {Object} searchString\n * @param dualListbox\n */\n searchLists(searchString, dualListbox) {\n let items = dualListbox.querySelectorAll(`.${ITEM_ELEMENT}`);\n let lowerCaseSearchString = searchString.toLowerCase();\n\n for (let i = 0; i < items.length; i++) {\n let item = items[i];\n if (\n item.textContent\n .toLowerCase()\n .indexOf(lowerCaseSearchString) === -1\n ) {\n item.style.display = \"none\";\n } else {\n item.style.display = \"list-item\";\n }\n }\n }\n\n /**\n * Update the elements in the available listbox;\n */\n updateAvailableListbox() {\n this._updateListbox(\n this.availableList,\n this.options.filter((option) => !option.selected)\n );\n }\n\n /**\n * Update the elements in the selected listbox;\n */\n updateSelectedListbox() {\n this._updateListbox(\n this.selectedList,\n this.options.filter((option) => option.selected)\n );\n }\n\n syncSelect() {\n while (this.select.firstChild) {\n this.select.removeChild(this.select.lastChild);\n }\n\n this.options.forEach((option) => {\n let optionElement = document.createElement(\"option\");\n optionElement.value = option.value;\n optionElement.innerText = option.text;\n if (option.selected) {\n optionElement.setAttribute(\"selected\", \"selected\");\n }\n this.select.appendChild(optionElement);\n });\n }\n\n //\n //\n // PRIVATE FUNCTIONS\n //\n //\n\n /**\n * Update the elements in the listbox;\n */\n _updateListbox(list, options) {\n while (list.firstChild) {\n list.removeChild(list.firstChild);\n }\n\n options.forEach((option) => {\n list.appendChild(this._createListItem(option));\n });\n }\n\n /**\n * Action to set one listItem to selected.\n */\n actionItemSelected(event) {\n event.preventDefault();\n\n let selected = this.availableList.querySelector(\n `.${SELECTED_MODIFIER}`\n );\n if (selected) {\n this.changeSelected(selected);\n }\n }\n\n /**\n * Action to set one listItem to available.\n */\n actionItemDeselected(event) {\n event.preventDefault();\n\n let selected = this.selectedList.querySelector(`.${SELECTED_MODIFIER}`);\n if (selected) {\n this.changeSelected(selected);\n }\n }\n\n /**\n * Action when double clicked on a listItem.\n */\n _actionItemDoubleClick(listItem, event = null) {\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n if (this.enableDoubleClick) this.changeSelected(listItem);\n }\n\n /**\n * Action when single clicked on a listItem.\n */\n _actionItemClick(listItem, dualListbox, event = null) {\n if (event) {\n event.preventDefault();\n }\n\n let items = dualListbox.querySelectorAll(`.${ITEM_ELEMENT}`);\n\n for (let i = 0; i < items.length; i++) {\n let value = items[i];\n if (value !== listItem) {\n value.classList.remove(SELECTED_MODIFIER);\n }\n }\n\n if (listItem.classList.contains(SELECTED_MODIFIER)) {\n listItem.classList.remove(SELECTED_MODIFIER);\n } else {\n listItem.classList.add(SELECTED_MODIFIER);\n }\n }\n\n /**\n * @Private\n * Adds the needed actions to the elements.\n */\n _addActions() {\n this._addButtonActions();\n this._addSearchActions();\n }\n\n /**\n * Adds the actions to the buttons that are created.\n */\n _addButtonActions() {\n this.add_all_button.addEventListener(\"click\", (event) =>\n this.actionAllSelected(event)\n );\n this.add_button.addEventListener(\"click\", (event) =>\n this.actionItemSelected(event)\n );\n this.remove_button.addEventListener(\"click\", (event) =>\n this.actionItemDeselected(event)\n );\n this.remove_all_button.addEventListener(\"click\", (event) =>\n this.actionAllDeselected(event)\n );\n }\n\n /**\n * Adds the click items to the listItem.\n *\n * @param {Object} listItem\n */\n _addClickActions(listItem) {\n listItem.addEventListener(\"dblclick\", (event) =>\n this._actionItemDoubleClick(listItem, event)\n );\n listItem.addEventListener(\"click\", (event) =>\n this._actionItemClick(listItem, this.dualListbox, event)\n );\n return listItem;\n }\n\n /**\n * @Private\n * Adds the actions to the search input.\n */\n _addSearchActions() {\n this.search_left.addEventListener(\"change\", (event) =>\n this.searchLists(event.target.value, this.availableList)\n );\n this.search_left.addEventListener(\"keyup\", (event) =>\n this.searchLists(event.target.value, this.availableList)\n );\n this.search_right.addEventListener(\"change\", (event) =>\n this.searchLists(event.target.value, this.selectedList)\n );\n this.search_right.addEventListener(\"keyup\", (event) =>\n this.searchLists(event.target.value, this.selectedList)\n );\n }\n\n /**\n * @Private\n * Builds the Dual listbox and makes it visible to the user.\n */\n _buildDualListbox(container) {\n this.select.style.display = \"none\";\n\n this.dualListBoxContainer.appendChild(\n this._createList(\n this.search_left,\n this.availableListTitle,\n this.availableList\n )\n );\n this.dualListBoxContainer.appendChild(this.buttons);\n this.dualListBoxContainer.appendChild(\n this._createList(\n this.search_right,\n this.selectedListTitle,\n this.selectedList\n )\n );\n\n this.dualListbox.appendChild(this.dualListBoxContainer);\n\n container.insertBefore(this.dualListbox, this.select);\n }\n\n /**\n * Creates list with the header.\n */\n _createList(search, header, list) {\n let result = document.createElement(\"div\");\n result.appendChild(search);\n result.appendChild(header);\n result.appendChild(list);\n return result;\n }\n\n /**\n * Creates the buttons to add/remove the selected item.\n */\n _createButtons() {\n this.buttons = document.createElement(\"div\");\n this.buttons.classList.add(BUTTONS_ELEMENT);\n\n this.add_all_button = document.createElement(\"button\");\n this.add_all_button.innerHTML = this.addAllButtonText;\n\n this.add_button = document.createElement(\"button\");\n this.add_button.innerHTML = this.addButtonText;\n\n this.remove_button = document.createElement(\"button\");\n this.remove_button.innerHTML = this.removeButtonText;\n\n this.remove_all_button = document.createElement(\"button\");\n this.remove_all_button.innerHTML = this.removeAllButtonText;\n\n const options = {\n showAddAllButton: this.add_all_button,\n showAddButton: this.add_button,\n showRemoveButton: this.remove_button,\n showRemoveAllButton: this.remove_all_button,\n };\n\n for (let optionName in options) {\n if (optionName) {\n const option = this[optionName];\n const button = options[optionName];\n\n button.setAttribute(\"type\", \"button\");\n button.classList.add(BUTTON_ELEMENT);\n\n if (option) {\n this.buttons.appendChild(button);\n }\n }\n }\n }\n\n /**\n * @Private\n * Creates the listItem out of the option.\n */\n _createListItem(option) {\n let listItem = document.createElement(\"li\");\n\n listItem.classList.add(ITEM_ELEMENT);\n listItem.innerHTML = option.text;\n listItem.dataset.id = option.value;\n\n this._liListeners(listItem);\n this._addClickActions(listItem);\n\n if (this.draggable) {\n listItem.setAttribute(\"draggable\", \"true\");\n }\n\n return listItem;\n }\n\n _liListeners(li) {\n li.addEventListener(\"dragstart\", (event) => {\n // store a ref. on the dragged elem\n console.log(\"drag start\", event);\n this.dragged = event.currentTarget;\n event.currentTarget.classList.add(\"dragging\");\n });\n li.addEventListener(\"dragend\", (event) => {\n event.currentTarget.classList.remove(\"dragging\");\n });\n\n // For changing the order\n li.addEventListener(\n \"dragover\",\n (event) => {\n // Allow the drop event to be emitted for the dropzone.\n event.preventDefault();\n },\n false\n );\n\n li.addEventListener(\"dragenter\", (event) => {\n event.target.classList.add(\"drop-above\");\n });\n\n li.addEventListener(\"dragleave\", (event) => {\n event.target.classList.remove(\"drop-above\");\n });\n\n li.addEventListener(\"drop\", (event) => {\n event.preventDefault();\n event.stopPropagation();\n event.target.classList.remove(\"drop-above\");\n let newIndex = this.options.findIndex(\n (option) => option.value === event.target.dataset.id\n );\n if (event.target.parentElement === this.dragged.parentElement) {\n this.changeOrder(this.dragged, newIndex);\n this.redraw();\n } else {\n this.changeSelected(this.dragged);\n this.changeOrder(this.dragged, newIndex);\n this.redraw();\n }\n });\n }\n\n /**\n * @Private\n * Creates the search input.\n */\n _createSearchLeft() {\n this.search_left = document.createElement(\"input\");\n this.search_left.classList.add(SEARCH_ELEMENT);\n this.search_left.placeholder = this.searchPlaceholder;\n }\n\n /**\n * @Private\n * Creates the search input.\n */\n _createSearchRight() {\n this.search_right = document.createElement(\"input\");\n this.search_right.classList.add(SEARCH_ELEMENT);\n this.search_right.placeholder = this.searchPlaceholder;\n }\n\n /**\n * @Private\n * Create drag and drop listeners\n */\n _createDragListeners() {\n [this.availableList, this.selectedList].forEach((dropzone) => {\n dropzone.addEventListener(\n \"dragover\",\n (event) => {\n // Allow the drop event to be emitted for the dropzone.\n event.preventDefault();\n },\n false\n );\n\n dropzone.addEventListener(\"dragenter\", (event) => {\n event.target.classList.add(\"drop-in\");\n });\n\n dropzone.addEventListener(\"dragleave\", (event) => {\n event.target.classList.remove(\"drop-in\");\n });\n\n dropzone.addEventListener(\"drop\", (event) => {\n event.preventDefault();\n\n event.target.classList.remove(\"drop-in\");\n if (\n dropzone.classList.contains(\"dual-listbox__selected\") ||\n dropzone.classList.contains(\"dual-listbox__available\")\n ) {\n this.changeSelected(this.dragged);\n }\n });\n });\n }\n\n /**\n * @Private\n * Set the option variables to this.\n */\n _initOptions(options) {\n for (let key in options) {\n if (options.hasOwnProperty(key)) {\n this[key] = options[key];\n }\n }\n }\n\n /**\n * @Private\n * Creates all the static elements for the Dual listbox.\n */\n _initReusableElements() {\n this.dualListbox = document.createElement(\"div\");\n this.dualListbox.classList.add(MAIN_BLOCK);\n if (this.select.id) {\n this.dualListbox.classList.add(this.select.id);\n }\n\n this.dualListBoxContainer = document.createElement(\"div\");\n this.dualListBoxContainer.classList.add(CONTAINER_ELEMENT);\n\n this.availableList = document.createElement(\"ul\");\n this.availableList.classList.add(AVAILABLE_ELEMENT);\n\n this.selectedList = document.createElement(\"ul\");\n this.selectedList.classList.add(SELECTED_ELEMENT);\n\n this.availableListTitle = document.createElement(\"div\");\n this.availableListTitle.classList.add(TITLE_ELEMENT);\n this.availableListTitle.innerText = this.availableTitle;\n\n this.selectedListTitle = document.createElement(\"div\");\n this.selectedListTitle.classList.add(TITLE_ELEMENT);\n this.selectedListTitle.innerText = this.selectedTitle;\n\n this._createButtons();\n this._createSearchLeft();\n this._createSearchRight();\n if (this.draggable) {\n setTimeout(() => {\n this._createDragListeners();\n }, 10);\n }\n }\n\n /**\n * @Private\n * Splits the options and places them in the correct list.\n */\n _splitOptions(options) {\n [...options].forEach((option, index) => {\n this.addOption({\n text: option.innerHTML,\n value: option.value,\n selected: option.attributes.selected || false,\n order: index,\n });\n });\n }\n\n /**\n * @private\n * @return {void}\n */\n _initializeSortButtons() {\n const sortUpButton = document.createElement(\"button\");\n sortUpButton.classList.add(\"dual-listbox__button\");\n sortUpButton.innerText = this.upButtonText;\n sortUpButton.addEventListener(\"click\", (event) =>\n this._onSortButtonClick(event, DIRECTION_UP)\n );\n\n const sortDownButton = document.createElement(\"button\");\n sortDownButton.classList.add(\"dual-listbox__button\");\n sortDownButton.innerText = this.downButtonText;\n sortDownButton.addEventListener(\"click\", (event) =>\n this._onSortButtonClick(event, DIRECTION_DOWN)\n );\n\n const buttonContainer = document.createElement(\"div\");\n buttonContainer.classList.add(\"dual-listbox__buttons\");\n buttonContainer.appendChild(sortUpButton);\n buttonContainer.appendChild(sortDownButton);\n\n this.dualListBoxContainer.appendChild(buttonContainer);\n }\n\n /**\n * @private\n * @param {MouseEvent} event\n * @param {string} direction\n * @return {void}\n */\n _onSortButtonClick(event, direction) {\n event.preventDefault();\n\n const selected = this.dualListbox.querySelector(\n \".dual-listbox__item--selected\"\n );\n const option = this.options.find(\n (option) => option.value === selected.dataset.id\n );\n if (selected) {\n const newIndex = this._getNewIndex(selected, direction);\n if (newIndex >= 0) {\n this.changeOrder(selected, newIndex);\n this.redraw();\n }\n }\n }\n\n /**\n * Returns an array where the first element is the old index of the currently\n * selected item in the right box and the second element is the new index.\n *\n * @private\n * @param {string} direction\n * @return {int[]}\n */\n _getNewIndex(selected, direction) {\n const oldIndex = this.options.findIndex(\n (option) => option.value === selected.dataset.id\n );\n\n let newIndex = oldIndex;\n if (DIRECTION_UP === direction) {\n newIndex -= 1;\n } else if (\n DIRECTION_DOWN === direction &&\n oldIndex < selected.length - 1\n ) {\n newIndex += 1;\n }\n\n return newIndex;\n }\n\n /**\n * @Private\n * Returns true if argument is a DOM element\n */\n static isDomElement(o) {\n return typeof HTMLElement === \"object\"\n ? o instanceof HTMLElement //DOM2\n : o &&\n typeof o === \"object\" &&\n o !== null &&\n o.nodeType === 1 &&\n typeof o.nodeName === \"string\";\n }\n}\n\nwindow.DualListbox = DualListbox;\nexport default DualListbox;\nexport { DualListbox };\n"], "mappings": "MAAA,GAAM,GAAa,eAEb,EAAoB,0BACpB,EAAoB,0BACpB,EAAmB,yBACnB,EAAgB,sBAChB,EAAe,qBACf,EAAkB,wBAClB,EAAiB,uBACjB,EAAiB,uBAEjB,EAAoB,+BAEpB,EAAe,KACf,EAAiB,OAMvB,OAAkB,CACd,YAAY,EAAU,EAAU,CAAC,EAAG,CAChC,KAAK,YAAY,EACjB,KAAK,QAAU,KACf,KAAK,QAAU,CAAC,EAEhB,AAAI,EAAY,aAAa,CAAQ,EACjC,KAAK,OAAS,EAE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