From e489173e7ccbe7593e263b705c7937ff5be62b10 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 23 Feb 2023 13:04:50 +0100 Subject: add prototype for table of users --- static/tabulator/js/tabulator_esm.min.js.map | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/tabulator/js/tabulator_esm.min.js.map (limited to 'static/tabulator/js/tabulator_esm.min.js.map') diff --git a/static/tabulator/js/tabulator_esm.min.js.map b/static/tabulator/js/tabulator_esm.min.js.map new file mode 100644 index 0000000..9a67e22 --- /dev/null +++ b/static/tabulator/js/tabulator_esm.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tabulator_esm.min.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/tools/Helpers.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors.js","../../src/js/modules/Edit/defaults/editors/input.js","../../src/js/modules/Edit/defaults/editors/textarea.js","../../src/js/modules/Edit/defaults/editors/number.js","../../src/js/modules/Edit/defaults/editors/range.js","../../src/js/modules/Edit/defaults/editors/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/Edit.js","../../src/js/modules/Export/ExportRow.js","../../src/js/modules/Export/ExportColumn.js","../../src/js/modules/Export/Export.js","../../src/js/modules/Filter/defaults/filters.js","../../src/js/modules/Filter/Filter.js","../../src/js/modules/Format/defaults/formatters.js","../../src/js/modules/Format/defaults/formatters/plaintext.js","../../src/js/modules/Format/defaults/formatters/html.js","../../src/js/modules/Format/defaults/formatters/textarea.js","../../src/js/modules/Format/defaults/formatters/money.js","../../src/js/modules/Format/defaults/formatters/link.js","../../src/js/modules/Format/defaults/formatters/image.js","../../src/js/modules/Format/defaults/formatters/tickCross.js","../../src/js/modules/Format/defaults/formatters/datetime.js","../../src/js/modules/Format/defaults/formatters/datetimediff.js","../../src/js/modules/Format/defaults/formatters/lookup.js","../../src/js/modules/Format/defaults/formatters/star.js","../../src/js/modules/Format/defaults/formatters/traffic.js","../../src/js/modules/Format/defaults/formatters/progress.js","../../src/js/modules/Format/defaults/formatters/color.js","../../src/js/modules/Format/defaults/formatters/buttonTick.js","../../src/js/modules/Format/defaults/formatters/buttonCross.js","../../src/js/modules/Format/defaults/formatters/rownum.js","../../src/js/modules/Format/defaults/formatters/handle.js","../../src/js/modules/Format/defaults/formatters/responsiveCollapse.js","../../src/js/modules/Format/defaults/formatters/rowSelection.js","../../src/js/modules/Format/Format.js","../../src/js/modules/FrozenColumns/FrozenColumns.js","../../src/js/modules/FrozenRows/FrozenRows.js","../../src/js/modules/GroupRows/GroupComponent.js","../../src/js/modules/GroupRows/Group.js","../../src/js/modules/GroupRows/GroupRows.js","../../src/js/modules/History/History.js","../../src/js/modules/History/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers/array.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.js","../../src/js/modules/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/datetime.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/date.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/defaults/sorters/array.js","../../src/js/modules/Sort/defaults/sorters/exists.js","../../src/js/modules/Sort/defaults/sorters/alphanum.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Tooltip/Tooltip.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/tools/Alert.js","../../src/js/core/Tabulator.js","../../src/js/core/defaults/options.js","../../src/js/core/TabulatorFull.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\n\n\tconstructor(table){\n\t\tthis.table = table;\n\t}\n\n\t//////////////////////////////////////////\n\t/////////////// DataLoad /////////////////\n\t//////////////////////////////////////////\n\n\treloadData(data, silent, columnsChanged){\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\n\t}\n\n\t//////////////////////////////////////////\n\t///////////// Localization ///////////////\n\t//////////////////////////////////////////\n\n\tlangText(){\n\t\treturn this.table.modules.localize.getText(...arguments);\n\t}\n\n\tlangBind(){\n\t\treturn this.table.modules.localize.bind(...arguments);\n\t}\n\n\tlangLocale(){\n\t\treturn this.table.modules.localize.getLocale(...arguments);\n\t}\n\n\n\t//////////////////////////////////////////\n\t////////// Inter Table Comms /////////////\n\t//////////////////////////////////////////\n\n\tcommsConnections(){\n\t\treturn this.table.modules.comms.getConnections(...arguments);\n\t}\n\n\tcommsSend(){\n\t\treturn this.table.modules.comms.send(...arguments);\n\t}\n\n\t//////////////////////////////////////////\n\t//////////////// Layout /////////////////\n\t//////////////////////////////////////////\n\n\tlayoutMode(){\n\t\treturn this.table.modules.layout.getMode();\n\t}\n\n\tlayoutRefresh(force){\n\t\treturn this.table.modules.layout.layout(force);\n\t}\n\n\n\t//////////////////////////////////////////\n\t/////////////// Event Bus ////////////////\n\t//////////////////////////////////////////\n\n\tsubscribe(){\n\t\treturn this.table.eventBus.subscribe(...arguments);\n\t}\n\n\tunsubscribe(){\n\t\treturn this.table.eventBus.unsubscribe(...arguments);\n\t}\n\n\tsubscribed(key){\n\t\treturn this.table.eventBus.subscribed(key);\n\t}\n\n\tsubscriptionChange(){\n\t\treturn this.table.eventBus.subscriptionChange(...arguments);\n\t}\n\n\tdispatch(){\n\t\treturn this.table.eventBus.dispatch(...arguments);\n\t}\n\n\tchain(){\n\t\treturn this.table.eventBus.chain(...arguments);\n\t}\n\n\tconfirm(){\n\t\treturn this.table.eventBus.confirm(...arguments);\n\t}\n\n\tdispatchExternal(){\n\t\treturn this.table.externalEvents.dispatch(...arguments);\n\t}\n\n\tsubscribedExternal(key){\n\t\treturn this.table.externalEvents.subscribed(key);\n\t}\n\n\tsubscriptionChangeExternal(){\n\t\treturn this.table.externalEvents.subscriptionChange(...arguments);\n\t}\n\n\t//////////////////////////////////////////\n\t//////////////// Options /////////////////\n\t//////////////////////////////////////////\n\n\toptions(key){\n\t\treturn this.table.options[key];\n\t}\n\n\tsetOption(key, value){\n\t\tif(typeof value !== \"undefined\"){\n\t\t\tthis.table.options[key] = value;\n\t\t}\n\n\t\treturn this.table.options[key];\n\t}\n\n\t//////////////////////////////////////////\n\t/////////// Deprecation Checks ///////////\n\t//////////////////////////////////////////\n\n\tdeprecationCheck(oldOption, newOption){\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\n\t}\n\n\tdeprecationCheckMsg(oldOption, msg){\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\n\t}\n\n\tdeprecationMsg(msg){\n\t\treturn this.table.deprecationAdvisor.msg(msg);\n\t}\n\t//////////////////////////////////////////\n\t//////////////// Modules /////////////////\n\t//////////////////////////////////////////\n\n\tmodule(key){\n\t\treturn this.table.module(key);\n\t}\n}","export default class Helpers{\n\n\tstatic elVisible(el){\n\t\treturn !(el.offsetWidth <= 0 && el.offsetHeight <= 0);\n\t}\n\n\tstatic elOffset(el){\n\t\tvar box = el.getBoundingClientRect();\n\n\t\treturn {\n\t\t\ttop: box.top + window.pageYOffset - document.documentElement.clientTop,\n\t\t\tleft: box.left + window.pageXOffset - document.documentElement.clientLeft\n\t\t};\n\t}\n\n\tstatic deepClone(obj, clone, list = []){\n\t\tvar objectProto = {}.__proto__,\n\t\tarrayProto = [].__proto__;\n\n\t\tif (!clone){\n\t\t\tclone = Object.assign(Array.isArray(obj) ? [] : {}, obj);\n\t\t}\n\n\t\tfor(var i in obj) {\n\t\t\tlet subject = obj[i],\n\t\t\tmatch, copy;\n\n\t\t\tif(subject != null && typeof subject === \"object\" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){\n\t\t\t\tmatch = list.findIndex((item) => {\n\t\t\t\t\treturn item.subject === subject;\n\t\t\t\t});\n\n\t\t\t\tif(match > -1){\n\t\t\t\t\tclone[i] = list[match].copy;\n\t\t\t\t}else{\n\t\t\t\t\tcopy = Object.assign(Array.isArray(subject) ? [] : {}, subject);\n\n\t\t\t\t\tlist.unshift({subject, copy});\n\n\t\t\t\t\tclone[i] = this.deepClone(subject, copy, list);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn clone;\n\t}\n}","import CoreFeature from '../CoreFeature.js';\nimport Helpers from './Helpers.js';\n\nexport default class Popup extends CoreFeature{\n\tconstructor(table, element, parent){\n\t\tsuper(table);\n\t\t\n\t\tthis.element = element;\n\t\tthis.container = this._lookupContainer();\n\t\t\n\t\tthis.parent = parent;\n\t\t\n\t\tthis.reversedX = false;\n\t\tthis.childPopup = null;\n\t\tthis.blurable = false;\n\t\tthis.blurCallback = null;\n\t\tthis.blurEventsBound = false;\n\t\tthis.renderedCallback = null;\n\t\t\n\t\tthis.visible = false;\n\t\tthis.hideable = true;\n\t\t\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\n\t\t\n\t\tthis.blurEvent = this.hide.bind(this, false);\n\t\tthis.escEvent = this._escapeCheck.bind(this);\n\t\t\n\t\tthis.destroyBinding = this.tableDestroyed.bind(this);\n\t\tthis.destroyed = false;\n\t}\n\t\n\ttableDestroyed(){\n\t\tthis.destroyed = true;\n\t\tthis.hide(true);\n\t}\n\t\n\t_lookupContainer(){\n\t\tvar container = this.table.options.popupContainer;\n\t\t\n\t\tif(typeof container === \"string\"){\n\t\t\tcontainer = document.querySelector(container);\n\t\t\t\n\t\t\tif(!container){\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\n\t\t\t}\n\t\t}else if (container === true){\n\t\t\tcontainer = this.table.element;\n\t\t}\n\t\t\n\t\tif(container && !this._checkContainerIsParent(container)){\n\t\t\tcontainer = false;\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\n\t\t}\n\t\t\n\t\tif(!container){\n\t\t\tcontainer = document.body;\n\t\t}\n\t\t\n\t\treturn container;\n\t}\n\t\n\t_checkContainerIsParent(container, element = this.table.element){\n\t\tif(container === element){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn element.parentNode ? this._checkContainerIsParent(container, element.parentNode) : false;\n\t\t}\n\t}\n\t\n\trenderCallback(callback){\n\t\tthis.renderedCallback = callback;\n\t}\n\t\n\tcontainerEventCoords(e){\n\t\tvar touch = !(e instanceof MouseEvent);\n\t\t\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\n\t\t\n\t\tif(this.container !== document.body){\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\n\t\t\t\n\t\t\tx -= parentOffset.left;\n\t\t\ty -= parentOffset.top;\n\t\t}\n\t\t\n\t\treturn {x, y};\n\t}\n\t\n\telementPositionCoords(element, position = \"right\"){\n\t\tvar offset = Helpers.elOffset(element),\n\t\tcontainerOffset, x, y;\n\t\t\n\t\tif(this.container !== document.body){\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\n\t\t\t\n\t\t\toffset.left -= containerOffset.left;\n\t\t\toffset.top -= containerOffset.top;\n\t\t}\n\t\t\n\t\tswitch(position){\n\t\t\tcase \"right\":\n\t\t\t\tx = offset.left + element.offsetWidth;\n\t\t\t\ty = offset.top - 1;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"bottom\":\n\t\t\t\tx = offset.left;\n\t\t\t\ty = offset.top + element.offsetHeight;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"left\":\n\t\t\t\tx = offset.left;\n\t\t\t\ty = offset.top - 1;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"top\":\n\t\t\t\tx = offset.left;\n\t\t\t\ty = offset.top;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"center\":\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn {x, y, offset};\n\t}\n\t\n\tshow(origin, position){\n\t\tvar x, y, parentEl, parentOffset, coords;\n\t\t\n\t\tif(this.destroyed || this.table.destroyed){\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif(origin instanceof HTMLElement){\n\t\t\tparentEl = origin;\n\t\t\tcoords = this.elementPositionCoords(origin, position);\n\t\t\t\n\t\t\tparentOffset = coords.offset;\n\t\t\tx = coords.x;\n\t\t\ty = coords.y;\n\t\t\t\n\t\t}else if(typeof origin === \"number\"){\n\t\t\tparentOffset = {top:0, left:0};\n\t\t\tx = origin;\n\t\t\ty = position;\n\t\t}else{\n\t\t\tcoords = this.containerEventCoords(origin);\n\t\t\t\n\t\t\tx = coords.x;\n\t\t\ty = coords.y;\n\t\t\t\n\t\t\tthis.reversedX = false;\n\t\t}\n\t\t\n\t\tthis.element.style.top = y + \"px\";\n\t\tthis.element.style.left = x + \"px\";\n\t\t\n\t\tthis.container.appendChild(this.element);\n\t\t\n\t\tif(typeof this.renderedCallback === \"function\"){\n\t\t\tthis.renderedCallback();\n\t\t}\n\t\t\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\n\t\t\n\t\tthis.visible = true;\n\t\t\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\n\t\t\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\n\t\t\te.stopPropagation();\n\t\t});\n\t\t\n\t\treturn this;\n\t}\n\t\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\n\t\t\n\t\t//move menu to start on right edge if it is too close to the edge of the screen\n\t\tif((x + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\n\t\t\tthis.element.style.left = \"\";\n\t\t\t\n\t\t\tif(parentEl){\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\n\t\t\t}else{\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\n\t\t\t}\n\t\t\t\n\t\t\tthis.reversedX = true;\n\t\t}\n\t\t\n\t\t//move menu to start on bottom edge if it is too close to the edge of the screen\n\t\tif((y + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\n\t\t\tif(parentEl){\n\t\t\t\tswitch(position){\n\t\t\t\t\tcase \"bottom\":\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\tisVisible(){\n\t\treturn this.visible;\n\t}\n\t\n\thideOnBlur(callback){\n\t\tthis.blurable = true;\n\t\t\n\t\tif(this.visible){\n\t\t\tsetTimeout(() => {\n\t\t\t\tif(this.visible){\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\n\n\t\t\t\t\tthis.blurEventsBound = true;\n\t\t\t\t}\n\t\t\t}, 100);\n\t\t\t\n\t\t\tthis.blurCallback = callback;\n\t\t}\n\t\t\n\t\treturn this;\n\t}\n\t\n\t_escapeCheck(e){\n\t\tif(e.keyCode == 27){\n\t\t\tthis.hide();\n\t\t}\n\t}\n\t\n\tblockHide(){\n\t\tthis.hideable = false;\n\t}\n\t\n\trestoreHide(){\n\t\tthis.hideable = true;\n\t}\n\t\n\thide(silent = false){\n\t\tif(this.visible && this.hideable){\n\t\t\tif(this.blurable && this.blurEventsBound){\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\n\n\t\t\t\tthis.blurEventsBound = false;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.childPopup){\n\t\t\t\tthis.childPopup.hide();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.parent){\n\t\t\t\tthis.parent.childPopup = null;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.element.parentNode){\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t\t}\n\t\t\t\n\t\t\tthis.visible = false;\n\t\t\t\n\t\t\tif(this.blurCallback && !silent){\n\t\t\t\tthis.blurCallback();\n\t\t\t}\n\t\t\t\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\n\t\t}\n\t\t\n\t\treturn this;\n\t}\n\t\n\tchild(element){\n\t\tif(this.childPopup){\n\t\t\tthis.childPopup.hide();\n\t\t}\n\t\t\n\t\tthis.childPopup = new Popup(this.table, element, this);\n\t\t\n\t\treturn this.childPopup;\n\t}\n}","import CoreFeature from './CoreFeature.js';\nimport Popup from './tools/Popup.js';\n\nclass Module extends CoreFeature{\n\t\n\tconstructor(table, name){\n\t\tsuper(table);\n\t\t\n\t\tthis._handler = null;\n\t}\n\t\n\tinitialize(){\n\t\t// setup module when table is initialized, to be overridden in module\n\t}\n\t\n\t\n\t///////////////////////////////////\n\t////// Options Registration ///////\n\t///////////////////////////////////\n\t\n\tregisterTableOption(key, value){\n\t\tthis.table.optionsList.register(key, value);\n\t}\n\t\n\tregisterColumnOption(key, value){\n\t\tthis.table.columnManager.optionsList.register(key, value);\n\t}\n\t\n\t///////////////////////////////////\n\t/// Public Function Registration ///\n\t///////////////////////////////////\n\t\n\tregisterTableFunction(name, func){\n\t\tif(typeof this.table[name] === \"undefined\"){\n\t\t\tthis.table[name] = (...args) => {\n\t\t\t\tthis.table.initGuard(name);\n\t\t\t\t\n\t\t\t\treturn func(...args);\n\t\t\t};\n\t\t}else{\n\t\t\tconsole.warn(\"Unable to bind table function, name already in use\", name);\n\t\t}\n\t}\n\t\n\tregisterComponentFunction(component, func, handler){\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\n\t}\n\t\n\t///////////////////////////////////\n\t////////// Data Pipeline //////////\n\t///////////////////////////////////\n\t\n\tregisterDataHandler(handler, priority){\n\t\tthis.table.rowManager.registerDataPipelineHandler(handler, priority);\n\t\tthis._handler = handler;\n\t}\n\t\n\tregisterDisplayHandler(handler, priority){\n\t\tthis.table.rowManager.registerDisplayPipelineHandler(handler, priority);\n\t\tthis._handler = handler;\n\t}\n\t\n\tdisplayRows(adjust){\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \n\t\tlookupIndex;\n\t\t\n\t\tif(this._handler){\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\n\t\t\t\treturn item.handler === this._handler;\n\t\t\t});\n\n\t\t\tif(lookupIndex > -1){\n\t\t\t\tindex = lookupIndex;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(adjust){\n\t\t\tindex = index + adjust;\n\t\t}\n\n\t\tif(this._handler){\n\t\t\tif(index > -1){\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\n\t\t\t}else{\n\t\t\t\treturn this.activeRows();\n\t\t\t}\n\t\t}\t\n\t}\n\t\n\tactiveRows(){\n\t\treturn this.table.rowManager.activeRows;\n\t}\n\t\n\trefreshData(renderInPosition, handler){\n\t\tif(!handler){\n\t\t\thandler = this._handler;\n\t\t}\n\t\t\n\t\tif(handler){\n\t\t\tthis.table.rowManager.refreshActiveData(handler, false, renderInPosition);\n\t\t}\n\t}\n\t\n\t///////////////////////////////////\n\t//////// Footer Management ////////\n\t///////////////////////////////////\n\t\n\tfooterAppend(element){\n\t\treturn this.table.footerManager.append(element);\n\t}\n\t\n\tfooterPrepend(element){\n\t\treturn this.table.footerManager.prepend(element);\n\t}\n\t\n\tfooterRemove(element){\n\t\treturn this.table.footerManager.remove(element);\n\t} \n\t\n\t///////////////////////////////////\n\t//////// Popups Management ////////\n\t///////////////////////////////////\n\t\n\tpopup(menuEl, menuContainer){\n\t\treturn new Popup(this.table, menuEl, menuContainer);\n\t}\n\t\n\t///////////////////////////////////\n\t//////// Alert Management ////////\n\t///////////////////////////////////\n\t\n\talert(content, type){\n\t\treturn this.table.alertManager.alert(content, type);\n\t}\n\t\n\tclearAlert(){\n\t\treturn this.table.alertManager.clear();\n\t}\n\t\n}\n\nexport default Module;","import Module from '../../core/Module.js';\nimport Helpers from '../../core/tools/Helpers.js';\n\nimport defaultAccessors from './defaults/accessors.js';\n\nclass Accessor extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.allowedTypes = [\"\", \"data\", \"download\", \"clipboard\", \"print\", \"htmlOutput\"]; //list of accessor types\n\n\t\tthis.registerColumnOption(\"accessor\");\n\t\tthis.registerColumnOption(\"accessorParams\");\n\t\tthis.registerColumnOption(\"accessorData\");\n\t\tthis.registerColumnOption(\"accessorDataParams\");\n\t\tthis.registerColumnOption(\"accessorDownload\");\n\t\tthis.registerColumnOption(\"accessorDownloadParams\");\n\t\tthis.registerColumnOption(\"accessorClipboard\");\n\t\tthis.registerColumnOption(\"accessorClipboardParams\");\n\t\tthis.registerColumnOption(\"accessorPrint\");\n\t\tthis.registerColumnOption(\"accessorPrintParams\");\n\t\tthis.registerColumnOption(\"accessorHtmlOutput\");\n\t\tthis.registerColumnOption(\"accessorHtmlOutputParams\");\n\t}\n\n\tinitialize(){\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"row-data-retrieve\", this.transformRow.bind(this));\n\t}\n\n\t//initialize column accessor\n\tinitializeColumn(column){\n\t\tvar match = false,\n\t\tconfig = {};\n\n\t\tthis.allowedTypes.forEach((type) => {\n\t\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\n\t\t\taccessor;\n\n\t\t\tif(column.definition[key]){\n\t\t\t\taccessor = this.lookupAccessor(column.definition[key]);\n\n\t\t\t\tif(accessor){\n\t\t\t\t\tmatch = true;\n\n\t\t\t\t\tconfig[key] = {\n\t\t\t\t\t\taccessor:accessor,\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif(match){\n\t\t\tcolumn.modules.accessor = config;\n\t\t}\n\t}\n\n\tlookupAccessor(value){\n\t\tvar accessor = false;\n\n\t\t//set column accessor\n\t\tswitch(typeof value){\n\t\t\tcase \"string\":\n\t\t\t\tif(Accessor.accessors[value]){\n\t\t\t\t\taccessor = Accessor.accessors[value];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\taccessor = value;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn accessor;\n\t}\n\n\t//apply accessor to row\n\ttransformRow(row, type){\n\t\tvar key = \"accessor\" + (type.charAt(0).toUpperCase() + type.slice(1)),\n\t\trowComponent = row.getComponent();\n\n\t\t//clone data object with deep copy to isolate internal data from returned result\n\t\tvar data = Helpers.deepClone(row.data || {});\n\n\t\tthis.table.columnManager.traverse(function(column){\n\t\t\tvar value, accessor, params, colComponent;\n\n\t\t\tif(column.modules.accessor){\n\n\t\t\t\taccessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;\n\n\t\t\t\tif(accessor){\n\t\t\t\t\tvalue = column.getFieldValue(data);\n\n\t\t\t\t\tif(value != \"undefined\"){\n\t\t\t\t\t\tcolComponent = column.getComponent();\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, rowComponent));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn data;\n\t}\n}\n\n//load defaults\nAccessor.moduleName = \"accessor\";\nAccessor.accessors = defaultAccessors;\n\nexport default Accessor;","export default {};","function generateParamsList(data, prefix){\n\tvar output = [];\n\n\tprefix = prefix || \"\";\n\n\tif(Array.isArray(data)){\n\t\tdata.forEach((item, i) => {\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\n\t\t});\n\t}else if (typeof data === \"object\"){\n\t\tfor (var key in data){\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\n\t\t}\n\t}else{\n\t\toutput.push({key:prefix, value:data});\n\t}\n\n\treturn output;\n}\n\nfunction serializeParams(params){\n\tvar output = generateParamsList(params),\n\tencoded = [];\n\n\toutput.forEach(function(item){\n\t\tencoded.push(encodeURIComponent(item.key) + \"=\" + encodeURIComponent(item.value));\n\t});\n\n\treturn encoded.join(\"&\");\n}\n\nexport default function(url, config, params){\n\tif(url){\n\t\tif(params && Object.keys(params).length){\n\t\t\tif(!config.method || config.method.toLowerCase() == \"get\"){\n\t\t\t\tconfig.method = \"get\";\n\n\t\t\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + serializeParams(params);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn url;\n}","function generateParamsList(data, prefix){\n\tvar output = [];\n\n\tprefix = prefix || \"\";\n\n\tif(Array.isArray(data)){\n\t\tdata.forEach((item, i) => {\n\t\t\toutput = output.concat(generateParamsList(item, prefix ? prefix + \"[\" + i + \"]\" : i));\n\t\t});\n\t}else if (typeof data === \"object\"){\n\t\tfor (var key in data){\n\t\t\toutput = output.concat(generateParamsList(data[key], prefix ? prefix + \"[\" + key + \"]\" : key));\n\t\t}\n\t}else{\n\t\toutput.push({key:prefix, value:data});\n\t}\n\n\treturn output;\n}\n\nexport default {\n\t\"json\":{\n\t\theaders:{\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tbody:function(url, config, params){\n\t\t\treturn JSON.stringify(params);\n\t\t},\n\t},\n\t\"form\":{\n\t\theaders:{\n\t\t},\n\t\tbody:function(url, config, params){\n\n\t\t\tvar output = generateParamsList(params),\n\t\t\tform = new FormData();\n\n\t\t\toutput.forEach(function(item){\n\t\t\t\tform.append(item.key, item.value);\n\t\t\t});\n\n\t\t\treturn form;\n\t\t},\n\t},\n};","import Module from '../../core/Module.js';\n\nimport defaultConfig from './defaults/config.js';\nimport defaultURLGenerator from './defaults/urlGenerator.js';\nimport defaultLoaderPromise from './defaults/loaderPromise.js';\nimport defaultContentTypeFormatters from './defaults/contentTypeFormatters.js';\n\nclass Ajax extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.config = {}; //hold config object for ajax request\n\t\tthis.url = \"\"; //request URL\n\t\tthis.urlGenerator = false;\n\t\tthis.params = false; //request parameters\n\t\t\n\t\tthis.loaderPromise = false;\n\t\t\n\t\tthis.registerTableOption(\"ajaxURL\", false); //url for ajax loading\n\t\tthis.registerTableOption(\"ajaxURLGenerator\", false);\n\t\tthis.registerTableOption(\"ajaxParams\", {}); //params for ajax loading\n\t\tthis.registerTableOption(\"ajaxConfig\", \"get\"); //ajax request type\n\t\tthis.registerTableOption(\"ajaxContentType\", \"form\"); //ajax request type\n\t\tthis.registerTableOption(\"ajaxRequestFunc\", false); //promise function\n\t\t\n\t\tthis.registerTableOption(\"ajaxRequesting\", function(){});\n\t\tthis.registerTableOption(\"ajaxResponse\", false);\n\t\t\n\t\tthis.contentTypeFormatters = Ajax.contentTypeFormatters;\n\t}\n\t\n\t//initialize setup options\n\tinitialize(){\n\t\tthis.loaderPromise = this.table.options.ajaxRequestFunc || Ajax.defaultLoaderPromise;\n\t\tthis.urlGenerator = this.table.options.ajaxURLGenerator || Ajax.defaultURLGenerator;\n\t\t\n\t\tif(this.table.options.ajaxURL){\n\t\t\tthis.setUrl(this.table.options.ajaxURL);\n\t\t}\n\n\n\t\tthis.setDefaultConfig(this.table.options.ajaxConfig);\n\t\t\n\t\tthis.registerTableFunction(\"getAjaxUrl\", this.getUrl.bind(this));\n\t\t\n\t\tthis.subscribe(\"data-loading\", this.requestDataCheck.bind(this));\n\t\tthis.subscribe(\"data-params\", this.requestParams.bind(this));\n\t\tthis.subscribe(\"data-load\", this.requestData.bind(this));\n\t}\n\t\n\trequestParams(data, config, silent, params){\n\t\tvar ajaxParams = this.table.options.ajaxParams;\n\t\t\n\t\tif(ajaxParams){\n\t\t\tif(typeof ajaxParams === \"function\"){\n\t\t\t\tajaxParams = ajaxParams.call(this.table);\n\t\t\t}\n\t\t\t\n\t\t\tparams = Object.assign(params, ajaxParams);\n\t\t}\t\t\n\t\t\n\t\treturn params;\n\t}\n\t\n\trequestDataCheck(data, params, config, silent){\n\t\treturn !!((!data && this.url) || typeof data === \"string\");\n\t}\n\t\n\trequestData(url, params, config, silent, previousData){\n\t\tvar ajaxConfig;\n\t\t\n\t\tif(!previousData && this.requestDataCheck(url)){\n\t\t\tif(url){\n\t\t\t\tthis.setUrl(url);\n\t\t\t}\n\t\t\t\n\t\t\tajaxConfig = this.generateConfig(config);\n\t\t\t\n\t\t\treturn this.sendRequest(this.url, params, ajaxConfig);\n\t\t}else{\n\t\t\treturn previousData;\n\t\t}\n\t}\n\t\n\tsetDefaultConfig(config = {}){\n\t\tthis.config = Object.assign({}, Ajax.defaultConfig);\n\n\t\tif(typeof config == \"string\"){\n\t\t\tthis.config.method = config;\n\t\t}else{\n\t\t\tObject.assign(this.config, config);\n\t\t}\n\t}\n\t\n\t//load config object\n\tgenerateConfig(config = {}){\n\t\tvar ajaxConfig = Object.assign({}, this.config);\n\t\t\n\t\tif(typeof config == \"string\"){\n\t\t\tajaxConfig.method = config;\n\t\t}else{\n\t\t\tObject.assign(ajaxConfig, config);\n\t\t}\n\t\t\n\t\treturn ajaxConfig;\n\t}\n\t\n\t//set request url\n\tsetUrl(url){\n\t\tthis.url = url;\n\t}\n\t\n\t//get request url\n\tgetUrl(){\n\t\treturn this.url;\n\t}\n\t\n\t//send ajax request\n\tsendRequest(url, params, config){\n\t\tif(this.table.options.ajaxRequesting.call(this.table, url, params) !== false){\n\t\t\treturn this.loaderPromise(url, config, params)\n\t\t\t\t.then((data)=>{\n\t\t\t\t\tif(this.table.options.ajaxResponse){\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\treturn data;\n\t\t\t\t});\n\t\t}else{\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n}\n\nAjax.moduleName = \"ajax\";\n\n//load defaults\nAjax.defaultConfig = defaultConfig;\nAjax.defaultURLGenerator = defaultURLGenerator;\nAjax.defaultLoaderPromise = defaultLoaderPromise;\nAjax.contentTypeFormatters = defaultContentTypeFormatters;\n\nexport default Ajax;","export default {\n\tmethod: \"GET\",\n};","export default function(url, config, params){\n\tvar contentType;\n\n\treturn new Promise((resolve, reject) => {\n\t\t//set url\n\t\turl = this.urlGenerator.call(this.table, url, config, params);\n\n\t\t//set body content if not GET request\n\t\tif(config.method.toUpperCase() != \"GET\"){\n\t\t\tcontentType = typeof this.table.options.ajaxContentType === \"object\" ? this.table.options.ajaxContentType : this.contentTypeFormatters[this.table.options.ajaxContentType];\n\t\t\tif(contentType){\n\n\t\t\t\tfor(var key in contentType.headers){\n\t\t\t\t\tif(!config.headers){\n\t\t\t\t\t\tconfig.headers = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tif(typeof config.headers[key] === \"undefined\"){\n\t\t\t\t\t\tconfig.headers[key] = contentType.headers[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconfig.body = contentType.body.call(this, url, config, params);\n\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Ajax Error - Invalid ajaxContentType value:\", this.table.options.ajaxContentType);\n\t\t\t}\n\t\t}\n\n\t\tif(url){\n\t\t\t//configure headers\n\t\t\tif(typeof config.headers === \"undefined\"){\n\t\t\t\tconfig.headers = {};\n\t\t\t}\n\n\t\t\tif(typeof config.headers.Accept === \"undefined\"){\n\t\t\t\tconfig.headers.Accept = \"application/json\";\n\t\t\t}\n\n\t\t\tif(typeof config.headers[\"X-Requested-With\"] === \"undefined\"){\n\t\t\t\tconfig.headers[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t\t}\n\n\t\t\tif(typeof config.mode === \"undefined\"){\n\t\t\t\tconfig.mode = \"cors\";\n\t\t\t}\n\n\t\t\tif(config.mode == \"cors\"){\n\t\t\t\tif(typeof config.headers[\"Origin\"] === \"undefined\"){\n\t\t\t\t\tconfig.headers[\"Origin\"] = window.location.origin;\n\t\t\t\t}\n \n\t\t\t\tif(typeof config.credentials === \"undefined\"){\n\t\t\t\t\tconfig.credentials = 'same-origin';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(typeof config.credentials === \"undefined\"){\n\t\t\t\t\tconfig.credentials = 'include';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//send request\n\t\t\tfetch(url, config)\n\t\t\t\t.then((response)=>{\n\t\t\t\t\tif(response.ok) {\n\t\t\t\t\t\tresponse.json()\n\t\t\t\t\t\t\t.then((data)=>{\n\t\t\t\t\t\t\t\tresolve(data);\n\t\t\t\t\t\t\t}).catch((error)=>{\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\n\t\t\t\t\t\treject(response);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((error)=>{\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t}else{\n\t\t\tconsole.warn(\"Ajax Load Error - No URL Set\");\n\t\t\tresolve([]);\n\t\t}\n\t});\n}","import Module from '../../core/Module.js';\n\nimport defaultPasteActions from './defaults/pasteActions.js';\nimport defaultPasteParsers from './defaults/pasteParsers.js';\n\nclass Clipboard extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.mode = true;\n\t\tthis.pasteParser = function(){};\n\t\tthis.pasteAction = function(){};\n\t\tthis.customSelection = false;\n\t\tthis.rowRange = false;\n\t\tthis.blocked = true; //block copy actions not originating from this command\n\n\t\tthis.registerTableOption(\"clipboard\", false); //enable clipboard\n\t\tthis.registerTableOption(\"clipboardCopyStyled\", true); //formatted table data\n\t\tthis.registerTableOption(\"clipboardCopyConfig\", false); //clipboard config\n\t\tthis.registerTableOption(\"clipboardCopyFormatter\", false); //DEPRECATED - REMOVE in 5.0\n\t\tthis.registerTableOption(\"clipboardCopyRowRange\", \"active\"); //restrict clipboard to visible rows only\n\t\tthis.registerTableOption(\"clipboardPasteParser\", \"table\"); //convert pasted clipboard data to rows\n\t\tthis.registerTableOption(\"clipboardPasteAction\", \"insert\"); //how to insert pasted data into the table\n\n\t\tthis.registerColumnOption(\"clipboard\");\n\t\tthis.registerColumnOption(\"titleClipboard\");\n\t}\n\n\tinitialize(){\n\t\tthis.mode = this.table.options.clipboard;\n\n\t\tthis.rowRange = this.table.options.clipboardCopyRowRange;\n\n\t\tif(this.mode === true || this.mode === \"copy\"){\n\t\t\tthis.table.element.addEventListener(\"copy\", (e) => {\n\t\t\t\tvar plain, html, list;\n\n\t\t\t\tif(!this.blocked){\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tif(this.customSelection){\n\t\t\t\t\t\tplain = this.customSelection;\n\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\tlist = this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig, this.table.options.clipboardCopyStyled, this.rowRange, \"clipboard\");\n\n\t\t\t\t\t\thtml = this.table.modules.export.generateHTMLTable(list);\n\t\t\t\t\t\tplain = html ? this.generatePlainContent(list) : \"\";\n\n\t\t\t\t\t\tif(this.table.options.clipboardCopyFormatter){\n\t\t\t\t\t\t\tplain = this.table.options.clipboardCopyFormatter(\"plain\", plain);\n\t\t\t\t\t\t\thtml = this.table.options.clipboardCopyFormatter(\"html\", html);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (window.clipboardData && window.clipboardData.setData) {\n\t\t\t\t\t\twindow.clipboardData.setData('Text', plain);\n\t\t\t\t\t} else if (e.clipboardData && e.clipboardData.setData) {\n\t\t\t\t\t\te.clipboardData.setData('text/plain', plain);\n\t\t\t\t\t\tif(html){\n\t\t\t\t\t\t\te.clipboardData.setData('text/html', html);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.setData) {\n\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/plain', plain);\n\t\t\t\t\t\tif(html){\n\t\t\t\t\t\t\te.originalEvent.clipboardData.setData('text/html', html);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.dispatchExternal(\"clipboardCopied\", plain, html);\n\n\t\t\t\t\tthis.reset();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif(this.mode === true || this.mode === \"paste\"){\n\t\t\tthis.table.element.addEventListener(\"paste\", (e) => {\n\t\t\t\tthis.paste(e);\n\t\t\t});\n\t\t}\n\n\t\tthis.setPasteParser(this.table.options.clipboardPasteParser);\n\t\tthis.setPasteAction(this.table.options.clipboardPasteAction);\n\n\t\tthis.registerTableFunction(\"copyToClipboard\", this.copy.bind(this));\n\t}\n\n\treset(){\n\t\tthis.blocked = true;\n\t\tthis.customSelection = false;\n\t}\n\n\tgeneratePlainContent (list) {\n\t\tvar output = [];\n\n\t\tlist.forEach((row) => {\n\t\t\tvar rowData = [];\n\n\t\t\trow.columns.forEach((col) => {\n\t\t\t\tvar value = \"\";\n\n\t\t\t\tif(col){\n\n\t\t\t\t\tif(row.type === \"group\"){\n\t\t\t\t\t\tcol.value = col.component.getKey();\n\t\t\t\t\t}\n\n\t\t\t\t\tif(col.value === null){\n\t\t\t\t\t\tvalue = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tswitch(typeof col.value){\n\t\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\t\tvalue = JSON.stringify(col.value);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\t\t\tvalue = \"\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tvalue = col.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trowData.push(value);\n\t\t\t});\n\n\t\t\toutput.push(rowData.join(\"\\t\"));\n\t\t});\n\n\t\treturn output.join(\"\\n\");\n\t}\n\n\tcopy (range, internal) {\n\t\tvar sel, textRange;\n\t\tthis.blocked = false;\n\t\tthis.customSelection = false;\n\n\t\tif (this.mode === true || this.mode === \"copy\") {\n\n\t\t\tthis.rowRange = range || this.table.options.clipboardCopyRowRange;\n\n\t\t\tif (typeof window.getSelection != \"undefined\" && typeof document.createRange != \"undefined\") {\n\t\t\t\trange = document.createRange();\n\t\t\t\trange.selectNodeContents(this.table.element);\n\t\t\t\tsel = window.getSelection();\n\n\t\t\t\tif (sel.toString() && internal) {\n\t\t\t\t\tthis.customSelection = sel.toString();\n\t\t\t\t}\n\n\t\t\t\tsel.removeAllRanges();\n\t\t\t\tsel.addRange(range);\n\t\t\t} else if (typeof document.selection != \"undefined\" && typeof document.body.createTextRange != \"undefined\") {\n\t\t\t\ttextRange = document.body.createTextRange();\n\t\t\t\ttextRange.moveToElementText(this.table.element);\n\t\t\t\ttextRange.select();\n\t\t\t}\n\n\t\t\tdocument.execCommand('copy');\n\n\t\t\tif (sel) {\n\t\t\t\tsel.removeAllRanges();\n\t\t\t}\n\t\t}\n\t}\n\n\t//PASTE EVENT HANDLING\n\tsetPasteAction(action){\n\n\t\tswitch(typeof action){\n\t\t\tcase \"string\":\n\t\t\t\tthis.pasteAction = Clipboard.pasteActions[action];\n\n\t\t\t\tif(!this.pasteAction){\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\tthis.pasteAction = action;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetPasteParser(parser){\n\t\tswitch(typeof parser){\n\t\t\tcase \"string\":\n\t\t\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\n\n\t\t\t\tif(!this.pasteParser){\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\tthis.pasteParser = parser;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tpaste(e){\n\t\tvar data, rowData, rows;\n\n\t\tif(this.checkPaseOrigin(e)){\n\n\t\t\tdata = this.getPasteData(e);\n\n\t\t\trowData = this.pasteParser.call(this, data);\n\n\t\t\tif(rowData){\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif(this.table.modExists(\"mutator\")){\n\t\t\t\t\trowData = this.mutateData(rowData);\n\t\t\t\t}\n\n\t\t\t\trows = this.pasteAction.call(this, rowData);\n\n\t\t\t\tthis.dispatchExternal(\"clipboardPasted\", data, rowData, rows);\n\t\t\t}else{\n\t\t\t\tthis.dispatchExternal(\"clipboardPasteError\", data);\n\t\t\t}\n\t\t}\n\t}\n\n\tmutateData(data){\n\t\tvar output = [];\n\n\t\tif(Array.isArray(data)){\n\t\t\tdata.forEach((row) => {\n\t\t\t\toutput.push(this.table.modules.mutator.transformRow(row, \"clipboard\"));\n\t\t\t});\n\t\t}else{\n\t\t\toutput = data;\n\t\t}\n\n\t\treturn output;\n\t}\n\n\n\tcheckPaseOrigin(e){\n\t\tvar valid = true;\n\n\t\tif(e.target.tagName != \"DIV\" || this.table.modules.edit.currentCell){\n\t\t\tvalid = false;\n\t\t}\n\n\t\treturn valid;\n\t}\n\n\tgetPasteData(e){\n\t\tvar data;\n\n\t\tif (window.clipboardData && window.clipboardData.getData) {\n\t\t\tdata = window.clipboardData.getData('Text');\n\t\t} else if (e.clipboardData && e.clipboardData.getData) {\n\t\t\tdata = e.clipboardData.getData('text/plain');\n\t\t} else if (e.originalEvent && e.originalEvent.clipboardData.getData) {\n\t\t\tdata = e.originalEvent.clipboardData.getData('text/plain');\n\t\t}\n\n\t\treturn data;\n\t}\n}\n\nClipboard.moduleName = \"clipboard\";\n\n//load defaults\nClipboard.pasteActions = defaultPasteActions;\nClipboard.pasteParsers = defaultPasteParsers;\n\nexport default Clipboard;","export default {\n\treplace:function(rows){\n\t\treturn this.table.setData(rows);\n\t},\n\tupdate:function(rows){\n\t\treturn this.table.updateOrAddData(rows);\n\t},\n\tinsert:function(rows){\n\t\treturn this.table.addData(rows);\n\t},\n};","export default {\n\ttable:function(clipboard){\n\t\tvar data = [],\n\t\theaderFindSuccess = true,\n\t\tcolumns = this.table.columnManager.columns,\n\t\tcolumnMap = [],\n\t\trows = [];\n\n\t\t//get data from clipboard into array of columns and rows.\n\t\tclipboard = clipboard.split(\"\\n\");\n\n\t\tclipboard.forEach(function(row){\n\t\t\tdata.push(row.split(\"\\t\"));\n\t\t});\n\n\t\tif(data.length && !(data.length === 1 && data[0].length < 2)){\n\n\t\t\t//check if headers are present by title\n\t\t\tdata[0].forEach(function(value){\n\t\t\t\tvar column = columns.find(function(column){\n\t\t\t\t\treturn value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();\n\t\t\t\t});\n\n\t\t\t\tif(column){\n\t\t\t\t\tcolumnMap.push(column);\n\t\t\t\t}else{\n\t\t\t\t\theaderFindSuccess = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//check if column headers are present by field\n\t\t\tif(!headerFindSuccess){\n\t\t\t\theaderFindSuccess = true;\n\t\t\t\tcolumnMap = [];\n\n\t\t\t\tdata[0].forEach(function(value){\n\t\t\t\t\tvar column = columns.find(function(column){\n\t\t\t\t\t\treturn value && column.field && value.trim() && column.field.trim() === value.trim();\n\t\t\t\t\t});\n\n\t\t\t\t\tif(column){\n\t\t\t\t\t\tcolumnMap.push(column);\n\t\t\t\t\t}else{\n\t\t\t\t\t\theaderFindSuccess = false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(!headerFindSuccess){\n\t\t\t\t\tcolumnMap = this.table.columnManager.columnsByIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//remove header row if found\n\t\t\tif(headerFindSuccess){\n\t\t\t\tdata.shift();\n\t\t\t}\n\n\t\t\tdata.forEach(function(item){\n\t\t\t\tvar row = {};\n\n\t\t\t\titem.forEach(function(value, i){\n\t\t\t\t\tif(columnMap[i]){\n\t\t\t\t\t\trow[columnMap[i].field] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\trows.push(row);\n\t\t\t});\n\n\t\t\treturn rows;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n};","class CalcComponent{\n\tconstructor (row){\n\t\tthis._row = row;\n\n\t\treturn new Proxy(this, {\n\t\t\tget: function(target, name, receiver) {\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\n\t\t\t\t\treturn target[name];\n\t\t\t\t}else{\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tgetData(transform){\n\t\treturn this._row.getData(transform);\n\t}\n\n\tgetElement(){\n\t\treturn this._row.getElement();\n\t}\n\n\tgetTable(){\n\t\treturn this._row.table;\n\t}\n\n\tgetCells(){\n\t\tvar cells = [];\n\n\t\tthis._row.getCells().forEach(function(cell){\n\t\t\tcells.push(cell.getComponent());\n\t\t});\n\n\t\treturn cells;\n\t}\n\n\tgetCell(column){\n\t\tvar cell = this._row.getCell(column);\n\t\treturn cell ? cell.getComponent() : false;\n\t}\n\n\t_getSelf(){\n\t\treturn this._row;\n\t}\n}\n\nexport default CalcComponent;","//public cell object\nexport default class CellComponent {\n\n\tconstructor (cell){\n\t\tthis._cell = cell;\n\n\t\treturn new Proxy(this, {\n\t\t\tget: function(target, name, receiver) {\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\n\t\t\t\t\treturn target[name];\n\t\t\t\t}else{\n\t\t\t\t\treturn target._cell.table.componentFunctionBinder.handle(\"cell\", target._cell, name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tgetValue(){\n\t\treturn this._cell.getValue();\n\t}\n\n\tgetOldValue(){\n\t\treturn this._cell.getOldValue();\n\t}\n\n\tgetInitialValue(){\n\t\treturn this._cell.initialValue;\n\t}\n\n\tgetElement(){\n\t\treturn this._cell.getElement();\n\t}\n\n\tgetRow(){\n\t\treturn this._cell.row.getComponent();\n\t}\n\n\tgetData(){\n\t\treturn this._cell.row.getData();\n\t}\n\n\tgetField(){\n\t\treturn this._cell.column.getField();\n\t}\n\n\tgetColumn(){\n\t\treturn this._cell.column.getComponent();\n\t}\n\n\tsetValue(value, mutate){\n\t\tif(typeof mutate == \"undefined\"){\n\t\t\tmutate = true;\n\t\t}\n\n\t\tthis._cell.setValue(value, mutate);\n\t}\n\n\trestoreOldValue(){\n\t\tthis._cell.setValueActual(this._cell.getOldValue());\n\t}\n\n\trestoreInitialValue(){\n\t\tthis._cell.setValueActual(this._cell.initialValue);\n\t}\n\n\tcheckHeight(){\n\t\tthis._cell.checkHeight();\n\t}\n\n\tgetTable(){\n\t\treturn this._cell.table;\n\t}\n\n\t_getSelf(){\n\t\treturn this._cell;\n\t}\n}","import CoreFeature from '../CoreFeature.js';\nimport CellComponent from './CellComponent.js';\n\nexport default class Cell extends CoreFeature{\n\tconstructor(column, row){\n\t\tsuper(column.table);\n\n\t\tthis.table = column.table;\n\t\tthis.column = column;\n\t\tthis.row = row;\n\t\tthis.element = null;\n\t\tthis.value = null;\n\t\tthis.initialValue;\n\t\tthis.oldValue = null;\n\t\tthis.modules = {};\n\n\t\tthis.height = null;\n\t\tthis.width = null;\n\t\tthis.minWidth = null;\n\n\t\tthis.component = null;\n\n\t\tthis.loaded = false; //track if the cell has been added to the DOM yet\n\n\t\tthis.build();\n\t}\n\n\t//////////////// Setup Functions /////////////////\n\t//generate element\n\tbuild(){\n\t\tthis.generateElement();\n\n\t\tthis.setWidth();\n\n\t\tthis._configureCell();\n\n\t\tthis.setValueActual(this.column.getFieldValue(this.row.data));\n\n\t\tthis.initialValue = this.value;\n\t}\n\n\tgenerateElement(){\n\t\tthis.element = document.createElement('div');\n\t\tthis.element.className = \"tabulator-cell\";\n\t\tthis.element.setAttribute(\"role\", \"gridcell\");\n\t}\n\n\t_configureCell(){\n\t\tvar element = this.element,\n\t\tfield = this.column.getField(),\n\t\tvertAligns = {\n\t\t\ttop:\"flex-start\",\n\t\t\tbottom:\"flex-end\",\n\t\t\tmiddle:\"center\",\n\t\t},\n\t\thozAligns = {\n\t\t\tleft:\"flex-start\",\n\t\t\tright:\"flex-end\",\n\t\t\tcenter:\"center\",\n\t\t};\n\n\t\t//set text alignment\n\t\telement.style.textAlign = this.column.hozAlign;\n\n\t\tif(this.column.vertAlign){\n\t\t\telement.style.display = \"inline-flex\";\n\n\t\t\telement.style.alignItems = vertAligns[this.column.vertAlign] || \"\";\n\n\t\t\tif(this.column.hozAlign){\n\t\t\t\telement.style.justifyContent = hozAligns[this.column.hozAlign] || \"\";\n\t\t\t}\n\t\t}\n\n\t\tif(field){\n\t\t\telement.setAttribute(\"tabulator-field\", field);\n\t\t}\n\n\t\t//add class to cell if needed\n\t\tif(this.column.definition.cssClass){\n\t\t\tvar classNames = this.column.definition.cssClass.split(\" \");\n\t\t\tclassNames.forEach((className) => {\n\t\t\t\telement.classList.add(className);\n\t\t\t});\n\t\t}\n\n\t\tthis.dispatch(\"cell-init\", this);\n\n\t\t//hide cell if not visible\n\t\tif(!this.column.visible){\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\t//generate cell contents\n\t_generateContents(){\n\t\tvar val;\n\n\t\tval = this.chain(\"cell-format\", this, null, () => {\n\t\t\treturn this.element.innerHTML = this.value;\n\t\t});\n\n\t\tswitch(typeof val){\n\t\t\tcase \"object\":\n\t\t\t\tif(val instanceof Node){\n\n\t\t\t\t\t//clear previous cell contents\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\n\t\t\t\t\tthis.element.appendChild(val);\n\t\t\t\t}else{\n\t\t\t\t\tthis.element.innerHTML = \"\";\n\n\t\t\t\t\tif(val != null){\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"undefined\":\n\t\t\t\tthis.element.innerHTML = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.element.innerHTML = val;\n\t\t}\n\t}\n\n\tcellRendered(){\n\t\tthis.dispatch(\"cell-rendered\", this);\n\t}\n\n\t//////////////////// Getters ////////////////////\n\tgetElement(containerOnly){\n\t\tif(!this.loaded){\n\t\t\tthis.loaded = true;\n\t\t\tif(!containerOnly){\n\t\t\t\tthis.layoutElement();\n\t\t\t}\n\t\t}\n\n\t\treturn this.element;\n\t}\n\n\tgetValue(){\n\t\treturn this.value;\n\t}\n\n\tgetOldValue(){\n\t\treturn this.oldValue;\n\t}\n\n\t//////////////////// Actions ////////////////////\n\tsetValue(value, mutate, force){\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\n\n\t\tif(changed){\n\t\t\tthis.dispatch(\"cell-value-updated\", this);\n\n\t\t\tthis.cellRendered();\n\n\t\t\tif(this.column.definition.cellEdited){\n\t\t\t\tthis.column.definition.cellEdited.call(this.table, this.getComponent());\n\t\t\t}\n\n\t\t\tthis.dispatchExternal(\"cellEdited\", this.getComponent());\n\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\n\t\t\t}\n\t\t}\n\t}\n\n\tsetValueProcessData(value, mutate, force){\n\t\tvar changed = false;\n\n\t\tif(this.value !== value || force){\n\n\t\t\tchanged = true;\n\n\t\t\tif(mutate){\n\t\t\t\tvalue = this.chain(\"cell-value-changing\", [this, value], null, value);\n\t\t\t}\n\t\t}\n\n\t\tthis.setValueActual(value);\n\n\t\tif(changed){\n\t\t\tthis.dispatch(\"cell-value-changed\", this);\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\tsetValueActual(value){\n\t\tthis.oldValue = this.value;\n\n\t\tthis.value = value;\n\n\t\tthis.dispatch(\"cell-value-save-before\", this);\n\n\t\tthis.column.setFieldValue(this.row.data, value);\n\n\t\tthis.dispatch(\"cell-value-save-after\", this);\n\n\t\tif(this.loaded){\n\t\t\tthis.layoutElement();\n\t\t}\n\t}\n\n\tlayoutElement(){\n\t\tthis._generateContents();\n\n\t\tthis.dispatch(\"cell-layout\", this);\n\t}\n\n\tsetWidth(){\n\t\tthis.width = this.column.width;\n\t\tthis.element.style.width = this.column.widthStyled;\n\t}\n\n\tclearWidth(){\n\t\tthis.width = \"\";\n\t\tthis.element.style.width = \"\";\n\t}\n\n\tgetWidth(){\n\t\treturn this.width || this.element.offsetWidth;\n\t}\n\n\tsetMinWidth(){\n\t\tthis.minWidth = this.column.minWidth;\n\t\tthis.element.style.minWidth = this.column.minWidthStyled;\n\t}\n\n\tsetMaxWidth(){\n\t\tthis.maxWidth = this.column.maxWidth;\n\t\tthis.element.style.maxWidth = this.column.maxWidthStyled;\n\t}\n\n\tcheckHeight(){\n\t\t// var height = this.element.css(\"height\");\n\t\tthis.row.reinitializeHeight();\n\t}\n\n\tclearHeight(){\n\t\tthis.element.style.height = \"\";\n\t\tthis.height = null;\n\n\t\tthis.dispatch(\"cell-height\", this, \"\");\n\t}\n\n\tsetHeight(){\n\t\tthis.height = this.row.height;\n\t\tthis.element.style.height = this.row.heightStyled;\n\n\t\tthis.dispatch(\"cell-height\", this, this.row.heightStyled);\n\t}\n\n\tgetHeight(){\n\t\treturn this.height || this.element.offsetHeight;\n\t}\n\n\tshow(){\n\t\tthis.element.style.display = this.column.vertAlign ? \"inline-flex\" : \"\";\n\t}\n\n\thide(){\n\t\tthis.element.style.display = \"none\";\n\t}\n\n\tdelete(){\n\t\tthis.dispatch(\"cell-delete\", this);\n\n\t\tif(!this.table.rowManager.redrawBlock && this.element.parentNode){\n\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t}\n\n\t\tthis.element = false;\n\t\tthis.column.deleteCell(this);\n\t\tthis.row.deleteCell(this);\n\t\tthis.calcs = {};\n\t}\n\n\tgetIndex(){\n\t\treturn this.row.getCellIndex(this);\n\t}\n\n\t//////////////// Object Generation /////////////////\n\tgetComponent(){\n\t\tif(!this.component){\n\t\t\tthis.component = new CellComponent(this);\n\t\t}\n\n\t\treturn this.component;\n\t}\n}\n","import Column from './Column.js';\n\n//public column object\nexport default class ColumnComponent {\n\tconstructor (column){\n\t\tthis._column = column;\n\t\tthis.type = \"ColumnComponent\";\n\n\t\treturn new Proxy(this, {\n\t\t\tget: function(target, name, receiver) {\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\n\t\t\t\t\treturn target[name];\n\t\t\t\t}else{\n\t\t\t\t\treturn target._column.table.componentFunctionBinder.handle(\"column\", target._column, name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tgetElement(){\n\t\treturn this._column.getElement();\n\t}\n\n\tgetDefinition(){\n\t\treturn this._column.getDefinition();\n\t}\n\n\tgetField(){\n\t\treturn this._column.getField();\n\t}\n\n\tgetTitleDownload() {\n\t\treturn this._column.getTitleDownload();\n\t}\n\n\tgetCells(){\n\t\tvar cells = [];\n\n\t\tthis._column.cells.forEach(function(cell){\n\t\t\tcells.push(cell.getComponent());\n\t\t});\n\n\t\treturn cells;\n\t}\n\n\tisVisible(){\n\t\treturn this._column.visible;\n\t}\n\n\tshow(){\n\t\tif(this._column.isGroup){\n\t\t\tthis._column.columns.forEach(function(column){\n\t\t\t\tcolumn.show();\n\t\t\t});\n\t\t}else{\n\t\t\tthis._column.show();\n\t\t}\n\t}\n\n\thide(){\n\t\tif(this._column.isGroup){\n\t\t\tthis._column.columns.forEach(function(column){\n\t\t\t\tcolumn.hide();\n\t\t\t});\n\t\t}else{\n\t\t\tthis._column.hide();\n\t\t}\n\t}\n\n\ttoggle(){\n\t\tif(this._column.visible){\n\t\t\tthis.hide();\n\t\t}else{\n\t\t\tthis.show();\n\t\t}\n\t}\n\n\tdelete(){\n\t\treturn this._column.delete();\n\t}\n\n\tgetSubColumns(){\n\t\tvar output = [];\n\n\t\tif(this._column.columns.length){\n\t\t\tthis._column.columns.forEach(function(column){\n\t\t\t\toutput.push(column.getComponent());\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tgetParentColumn(){\n\t\treturn this._column.parent instanceof Column ? this._column.parent.getComponent() : false;\n\t}\n\n\t_getSelf(){\n\t\treturn this._column;\n\t}\n\n\tscrollTo(){\n\t\treturn this._column.table.columnManager.scrollToColumn(this._column);\n\t}\n\n\tgetTable(){\n\t\treturn this._column.table;\n\t}\n\n\tmove(to, after){\n\t\tvar toColumn = this._column.table.columnManager.findColumn(to);\n\n\t\tif(toColumn){\n\t\t\tthis._column.table.columnManager.moveColumn(this._column, toColumn, after);\n\t\t}else{\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\n\t\t}\n\t}\n\n\tgetNextColumn(){\n\t\tvar nextCol = this._column.nextColumn();\n\n\t\treturn nextCol ? nextCol.getComponent() : false;\n\t}\n\n\tgetPrevColumn(){\n\t\tvar prevCol = this._column.prevColumn();\n\n\t\treturn prevCol ? prevCol.getComponent() : false;\n\t}\n\n\tupdateDefinition(updates){\n\t\treturn this._column.updateDefinition(updates);\n\t}\n\n\tgetWidth(){\n\t\treturn this._column.getWidth();\n\t}\n\n\tsetWidth(width){\n\t\tvar result;\n\n\t\tif(width === true){\n\t\t\tresult = this._column.reinitializeWidth(true);\n\t\t}else{\n\t\t\tresult = this._column.setWidth(width);\n\t\t}\n\n\t\tthis._column.table.columnManager.rerenderColumns(true);\n\n\t\treturn result;\n\t}\n}","export default {\n\t\"title\": undefined,\n\t\"field\": undefined,\n\t\"columns\": undefined,\n\t\"visible\": undefined,\n\t\"hozAlign\": undefined,\n\t\"vertAlign\": undefined,\n\t\"width\": undefined,\n\t\"minWidth\": 40,\n\t\"maxWidth\": undefined,\n\t\"maxInitialWidth\": undefined,\n\t\"cssClass\": undefined,\n\t\"variableHeight\": undefined,\n\t\"headerVertical\": undefined,\n\t\"headerHozAlign\": undefined,\n\t\"headerWordWrap\": false,\n\t\"editableTitle\": undefined,\n};","import CoreFeature from '../CoreFeature.js';\nimport ColumnComponent from './ColumnComponent.js';\nimport defaultOptions from './defaults/options.js';\n\nimport Cell from '../cell/Cell.js';\n\nclass Column extends CoreFeature{\n\n\tconstructor(def, parent){\n\t\tsuper(parent.table);\n\n\t\tthis.definition = def; //column definition\n\t\tthis.parent = parent; //hold parent object\n\t\tthis.type = \"column\"; //type of element\n\t\tthis.columns = []; //child columns\n\t\tthis.cells = []; //cells bound to this column\n\t\tthis.element = this.createElement(); //column header element\n\t\tthis.contentElement = false;\n\t\tthis.titleHolderElement = false;\n\t\tthis.titleElement = false;\n\t\tthis.groupElement = this.createGroupElement(); //column group holder element\n\t\tthis.isGroup = false;\n\t\tthis.hozAlign = \"\"; //horizontal text alignment\n\t\tthis.vertAlign = \"\"; //vert text alignment\n\n\t\t//multi dimensional filed handling\n\t\tthis.field =\"\";\n\t\tthis.fieldStructure = \"\";\n\t\tthis.getFieldValue = \"\";\n\t\tthis.setFieldValue = \"\";\n\n\t\tthis.titleDownload = null;\n\t\tthis.titleFormatterRendered = false;\n\n\t\tthis.mapDefinitions();\n\n\t\tthis.setField(this.definition.field);\n\n\t\tthis.modules = {}; //hold module variables;\n\n\t\tthis.width = null; //column width\n\t\tthis.widthStyled = \"\"; //column width pre-styled to improve render efficiency\n\t\tthis.maxWidth = null; //column maximum width\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled to improve render efficiency\n\t\tthis.maxInitialWidth = null;\n\t\tthis.minWidth = null; //column minimum width\n\t\tthis.minWidthStyled = \"\"; //column minimum pre-styled to improve render efficiency\n\t\tthis.widthFixed = false; //user has specified a width for this column\n\n\t\tthis.visible = true; //default visible state\n\n\t\tthis.component = null;\n\n\t\t//initialize column\n\t\tif(this.definition.columns){\n\n\t\t\tthis.isGroup = true;\n\n\t\t\tthis.definition.columns.forEach((def, i) => {\n\t\t\t\tvar newCol = new Column(def, this);\n\t\t\t\tthis.attachColumn(newCol);\n\t\t\t});\n\n\t\t\tthis.checkColumnVisibility();\n\t\t}else{\n\t\t\tparent.registerColumnField(this);\n\t\t}\n\n\t\tthis._initialize();\n\t}\n\n\tcreateElement (){\n\t\tvar el = document.createElement(\"div\");\n\n\t\tel.classList.add(\"tabulator-col\");\n\t\tel.setAttribute(\"role\", \"columnheader\");\n\t\tel.setAttribute(\"aria-sort\", \"none\");\n\n\t\tswitch(this.table.options.columnHeaderVertAlign){\n\t\t\tcase \"middle\":\n\t\t\t\tel.style.justifyContent = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\tel.style.justifyContent = \"flex-end\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn el;\n\t}\n\n\tcreateGroupElement (){\n\t\tvar el = document.createElement(\"div\");\n\n\t\tel.classList.add(\"tabulator-col-group-cols\");\n\n\t\treturn el;\n\t}\n\n\tmapDefinitions(){\n\t\tvar defaults = this.table.options.columnDefaults;\n\n\t\t//map columnDefaults onto column definitions\n\t\tif(defaults){\n\t\t\tfor(let key in defaults){\n\t\t\t\tif(typeof this.definition[key] === \"undefined\"){\n\t\t\t\t\tthis.definition[key] = defaults[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.definition = this.table.columnManager.optionsList.generate(Column.defaultOptionList, this.definition);\n\t}\n\n\tcheckDefinition(){\n\t\tObject.keys(this.definition).forEach((key) => {\n\t\t\tif(Column.defaultOptionList.indexOf(key) === -1){\n\t\t\t\tconsole.warn(\"Invalid column definition option in '\" + (this.field || this.definition.title) + \"' column:\", key);\n\t\t\t}\n\t\t});\n\t}\n\n\tsetField(field){\n\t\tthis.field = field;\n\t\tthis.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : [];\n\t\tthis.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData;\n\t\tthis.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData;\n\t}\n\n\t//register column position with column manager\n\tregisterColumnPosition(column){\n\t\tthis.parent.registerColumnPosition(column);\n\t}\n\n\t//register column position with column manager\n\tregisterColumnField(column){\n\t\tthis.parent.registerColumnField(column);\n\t}\n\n\t//trigger position registration\n\treRegisterPosition(){\n\t\tif(this.isGroup){\n\t\t\tthis.columns.forEach(function(column){\n\t\t\t\tcolumn.reRegisterPosition();\n\t\t\t});\n\t\t}else{\n\t\t\tthis.registerColumnPosition(this);\n\t\t}\n\t}\n\n\t//build header element\n\t_initialize(){\n\t\tvar def = this.definition;\n\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\n\t\tif(def.headerVertical){\n\t\t\tthis.element.classList.add(\"tabulator-col-vertical\");\n\n\t\t\tif(def.headerVertical === \"flip\"){\n\t\t\t\tthis.element.classList.add(\"tabulator-col-vertical-flip\");\n\t\t\t}\n\t\t}\n\n\t\tthis.contentElement = this._buildColumnHeaderContent();\n\n\t\tthis.element.appendChild(this.contentElement);\n\n\t\tif(this.isGroup){\n\t\t\tthis._buildGroupHeader();\n\t\t}else{\n\t\t\tthis._buildColumnHeader();\n\t\t}\n\n\t\tthis.dispatch(\"column-init\", this);\n\t}\n\n\t//build header element for header\n\t_buildColumnHeader(){\n\t\tvar def = this.definition;\n\n\t\tthis.dispatch(\"column-layout\", this);\n\n\t\t//set column visibility\n\t\tif(typeof def.visible != \"undefined\"){\n\t\t\tif(def.visible){\n\t\t\t\tthis.show(true);\n\t\t\t}else{\n\t\t\t\tthis.hide(true);\n\t\t\t}\n\t\t}\n\n\t\t//assign additional css classes to column header\n\t\tif(def.cssClass){\n\t\t\tvar classNames = def.cssClass.split(\" \");\n\t\t\tclassNames.forEach((className) => {\n\t\t\t\tthis.element.classList.add(className);\n\t\t\t});\n\t\t}\n\n\t\tif(def.field){\n\t\t\tthis.element.setAttribute(\"tabulator-field\", def.field);\n\t\t}\n\n\t\t//set min width if present\n\t\tthis.setMinWidth(parseInt(def.minWidth));\n\n\t\tif (def.maxInitialWidth) {\n\t\t\tthis.maxInitialWidth = parseInt(def.maxInitialWidth);\n\t\t}\n\t\t\n\t\tif(def.maxWidth){\n\t\t\tthis.setMaxWidth(parseInt(def.maxWidth));\n\t\t}\n\n\t\tthis.reinitializeWidth();\n\n\t\t//set horizontal text alignment\n\t\tthis.hozAlign = this.definition.hozAlign;\n\t\tthis.vertAlign = this.definition.vertAlign;\n\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\n\t}\n\n\t_buildColumnHeaderContent(){\n\t\tvar contentElement = document.createElement(\"div\");\n\t\tcontentElement.classList.add(\"tabulator-col-content\");\n\n\t\tthis.titleHolderElement = document.createElement(\"div\");\n\t\tthis.titleHolderElement.classList.add(\"tabulator-col-title-holder\");\n\n\t\tcontentElement.appendChild(this.titleHolderElement);\n\n\t\tthis.titleElement = this._buildColumnHeaderTitle();\n\n\t\tthis.titleHolderElement.appendChild(this.titleElement);\n\n\t\treturn contentElement;\n\t}\n\n\t//build title element of column\n\t_buildColumnHeaderTitle(){\n\t\tvar def = this.definition;\n\n\t\tvar titleHolderElement = document.createElement(\"div\");\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\n\t\t\n\t\tif(def.headerWordWrap){\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\n\t\t}\n\n\t\tif(def.editableTitle){\n\t\t\tvar titleElement = document.createElement(\"input\");\n\t\t\ttitleElement.classList.add(\"tabulator-title-editor\");\n\n\t\t\ttitleElement.addEventListener(\"click\", (e) => {\n\t\t\t\te.stopPropagation();\n\t\t\t\ttitleElement.focus();\n\t\t\t});\n\n\t\t\ttitleElement.addEventListener(\"change\", () => {\n\t\t\t\tdef.title = titleElement.value;\n\t\t\t\tthis.dispatchExternal(\"columnTitleChanged\", this.getComponent());\n\t\t\t});\n\n\t\t\ttitleHolderElement.appendChild(titleElement);\n\n\t\t\tif(def.field){\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\n\t\t\t\t\ttitleElement.value = text || (def.title || \" \");\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\ttitleElement.value = def.title || \" \";\n\t\t\t}\n\n\t\t}else{\n\t\t\tif(def.field){\n\t\t\t\tthis.langBind(\"columns|\" + def.field, (text) => {\n\t\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, text || (def.title || \" \"));\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tthis._formatColumnHeaderTitle(titleHolderElement, def.title || \" \");\n\t\t\t}\n\t\t}\n\n\t\treturn titleHolderElement;\n\t}\n\n\t_formatColumnHeaderTitle(el, title){\n\t\tvar contents = this.chain(\"column-format\", [this, title, el], null, () => {\n\t\t\treturn title;\n\t\t});\n\n\t\tswitch(typeof contents){\n\t\t\tcase \"object\":\n\t\t\t\tif(contents instanceof Node){\n\t\t\t\t\tel.appendChild(contents);\n\t\t\t\t}else{\n\t\t\t\t\tel.innerHTML = \"\";\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"undefined\":\n\t\t\t\tel.innerHTML = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tel.innerHTML = contents;\n\t\t}\n\t}\n\n\t//build header element for column group\n\t_buildGroupHeader(){\n\t\tthis.element.classList.add(\"tabulator-col-group\");\n\t\tthis.element.setAttribute(\"role\", \"columngroup\");\n\t\tthis.element.setAttribute(\"aria-title\", this.definition.title);\n\n\t\t//asign additional css classes to column header\n\t\tif(this.definition.cssClass){\n\t\t\tvar classNames = this.definition.cssClass.split(\" \");\n\t\t\tclassNames.forEach((className) => {\n\t\t\t\tthis.element.classList.add(className);\n\t\t\t});\n\t\t}\n\n\t\tthis.titleElement.style.textAlign = this.definition.headerHozAlign;\n\n\t\tthis.element.appendChild(this.groupElement);\n\t}\n\n\t//flat field lookup\n\t_getFlatData(data){\n\t\treturn data[this.field];\n\t}\n\n\t//nested field lookup\n\t_getNestedData(data){\n\t\tvar dataObj = data,\n\t\tstructure = this.fieldStructure,\n\t\tlength = structure.length,\n\t\toutput;\n\n\t\tfor(let i = 0; i < length; i++){\n\n\t\t\tdataObj = dataObj[structure[i]];\n\n\t\t\toutput = dataObj;\n\n\t\t\tif(!dataObj){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t}\n\n\t//flat field set\n\t_setFlatData(data, value){\n\t\tif(this.field){\n\t\t\tdata[this.field] = value;\n\t\t}\n\t}\n\n\t//nested field set\n\t_setNestedData(data, value){\n\t\tvar dataObj = data,\n\t\tstructure = this.fieldStructure,\n\t\tlength = structure.length;\n\n\t\tfor(let i = 0; i < length; i++){\n\n\t\t\tif(i == length -1){\n\t\t\t\tdataObj[structure[i]] = value;\n\t\t\t}else{\n\t\t\t\tif(!dataObj[structure[i]]){\n\t\t\t\t\tif(typeof value !== \"undefined\"){\n\t\t\t\t\t\tdataObj[structure[i]] = {};\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdataObj = dataObj[structure[i]];\n\t\t\t}\n\t\t}\n\t}\n\n\t//attach column to this group\n\tattachColumn(column){\n\t\tif(this.groupElement){\n\t\t\tthis.columns.push(column);\n\t\t\tthis.groupElement.appendChild(column.getElement());\n\n\t\t\tcolumn.columnRendered();\n\t\t}else{\n\t\t\tconsole.warn(\"Column Warning - Column being attached to another column instead of column group\");\n\t\t}\n\t}\n\n\t//vertically align header in column\n\tverticalAlign(alignment, height){\n\n\t\t//calculate height of column header and group holder element\n\t\tvar parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight);\n\t\t// var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight;\n\n\t\tthis.element.style.height = parentHeight + \"px\";\n\n\t\tthis.dispatch(\"column-height\", this, this.element.style.height);\n\n\t\tif(this.isGroup){\n\t\t\tthis.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + \"px\";\n\t\t}\n\n\t\t//vertically align cell contents\n\t\t// if(!this.isGroup && alignment !== \"top\"){\n\t\t// \tif(alignment === \"bottom\"){\n\t\t// \t\tthis.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + \"px\";\n\t\t// \t}else{\n\t\t// \t\tthis.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + \"px\";\n\t\t// \t}\n\t\t// }\n\n\t\tthis.columns.forEach(function(column){\n\t\t\tcolumn.verticalAlign(alignment);\n\t\t});\n\t}\n\n\t//clear vertical alignment\n\tclearVerticalAlign(){\n\t\tthis.element.style.paddingTop = \"\";\n\t\tthis.element.style.height = \"\";\n\t\tthis.element.style.minHeight = \"\";\n\t\tthis.groupElement.style.minHeight = \"\";\n\n\t\tthis.columns.forEach(function(column){\n\t\t\tcolumn.clearVerticalAlign();\n\t\t});\n\n\t\tthis.dispatch(\"column-height\", this, \"\");\n\t}\n\n\t//// Retrieve Column Information ////\n\t//return column header element\n\tgetElement(){\n\t\treturn this.element;\n\t}\n\n\t//return column group element\n\tgetGroupElement(){\n\t\treturn this.groupElement;\n\t}\n\n\t//return field name\n\tgetField(){\n\t\treturn this.field;\n\t}\n\n\tgetTitleDownload() {\n\t\treturn this.titleDownload;\n\t}\n\n\t//return the first column in a group\n\tgetFirstColumn(){\n\t\tif(!this.isGroup){\n\t\t\treturn this;\n\t\t}else{\n\t\t\tif(this.columns.length){\n\t\t\t\treturn this.columns[0].getFirstColumn();\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t//return the last column in a group\n\tgetLastColumn(){\n\t\tif(!this.isGroup){\n\t\t\treturn this;\n\t\t}else{\n\t\t\tif(this.columns.length){\n\t\t\t\treturn this.columns[this.columns.length -1].getLastColumn();\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t//return all columns in a group\n\tgetColumns(traverse){\n\t\tvar columns = [];\n\n\t\tif(traverse){\n\t\t\tthis.columns.forEach((column) => {\n\t\t\t\tcolumns.push(column);\n\t\t\t\t\t\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\n\t\t\t});\n\t\t}else{\n\t\t\tcolumns = this.columns;\n\t\t}\n\t\t\n\t\treturn columns;\n\t}\n\n\t//return all columns in a group\n\tgetCells(){\n\t\treturn this.cells;\n\t}\n\n\t//retrieve the top column in a group of columns\n\tgetTopColumn(){\n\t\tif(this.parent.isGroup){\n\t\t\treturn this.parent.getTopColumn();\n\t\t}else{\n\t\t\treturn this;\n\t\t}\n\t}\n\n\t//return column definition object\n\tgetDefinition(updateBranches){\n\t\tvar colDefs = [];\n\n\t\tif(this.isGroup && updateBranches){\n\t\t\tthis.columns.forEach(function(column){\n\t\t\t\tcolDefs.push(column.getDefinition(true));\n\t\t\t});\n\n\t\t\tthis.definition.columns = colDefs;\n\t\t}\n\n\t\treturn this.definition;\n\t}\n\n\t//////////////////// Actions ////////////////////\n\tcheckColumnVisibility(){\n\t\tvar visible = false;\n\n\t\tthis.columns.forEach(function(column){\n\t\t\tif(column.visible){\n\t\t\t\tvisible = true;\n\t\t\t}\n\t\t});\n\n\t\tif(visible){\n\t\t\tthis.show();\n\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\n\t\t}else{\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\t//show column\n\tshow(silent, responsiveToggle){\n\t\tif(!this.visible){\n\t\t\tthis.visible = true;\n\n\t\t\tthis.element.style.display = \"\";\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.checkColumnVisibility();\n\t\t\t}\n\n\t\t\tthis.cells.forEach(function(cell){\n\t\t\t\tcell.show();\n\t\t\t});\n\n\t\t\tif(!this.isGroup && this.width === null){\n\t\t\t\tthis.reinitializeWidth();\n\t\t\t}\n\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\n\n\t\t\tthis.dispatch(\"column-show\", this, responsiveToggle);\n\n\t\t\tif(!silent){\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), true);\n\t\t\t}\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.matchChildWidths();\n\t\t\t}\n\n\t\t\tif(!this.silent){\n\t\t\t\tthis.table.columnManager.rerenderColumns();\n\t\t\t}\n\t\t}\n\t}\n\n\t//hide column\n\thide(silent, responsiveToggle){\n\t\tif(this.visible){\n\t\t\tthis.visible = false;\n\n\t\t\tthis.element.style.display = \"none\";\n\n\t\t\tthis.table.columnManager.verticalAlignHeaders();\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.checkColumnVisibility();\n\t\t\t}\n\n\t\t\tthis.cells.forEach(function(cell){\n\t\t\t\tcell.hide();\n\t\t\t});\n\n\t\t\tthis.dispatch(\"column-hide\", this, responsiveToggle);\n\n\t\t\tif(!silent){\n\t\t\t\tthis.dispatchExternal(\"columnVisibilityChanged\", this.getComponent(), false);\n\t\t\t}\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.matchChildWidths();\n\t\t\t}\n\n\t\t\tif(!this.silent){\n\t\t\t\tthis.table.columnManager.rerenderColumns();\n\t\t\t}\n\t\t}\n\t}\n\n\tmatchChildWidths(){\n\t\tvar childWidth = 0;\n\n\t\tif(this.contentElement && this.columns.length){\n\t\t\tthis.columns.forEach(function(column){\n\t\t\t\tif(column.visible){\n\t\t\t\t\tchildWidth += column.getWidth();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.contentElement.style.maxWidth = (childWidth - 1) + \"px\";\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.matchChildWidths();\n\t\t\t}\n\t\t}\n\t}\n\n\tremoveChild(child){\n\t\tvar index = this.columns.indexOf(child);\n\n\t\tif(index > -1){\n\t\t\tthis.columns.splice(index, 1);\n\t\t}\n\n\t\tif(!this.columns.length){\n\t\t\tthis.delete();\n\t\t}\n\t}\n\n\tsetWidth(width){\n\t\tthis.widthFixed = true;\n\t\tthis.setWidthActual(width);\n\t}\n\n\tsetWidthActual(width){\n\t\tif(isNaN(width)){\n\t\t\twidth = Math.floor((this.table.element.clientWidth/100) * parseInt(width));\n\t\t}\n\n\t\twidth = Math.max(this.minWidth, width);\n\n\t\tif(this.maxWidth){\n\t\t\twidth = Math.min(this.maxWidth, width);\n\t\t}\n\n\t\tthis.width = width;\n\t\tthis.widthStyled = width ? width + \"px\" : \"\";\n\n\t\tthis.element.style.width = this.widthStyled;\n\n\t\tif(!this.isGroup){\n\t\t\tthis.cells.forEach(function(cell){\n\t\t\t\tcell.setWidth();\n\t\t\t});\n\t\t}\n\n\t\tif(this.parent.isGroup){\n\t\t\tthis.parent.matchChildWidths();\n\t\t}\n\n\t\tthis.dispatch(\"column-width\", this);\n\t}\n\n\tcheckCellHeights(){\n\t\tvar rows = [];\n\n\t\tthis.cells.forEach(function(cell){\n\t\t\tif(cell.row.heightInitialized){\n\t\t\t\tif(cell.row.getElement().offsetParent !== null){\n\t\t\t\t\trows.push(cell.row);\n\t\t\t\t\tcell.row.clearCellHeight();\n\t\t\t\t}else{\n\t\t\t\t\tcell.row.heightInitialized = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\trows.forEach(function(row){\n\t\t\trow.calcHeight();\n\t\t});\n\n\t\trows.forEach(function(row){\n\t\t\trow.setCellHeight();\n\t\t});\n\t}\n\n\tgetWidth(){\n\t\tvar width = 0;\n\n\t\tif(this.isGroup){\n\t\t\tthis.columns.forEach(function(column){\n\t\t\t\tif(column.visible){\n\t\t\t\t\twidth += column.getWidth();\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\twidth = this.width;\n\t\t}\n\n\t\treturn width;\n\t}\n\n\tgetLeftOffset(){\n\t\tvar offset = this.element.offsetLeft;\n\n\t\tif(this.parent.isGroup){\n\t\t\toffset += this.parent.getLeftOffset();\n\t\t}\n\n\t\treturn offset;\n\t}\n\n\tgetHeight(){\n\t\treturn Math.ceil(this.element.getBoundingClientRect().height);\n\t}\n\n\tsetMinWidth(minWidth){\n\t\tif(this.maxWidth && minWidth > this.maxWidth){\n\t\t\tminWidth = this.maxWidth;\n\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\n\t\t}\n\n\t\tthis.minWidth = minWidth;\n\t\tthis.minWidthStyled = minWidth ? minWidth + \"px\" : \"\";\n\n\t\tthis.element.style.minWidth = this.minWidthStyled;\n\n\t\tthis.cells.forEach(function(cell){\n\t\t\tcell.setMinWidth();\n\t\t});\n\t}\n\n\tsetMaxWidth(maxWidth){\n\t\tif(this.minWidth && maxWidth < this.minWidth){\n\t\t\tmaxWidth = this.minWidth;\n\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\n\t\t}\n\n\t\tthis.maxWidth = maxWidth;\n\t\tthis.maxWidthStyled = maxWidth ? maxWidth + \"px\" : \"\";\n\n\t\tthis.element.style.maxWidth = this.maxWidthStyled;\n\n\t\tthis.cells.forEach(function(cell){\n\t\t\tcell.setMaxWidth();\n\t\t});\n\t}\n\n\tdelete(){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif(this.isGroup){\n\t\t\t\tthis.columns.forEach(function(column){\n\t\t\t\t\tcolumn.delete();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.dispatch(\"column-delete\", this);\n\n\t\t\tvar cellCount = this.cells.length;\n\n\t\t\tfor(let i = 0; i < cellCount; i++){\n\t\t\t\tthis.cells[0].delete();\n\t\t\t}\n\n\t\t\tif(this.element.parentNode){\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t\t}\n\n\t\t\tthis.element = false;\n\t\t\tthis.contentElement = false;\n\t\t\tthis.titleElement = false;\n\t\t\tthis.groupElement = false;\n\n\t\t\tif(this.parent.isGroup){\n\t\t\t\tthis.parent.removeChild(this);\n\t\t\t}\n\n\t\t\tthis.table.columnManager.deregisterColumn(this);\n\n\t\t\tthis.table.columnManager.rerenderColumns(true);\n\n\t\t\tresolve();\n\t\t});\n\t}\n\n\tcolumnRendered(){\n\t\tif(this.titleFormatterRendered){\n\t\t\tthis.titleFormatterRendered();\n\t\t}\n\n\t\tthis.dispatch(\"column-rendered\", this);\n\t}\n\n\t//////////////// Cell Management /////////////////\n\t//generate cell for this column\n\tgenerateCell(row){\n\t\tvar cell = new Cell(this, row);\n\n\t\tthis.cells.push(cell);\n\n\t\treturn cell;\n\t}\n\n\tnextColumn(){\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\n\t\treturn index > -1 ? this._nextVisibleColumn(index + 1) : false;\n\t}\n\n\t_nextVisibleColumn(index){\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\n\t\treturn !column || column.visible ? column : this._nextVisibleColumn(index + 1);\n\t}\n\n\tprevColumn(){\n\t\tvar index = this.table.columnManager.findColumnIndex(this);\n\t\treturn index > -1 ? this._prevVisibleColumn(index - 1) : false;\n\t}\n\n\t_prevVisibleColumn(index){\n\t\tvar column = this.table.columnManager.getColumnByIndex(index);\n\t\treturn !column || column.visible ? column : this._prevVisibleColumn(index - 1);\n\t}\n\n\treinitializeWidth(force){\n\t\tthis.widthFixed = false;\n\n\t\t//set width if present\n\t\tif(typeof this.definition.width !== \"undefined\" && !force){\n\t\t\t// maxInitialWidth ignored here as width specified\n\t\t\tthis.setWidth(this.definition.width);\n\t\t}\n\n\t\tthis.dispatch(\"column-width-fit-before\", this);\n\n\t\tthis.fitToData(force);\n\n\t\tthis.dispatch(\"column-width-fit-after\", this);\n\t}\n\n\t//set column width to maximum cell width for non group columns\n\tfitToData(force){\n\t\tif(this.isGroup){\n\t\t\treturn;\n\t\t}\n\n\t\tif(!this.widthFixed){\n\t\t\tthis.element.style.width = \"\";\n\n\t\t\tthis.cells.forEach((cell) => {\n\t\t\t\tcell.clearWidth();\n\t\t\t});\n\t\t}\n\n\t\tvar maxWidth = this.element.offsetWidth;\n\n\t\tif(!this.width || !this.widthFixed){\n\t\t\tthis.cells.forEach((cell) => {\n\t\t\t\tvar width = cell.getWidth();\n\n\t\t\t\tif(width > maxWidth){\n\t\t\t\t\tmaxWidth = width;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif(maxWidth){\n\t\t\t\tvar setTo = maxWidth + 1;\n\t\t\t\tif (this.maxInitialWidth && !force) {\n\t\t\t\t\tsetTo = Math.min(setTo, this.maxInitialWidth);\n\t\t\t\t}\n\t\t\t\tthis.setWidthActual(setTo);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateDefinition(updates){\n\t\tvar definition;\n\n\t\tif(!this.isGroup){\n\t\t\tif(!this.parent.isGroup){\n\t\t\t\tdefinition = Object.assign({}, this.getDefinition());\n\t\t\t\tdefinition = Object.assign(definition, updates);\n\n\t\t\t\treturn this.table.columnManager.addColumn(definition, false, this)\n\t\t\t\t\t.then((column) => {\n\n\t\t\t\t\t\tif(definition.field == this.field){\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn this.delete()\n\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\treturn column.getComponent();\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\n\t\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.error(\"Column Update Error - The updateDefinition function is only available on ungrouped columns\");\n\t\t\treturn Promise.reject(\"Column Update Error - The updateDefinition function is only available on columns, not column groups\");\n\t\t}\n\t}\n\n\tdeleteCell(cell){\n\t\tvar index = this.cells.indexOf(cell);\n\n\t\tif(index > -1){\n\t\t\tthis.cells.splice(index, 1);\n\t\t}\n\t}\n\n\t//////////////// Object Generation /////////////////\n\tgetComponent(){\n\t\tif(!this.component){\n\t\t\tthis.component = new ColumnComponent(this);\n\t\t}\n\n\t\treturn this.component;\n\t}\n}\n\nColumn.defaultOptionList = defaultOptions;\n\nexport default Column;\n","//public row object\nexport default class RowComponent {\n\n\tconstructor (row){\n\t\tthis._row = row;\n\n\t\treturn new Proxy(this, {\n\t\t\tget: function(target, name, receiver) {\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\n\t\t\t\t\treturn target[name];\n\t\t\t\t}else{\n\t\t\t\t\treturn target._row.table.componentFunctionBinder.handle(\"row\", target._row, name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tgetData(transform){\n\t\treturn this._row.getData(transform);\n\t}\n\n\tgetElement(){\n\t\treturn this._row.getElement();\n\t}\n\n\tgetCells(){\n\t\tvar cells = [];\n\n\t\tthis._row.getCells().forEach(function(cell){\n\t\t\tcells.push(cell.getComponent());\n\t\t});\n\n\t\treturn cells;\n\t}\n\n\tgetCell(column){\n\t\tvar cell = this._row.getCell(column);\n\t\treturn cell ? cell.getComponent() : false;\n\t}\n\n\tgetIndex(){\n\t\treturn this._row.getData(\"data\")[this._row.table.options.index];\n\t}\n\n\tgetPosition(){\n\t\treturn this._row.getPosition();\n\t}\n\n\twatchPosition(callback){\n\t\treturn this._row.watchPosition(callback);\n\t}\n\n\tdelete(){\n\t\treturn this._row.delete();\n\t}\n\n\tscrollTo(){\n\t\treturn this._row.table.rowManager.scrollToRow(this._row);\n\t}\n\n\tmove(to, after){\n\t\tthis._row.moveToRow(to, after);\n\t}\n\n\tupdate(data){\n\t\treturn this._row.updateData(data);\n\t}\n\n\tnormalizeHeight(){\n\t\tthis._row.normalizeHeight(true);\n\t}\n\n\t_getSelf(){\n\t\treturn this._row;\n\t}\n\n\treformat(){\n\t\treturn this._row.reinitialize();\n\t}\n\n\tgetTable(){\n\t\treturn this._row.table;\n\t}\n\n\tgetNextRow(){\n\t\tvar row = this._row.nextRow();\n\t\treturn row ? row.getComponent() : row;\n\t}\n\n\tgetPrevRow(){\n\t\tvar row = this._row.prevRow();\n\t\treturn row ? row.getComponent() : row;\n\t}\n}","import CoreFeature from '../CoreFeature.js';\nimport RowComponent from './RowComponent.js';\nimport Helpers from '../tools/Helpers.js';\n\nexport default class Row extends CoreFeature{\n\tconstructor (data, parent, type = \"row\"){\n\t\tsuper(parent.table);\n\t\t\n\t\tthis.parent = parent;\n\t\tthis.data = {};\n\t\tthis.type = type; //type of element\n\t\tthis.element = false;\n\t\tthis.modules = {}; //hold module variables;\n\t\tthis.cells = [];\n\t\tthis.height = 0; //hold element height\n\t\tthis.heightStyled = \"\"; //hold element height pre-styled to improve render efficiency\n\t\tthis.manualHeight = false; //user has manually set row height\n\t\tthis.outerHeight = 0; //hold elements outer height\n\t\tthis.initialized = false; //element has been rendered\n\t\tthis.heightInitialized = false; //element has resized cells to fit\n\t\tthis.position = 0; //store position of element in row list\n\t\tthis.positionWatchers = [];\n\t\t\n\t\tthis.component = null;\n\t\t\n\t\tthis.created = false;\n\t\t\n\t\tthis.setData(data);\n\t}\n\t\n\tcreate(){\n\t\tif(!this.created){\n\t\t\tthis.created = true;\n\t\t\tthis.generateElement();\n\t\t}\n\t}\n\t\n\tcreateElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-row\");\n\t\tel.setAttribute(\"role\", \"row\");\n\t\t\n\t\tthis.element = el;\n\t}\n\t\n\tgetElement(){\n\t\tthis.create();\n\t\treturn this.element;\n\t}\n\t\n\tdetachElement(){\n\t\tif (this.element && this.element.parentNode){\n\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t}\n\t}\n\t\n\tgenerateElement(){\n\t\tthis.createElement();\n\t\tthis.dispatch(\"row-init\", this);\n\t}\n\t\n\tgenerateCells(){\n\t\tthis.cells = this.table.columnManager.generateCells(this);\n\t}\n\t\n\t//functions to setup on first render\n\tinitialize(force){\n\t\tthis.create();\n\t\t\n\t\tif(!this.initialized || force){\n\t\t\t\n\t\t\tthis.deleteCells();\n\t\t\t\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\t\t\t\n\t\t\tthis.dispatch(\"row-layout-before\", this);\n\t\t\t\n\t\t\tthis.generateCells();\n\t\t\t\n\t\t\tthis.initialized = true;\n\t\t\t\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\n\t\t\t\n\t\t\tif(force){\n\t\t\t\tthis.normalizeHeight();\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"row-layout\", this);\n\t\t\t\n\t\t\tif(this.table.options.rowFormatter){\n\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"row-layout-after\", this);\n\t\t}else{\n\t\t\tthis.table.columnManager.renderer.rerenderRowCells(this);\n\t\t}\n\t}\n\t\n\treinitializeHeight(){\n\t\tthis.heightInitialized = false;\n\t\t\n\t\tif(this.element && this.element.offsetParent !== null){\n\t\t\tthis.normalizeHeight(true);\n\t\t}\n\t}\n\n\tdeinitialize(){\n\t\tthis.initialized = false;\n\t}\n\t\n\tdeinitializeHeight(){\n\t\tthis.heightInitialized = false;\n\t}\n\t\n\treinitialize(children){\n\t\tthis.initialized = false;\n\t\tthis.heightInitialized = false;\n\t\t\n\t\tif(!this.manualHeight){\n\t\t\tthis.height = 0;\n\t\t\tthis.heightStyled = \"\";\n\t\t}\n\t\t\n\t\tif(this.element && this.element.offsetParent !== null){\n\t\t\tthis.initialize(true);\n\t\t}\n\t\t\n\t\tthis.dispatch(\"row-relayout\", this);\n\t}\n\t\n\t//get heights when doing bulk row style calcs in virtual DOM\n\tcalcHeight(force){\n\t\tvar maxHeight = 0,\n\t\tminHeight;\n\t\t\n\t\tif(this.table.options.rowHeight){\n\t\t\tthis.height = this.table.options.rowHeight;\n\t\t}else{\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\n\t\t\t\n\t\t\tthis.cells.forEach(function(cell){\n\t\t\t\tvar height = cell.getHeight();\n\t\t\t\tif(height > maxHeight){\n\t\t\t\t\tmaxHeight = height;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif(force){\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\n\t\t\t}else{\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\n\t\tthis.outerHeight = this.element.offsetHeight;\n\t}\n\t\n\t//set of cells\n\tsetCellHeight(){\n\t\tthis.cells.forEach(function(cell){\n\t\t\tcell.setHeight();\n\t\t});\n\t\t\n\t\tthis.heightInitialized = true;\n\t}\n\t\n\tclearCellHeight(){\n\t\tthis.cells.forEach(function(cell){\n\t\t\tcell.clearHeight();\n\t\t});\n\t}\n\t\n\t//normalize the height of elements in the row\n\tnormalizeHeight(force){\n\t\tif(force && !this.table.options.rowHeight){\n\t\t\tthis.clearCellHeight();\n\t\t}\n\t\t\n\t\tthis.calcHeight(force);\n\t\t\n\t\tthis.setCellHeight();\n\t}\n\t\n\t//set height of rows\n\tsetHeight(height, force){\n\t\tif(this.height != height || force){\n\t\t\t\n\t\t\tthis.manualHeight = true;\n\t\t\t\n\t\t\tthis.height = height;\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\n\t\t\t\n\t\t\tthis.setCellHeight();\n\t\t\t\n\t\t\t// this.outerHeight = this.element.outerHeight();\n\t\t\tthis.outerHeight = this.element.offsetHeight;\n\t\t}\n\t}\n\t\n\t//return rows outer height\n\tgetHeight(){\n\t\treturn this.outerHeight;\n\t}\n\t\n\t//return rows outer Width\n\tgetWidth(){\n\t\treturn this.element.offsetWidth;\n\t}\n\t\n\t//////////////// Cell Management /////////////////\n\tdeleteCell(cell){\n\t\tvar index = this.cells.indexOf(cell);\n\t\t\n\t\tif(index > -1){\n\t\t\tthis.cells.splice(index, 1);\n\t\t}\n\t}\n\t\n\t//////////////// Data Management /////////////////\n\tsetData(data){\n\t\tthis.data = this.chain(\"row-data-init-before\", [this, data], undefined, data);\n\t\t\n\t\tthis.dispatch(\"row-data-init-after\", this);\n\t}\n\t\n\t//update the rows data\n\tupdateData(updatedData){\n\t\tvar visible = this.element && Helpers.elVisible(this.element),\n\t\ttempData = {},\n\t\tnewRowData;\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t\n\t\t\tif(typeof updatedData === \"string\"){\n\t\t\t\tupdatedData = JSON.parse(updatedData);\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\n\t\t\t\n\t\t\tif(this.subscribed(\"row-data-changing\")){\n\t\t\t\ttempData = Object.assign(tempData, this.data);\n\t\t\t\ttempData = Object.assign(tempData, updatedData);\n\t\t\t}\n\t\t\t\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\n\t\t\t\n\t\t\t//set data\n\t\t\tfor (let attrname in newRowData) {\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\n\t\t\t\n\t\t\t//update affected cells only\n\t\t\tfor (let attrname in updatedData) {\n\t\t\t\t\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\n\t\t\t\t\n\t\t\t\tcolumns.forEach((column) => {\n\t\t\t\t\tlet cell = this.getCell(column.getField());\n\t\t\t\t\t\n\t\t\t\t\tif(cell){\n\t\t\t\t\t\tlet value = column.getFieldValue(newRowData);\n\t\t\t\t\t\tif(cell.getValue() !== value){\n\t\t\t\t\t\t\tcell.setValueProcessData(value);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(visible){\n\t\t\t\t\t\t\t\tcell.cellRendered();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t//Partial reinitialization if visible\n\t\t\tif(visible){\n\t\t\t\tthis.normalizeHeight(true);\n\t\t\t\t\n\t\t\t\tif(this.table.options.rowFormatter){\n\t\t\t\t\tthis.table.options.rowFormatter(this.getComponent());\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.initialized = false;\n\t\t\t\tthis.height = 0;\n\t\t\t\tthis.heightStyled = \"\";\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\n\t\t\t\n\t\t\t//this.reinitialize();\n\t\t\t\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\n\t\t\t\n\t\t\tif(this.subscribedExternal(\"dataChanged\")){\n\t\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\n\t\t\t}\n\t\t\t\n\t\t\tresolve();\n\t\t});\n\t}\n\t\n\tgetData(transform){\n\t\tif(transform){\n\t\t\treturn this.chain(\"row-data-retrieve\", [this, transform], null, this.data);\n\t\t}\n\t\t\n\t\treturn this.data;\n\t}\n\t\n\tgetCell(column){\n\t\tvar match = false;\n\t\t\n\t\tcolumn = this.table.columnManager.findColumn(column);\n\t\t\n\t\tif(!this.initialized && this.cells.length === 0){\n\t\t\tthis.generateCells();\n\t\t}\n\t\t\n\t\tmatch = this.cells.find(function(cell){\n\t\t\treturn cell.column === column;\n\t\t});\n\t\t\n\t\treturn match;\n\t}\n\t\n\tgetCellIndex(findCell){\n\t\treturn this.cells.findIndex(function(cell){\n\t\t\treturn cell === findCell;\n\t\t});\n\t}\n\t\n\tfindCell(subject){\n\t\treturn this.cells.find((cell) => {\n\t\t\treturn cell.element === subject;\n\t\t});\n\t}\n\t\n\tgetCells(){\n\t\tif(!this.initialized && this.cells.length === 0){\n\t\t\tthis.generateCells();\n\t\t}\n\t\t\n\t\treturn this.cells;\n\t}\n\t\n\tnextRow(){\n\t\tvar row = this.table.rowManager.nextDisplayRow(this, true);\n\t\treturn row || false;\n\t}\n\t\n\tprevRow(){\n\t\tvar row = this.table.rowManager.prevDisplayRow(this, true);\n\t\treturn row || false;\n\t}\n\t\n\tmoveToRow(to, before){\n\t\tvar toRow = this.table.rowManager.findRow(to);\n\t\t\n\t\tif(toRow){\n\t\t\tthis.table.rowManager.moveRowActual(this, toRow, !before);\n\t\t\tthis.table.rowManager.refreshActiveData(\"display\", false, true);\n\t\t}else{\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", to);\n\t\t}\n\t}\n\t\n\t///////////////////// Actions /////////////////////\n\tdelete(){\n\t\tthis.dispatch(\"row-delete\", this);\n\t\t\n\t\tthis.deleteActual();\n\t\t\n\t\treturn Promise.resolve();\n\t}\n\t\n\tdeleteActual(blockRedraw){\n\t\tthis.detachModules();\n\t\t\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\n\t\t\n\t\tthis.deleteCells();\n\t\t\n\t\tthis.initialized = false;\n\t\tthis.heightInitialized = false;\n\t\tthis.element = false;\n\t\t\n\t\tthis.dispatch(\"row-deleted\", this);\n\t}\n\t\n\tdetachModules(){\n\t\tthis.dispatch(\"row-deleting\", this);\n\t}\n\t\n\tdeleteCells(){\n\t\tvar cellCount = this.cells.length;\n\t\t\n\t\tfor(let i = 0; i < cellCount; i++){\n\t\t\tthis.cells[0].delete();\n\t\t}\n\t}\n\t\n\twipe(){\n\t\tthis.detachModules();\n\t\tthis.deleteCells();\n\t\t\n\t\tif(this.element){\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\t\t\t\n\t\t\tif(this.element.parentNode){\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.element = false;\n\t\tthis.modules = {};\n\t}\n\n\tisDisplayed(){\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\n\t}\n\n\tgetPosition(){\n\t\treturn this.isDisplayed() ? this.position : false;\n\t}\n\n\tsetPosition(position){\n\t\tif(position != this.position){\n\t\t\tthis.position = position;\n\n\t\t\tthis.positionWatchers.forEach((callback) => {\n\t\t\t\tcallback(this.position);\n\t\t\t});\n\t\t}\n\t}\n\n\twatchPosition(callback){\n\t\tthis.positionWatchers.push(callback);\n\n\t\tcallback(this.position);\n\t}\n\t\n\tgetGroup(){\n\t\treturn this.modules.group || false;\n\t}\n\t\n\t//////////////// Object Generation /////////////////\n\tgetComponent(){\n\t\tif(!this.component){\n\t\t\tthis.component = new RowComponent(this);\n\t\t}\n\t\t\n\t\treturn this.component;\n\t}\n}\n","export default {\n\t\"avg\":function(values, data, calcParams){\n\t\tvar output = 0,\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : 2;\n\n\t\tif(values.length){\n\t\t\toutput = values.reduce(function(sum, value){\n\t\t\t\treturn Number(sum) + Number(value);\n\t\t\t});\n\n\t\t\toutput = output / values.length;\n\n\t\t\toutput = precision !== false ? output.toFixed(precision) : output;\n\t\t}\n\n\t\treturn parseFloat(output).toString();\n\t},\n\t\"max\":function(values, data, calcParams){\n\t\tvar output = null,\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\n\n\t\tvalues.forEach(function(value){\n\n\t\t\tvalue = Number(value);\n\n\t\t\tif(value > output || output === null){\n\t\t\t\toutput = value;\n\t\t\t}\n\t\t});\n\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\n\t},\n\t\"min\":function(values, data, calcParams){\n\t\tvar output = null,\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\n\n\t\tvalues.forEach(function(value){\n\n\t\t\tvalue = Number(value);\n\n\t\t\tif(value < output || output === null){\n\t\t\t\toutput = value;\n\t\t\t}\n\t\t});\n\n\t\treturn output !== null ? (precision !== false ? output.toFixed(precision) : output) : \"\";\n\t},\n\t\"sum\":function(values, data, calcParams){\n\t\tvar output = 0,\n\t\tprecision = typeof calcParams.precision !== \"undefined\" ? calcParams.precision : false;\n\n\t\tif(values.length){\n\t\t\tvalues.forEach(function(value){\n\t\t\t\tvalue = Number(value);\n\n\t\t\t\toutput += !isNaN(value) ? Number(value) : 0;\n\t\t\t});\n\t\t}\n\n\t\treturn precision !== false ? output.toFixed(precision) : output;\n\t},\n\t\"concat\":function(values, data, calcParams){\n\t\tvar output = 0;\n\n\t\tif(values.length){\n\t\t\toutput = values.reduce(function(sum, value){\n\t\t\t\treturn String(sum) + String(value);\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t},\n\t\"count\":function(values, data, calcParams){\n\t\tvar output = 0;\n\n\t\tif(values.length){\n\t\t\tvalues.forEach(function(value){\n\t\t\t\tif(value){\n\t\t\t\t\toutput ++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t},\n};","import Module from '../../core/Module.js';\n\nimport CalcComponent from './CalcComponent.js';\n\nimport Cell from '../../core/cell/Cell.js';\nimport Column from '../../core/column/Column.js';\nimport Row from '../../core/row/Row.js';\n\nimport defaultCalculations from './defaults/calculations.js';\n\nclass ColumnCalcs extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.topCalcs = [];\n\t\tthis.botCalcs = [];\n\t\tthis.genColumn = false;\n\t\tthis.topElement = this.createElement();\n\t\tthis.botElement = this.createElement();\n\t\tthis.topRow = false;\n\t\tthis.botRow = false;\n\t\tthis.topInitialized = false;\n\t\tthis.botInitialized = false;\n\t\t\n\t\tthis.blocked = false;\n\t\tthis.recalcAfterBlock = false;\n\t\t\n\t\tthis.registerTableOption(\"columnCalcs\", true);\n\t\t\n\t\tthis.registerColumnOption(\"topCalc\");\n\t\tthis.registerColumnOption(\"topCalcParams\");\n\t\tthis.registerColumnOption(\"topCalcFormatter\");\n\t\tthis.registerColumnOption(\"topCalcFormatterParams\");\n\t\tthis.registerColumnOption(\"bottomCalc\");\n\t\tthis.registerColumnOption(\"bottomCalcParams\");\n\t\tthis.registerColumnOption(\"bottomCalcFormatter\");\n\t\tthis.registerColumnOption(\"bottomCalcFormatterParams\");\n\t}\n\t\n\tcreateElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\tel.classList.add(\"tabulator-calcs-holder\");\n\t\treturn el;\n\t}\n\t\n\tinitialize(){\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\n\t\t\n\t\tthis.subscribe(\"cell-value-changed\", this.cellValueChanged.bind(this));\n\t\tthis.subscribe(\"column-init\", this.initializeColumnCheck.bind(this));\n\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\n\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\n\t\tthis.subscribe(\"column-moved\", this.recalcActiveRows.bind(this));\n\t\tthis.subscribe(\"column-add\", this.recalcActiveRows.bind(this));\n\t\tthis.subscribe(\"data-refreshed\", this.recalcActiveRowsRefresh.bind(this));\n\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\n\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\n\t\t\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\n\n\t\tthis.subscribe(\"table-redrawing\", this.resizeHolderWidth.bind(this));\n\t\tthis.subscribe(\"column-resized\", this.resizeHolderWidth.bind(this));\n\t\tthis.subscribe(\"column-show\", this.resizeHolderWidth.bind(this));\n\t\tthis.subscribe(\"column-hide\", this.resizeHolderWidth.bind(this));\n\t\t\n\t\tthis.registerTableFunction(\"getCalcResults\", this.getResults.bind(this));\n\t\tthis.registerTableFunction(\"recalc\", this.userRecalc.bind(this));\n\n\n\t\tthis.resizeHolderWidth();\n\t}\n\n\tresizeHolderWidth(){\n\t\tthis.topElement.style.minWidth = this.table.columnManager.headersElement.offsetWidth + \"px\";\n\t}\n\n\t\n\ttableRedraw(force){\n\t\tthis.recalc(this.table.rowManager.activeRows);\n\t\t\n\t\tif(force){\n\t\t\tthis.redraw();\n\t\t}\n\t}\n\t\n\tblockRedraw(){\n\t\tthis.blocked = true;\n\t\tthis.recalcAfterBlock = false;\n\t}\n\t\n\t\n\trestoreRedraw(){\n\t\tthis.blocked = false;\n\t\t\n\t\tif(this.recalcAfterBlock){\n\t\t\tthis.recalcAfterBlock = false;\n\t\t\tthis.recalcActiveRowsRefresh();\n\t\t}\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\tuserRecalc(){\n\t\tthis.recalc(this.table.rowManager.activeRows);\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\tblockCheck(){\n\t\tif(this.blocked){\n\t\t\tthis.recalcAfterBlock = true;\n\t\t}\n\t\t\n\t\treturn this.blocked;\n\t}\n\t\n\tvisibleRows(viewable, rows){\n\t\tif(this.topRow){\n\t\t\trows.unshift(this.topRow);\n\t\t}\n\t\t\n\t\tif(this.botRow){\n\t\t\trows.push(this.botRow);\n\t\t}\n\t\t\n\t\treturn rows;\n\t}\n\t\n\trowsUpdated(row){\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.recalcRowGroup(row);\n\t\t}else{\n\t\t\tthis.recalcActiveRows();\n\t\t}\n\t}\n\t\n\trecalcActiveRowsRefresh(){\n\t\tif(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){\n\t\t\tthis.recalcAll();\n\t\t}else{\n\t\t\tthis.recalcActiveRows();\n\t\t}\n\t}\n\t\n\trecalcActiveRows(){\n\t\tthis.recalc(this.table.rowManager.activeRows);\n\t}\n\t\n\tcellValueChanged(cell){\n\t\tif(cell.column.definition.topCalc || cell.column.definition.bottomCalc){\n\t\t\tif(this.table.options.groupBy){\n\t\t\t\tif(this.table.options.columnCalcs == \"table\" || this.table.options.columnCalcs == \"both\"){\n\t\t\t\t\tthis.recalcActiveRows();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.table.options.columnCalcs != \"table\"){\n\t\t\t\t\tthis.recalcRowGroup(cell.row);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.recalcActiveRows();\n\t\t\t}\n\t\t}\n\t}\n\t\n\tinitializeColumnCheck(column){\n\t\tif(column.definition.topCalc || column.definition.bottomCalc){\n\t\t\tthis.initializeColumn(column);\n\t\t}\n\t}\n\t\n\t//initialize column calcs\n\tinitializeColumn(column){\n\t\tvar def = column.definition;\n\t\t\n\t\tvar config = {\n\t\t\ttopCalcParams:def.topCalcParams || {},\n\t\t\tbotCalcParams:def.bottomCalcParams || {},\n\t\t};\n\t\t\n\t\tif(def.topCalc){\n\t\t\t\n\t\t\tswitch(typeof def.topCalc){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"function\":\n\t\t\t\t\tconfig.topCalc = def.topCalc;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(config.topCalc){\n\t\t\t\tcolumn.modules.columnCalcs = config;\n\t\t\t\tthis.topCalcs.push(column);\n\t\t\t\t\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\n\t\t\t\t\tthis.initializeTopRow();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(def.bottomCalc){\n\t\t\tswitch(typeof def.bottomCalc){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"function\":\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(config.botCalc){\n\t\t\t\tcolumn.modules.columnCalcs = config;\n\t\t\t\tthis.botCalcs.push(column);\n\t\t\t\t\n\t\t\t\tif(this.table.options.columnCalcs != \"group\"){\n\t\t\t\t\tthis.initializeBottomRow();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t//dummy functions to handle being mock column manager\n\tregisterColumnField(){}\n\t\n\tremoveCalcs(){\n\t\tvar changed = false;\n\t\t\n\t\tif(this.topInitialized){\n\t\t\tthis.topInitialized = false;\n\t\t\tthis.topElement.parentNode.removeChild(this.topElement);\n\t\t\tchanged = true;\n\t\t}\n\t\t\n\t\tif(this.botInitialized){\n\t\t\tthis.botInitialized = false;\n\t\t\tthis.footerRemove(this.botElement);\n\t\t\tchanged = true;\n\t\t}\n\t\t\n\t\tif(changed){\n\t\t\tthis.table.rowManager.adjustTableSize();\n\t\t}\n\t}\n\t\n\treinitializeCalcs(){\n\t\tif(this.topCalcs.length){\n\t\t\tthis.initializeTopRow();\n\t\t}\n\n\t\tif(this.botCalcs.length){\n\t\t\tthis.initializeBottomRow();\n\t\t}\n\t}\n\t\n\tinitializeTopRow(){\n\t\tif(!this.topInitialized){\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\n\t\t\tthis.topInitialized = true;\n\t\t}\n\t}\n\t\n\tinitializeBottomRow(){\n\t\tif(!this.botInitialized){\n\t\t\tthis.footerPrepend(this.botElement);\n\t\t\tthis.botInitialized = true;\n\t\t}\n\t}\n\t\n\tscrollHorizontal(left){\n\t\tif(this.botInitialized && this.botRow){\n\t\t\tthis.botElement.scrollLeft = left;\n\t\t}\n\t}\n\t\n\trecalc(rows){\n\t\tvar data, row;\n\t\t\n\t\tif(!this.blockCheck()){\n\t\t\tif(this.topInitialized || this.botInitialized){\n\t\t\t\tdata = this.rowsToData(rows);\n\t\t\t\t\n\t\t\t\tif(this.topInitialized){\n\t\t\t\t\tif(this.topRow){\n\t\t\t\t\t\tthis.topRow.deleteCells();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow = this.generateRow(\"top\", data);\n\t\t\t\t\tthis.topRow = row;\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\n\t\t\t\t\trow.initialize(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.botInitialized){\n\t\t\t\t\tif(this.botRow){\n\t\t\t\t\t\tthis.botRow.deleteCells();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\n\t\t\t\t\tthis.botRow = row;\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\n\t\t\t\t\trow.initialize(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.table.rowManager.adjustTableSize();\n\t\t\t\t\n\t\t\t\t//set resizable handles\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\trecalcRowGroup(row){\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\n\t}\n\t\n\trecalcAll(){\n\t\tif(this.topCalcs.length || this.botCalcs.length){\n\t\t\tif(this.table.options.columnCalcs !== \"group\"){\n\t\t\t\tthis.recalcActiveRows();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\n\t\t\t\t\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\n\t\t\t\t\n\t\t\t\tgroups.forEach((group) => {\n\t\t\t\t\tthis.recalcGroup(group);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\t\n\trecalcGroup(group){\n\t\tvar data, rowData;\n\t\t\n\t\tif(!this.blockCheck()){\n\t\t\tif(group){\n\t\t\t\tif(group.calcs){\n\t\t\t\t\tif(group.calcs.bottom){\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\n\t\t\t\t\t\t\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(group.calcs.top){\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\n\t\t\t\t\t\t\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//generate top stats row\n\tgenerateTopRow(rows){\n\t\treturn this.generateRow(\"top\", this.rowsToData(rows));\n\t}\n\t//generate bottom stats row\n\tgenerateBottomRow(rows){\n\t\treturn this.generateRow(\"bottom\", this.rowsToData(rows));\n\t}\n\t\n\trowsToData(rows){\n\t\tvar data = [];\n\t\t\n\t\trows.forEach((row) => {\n\t\t\tdata.push(row.getData());\n\t\t\t\n\t\t\tif(this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs){\n\t\t\t\tif(row.modules.dataTree && row.modules.dataTree.open){\n\t\t\t\t\tvar children = this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(row));\n\t\t\t\t\tdata = data.concat(children);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn data;\n\t}\n\t\n\t//generate stats row\n\tgenerateRow(pos, data){\n\t\tvar rowData = this.generateRowData(pos, data),\n\t\trow;\n\t\t\n\t\tif(this.table.modExists(\"mutator\")){\n\t\t\tthis.table.modules.mutator.disable();\n\t\t}\n\t\t\n\t\trow = new Row(rowData, this, \"calc\");\n\t\t\n\t\tif(this.table.modExists(\"mutator\")){\n\t\t\tthis.table.modules.mutator.enable();\n\t\t}\n\t\t\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\n\t\t\n\t\trow.component = false;\n\t\t\n\t\trow.getComponent = () => {\n\t\t\tif(!row.component){\n\t\t\t\trow.component = new CalcComponent(row);\n\t\t\t}\n\t\t\t\n\t\t\treturn row.component;\n\t\t};\n\t\t\n\t\trow.generateCells = () => {\n\t\t\t\n\t\t\tvar cells = [];\n\t\t\t\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\t\t\n\t\t\t\t//set field name of mock column\n\t\t\t\tthis.genColumn.setField(column.getField());\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\n\t\t\t\t\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\n\t\t\t\t\tthis.genColumn.modules.format = {\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\n\t\t\t\t\t};\n\t\t\t\t}else{\n\t\t\t\t\tthis.genColumn.modules.format = {\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\n\t\t\t\t\t\tparams:{}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ensure css class definition is replicated to calculation cell\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\n\t\t\t\t\n\t\t\t\t//generate cell and assign to correct column\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\n\t\t\t\tcell.getElement();\n\t\t\t\tcell.column = column;\n\t\t\t\tcell.setWidth();\n\t\t\t\t\n\t\t\t\tcolumn.cells.push(cell);\n\t\t\t\tcells.push(cell);\n\t\t\t\t\n\t\t\t\tif(!column.visible){\n\t\t\t\t\tcell.hide();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\trow.cells = cells;\n\t\t};\n\t\t\n\t\treturn row;\n\t}\n\t\n\t//generate stats row\n\tgenerateRowData(pos, data){\n\t\tvar rowData = {},\n\t\tcalcs = pos == \"top\" ? this.topCalcs : this.botCalcs,\n\t\ttype = pos == \"top\" ? \"topCalc\" : \"botCalc\",\n\t\tparams, paramKey;\n\t\t\n\t\tcalcs.forEach(function(column){\n\t\t\tvar values = [];\n\t\t\t\n\t\t\tif(column.modules.columnCalcs && column.modules.columnCalcs[type]){\n\t\t\t\tdata.forEach(function(item){\n\t\t\t\t\tvalues.push(column.getFieldValue(item));\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tparamKey = type + \"Params\";\n\t\t\t\tparams = typeof column.modules.columnCalcs[paramKey] === \"function\" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];\n\t\t\t\t\n\t\t\t\tcolumn.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn rowData;\n\t}\n\t\n\thasTopCalcs(){\n\t\treturn\t!!(this.topCalcs.length);\n\t}\n\t\n\thasBottomCalcs(){\n\t\treturn\t!!(this.botCalcs.length);\n\t}\n\t\n\t//handle table redraw\n\tredraw(){\n\t\tif(this.topRow){\n\t\t\tthis.topRow.normalizeHeight(true);\n\t\t}\n\t\tif(this.botRow){\n\t\t\tthis.botRow.normalizeHeight(true);\n\t\t}\n\t}\n\t\n\t//return the calculated\n\tgetResults(){\n\t\tvar results = {},\n\t\tgroups;\n\t\t\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\n\t\t\tgroups = this.table.modules.groupRows.getGroups(true);\n\t\t\t\n\t\t\tgroups.forEach((group) => {\n\t\t\t\tresults[group.getKey()] = this.getGroupResults(group);\n\t\t\t});\n\t\t}else{\n\t\t\tresults = {\n\t\t\t\ttop: this.topRow ? this.topRow.getData() : {},\n\t\t\t\tbottom: this.botRow ? this.botRow.getData() : {},\n\t\t\t};\n\t\t}\n\t\t\n\t\treturn results;\n\t}\n\t\n\t//get results from a group\n\tgetGroupResults(group){\n\t\tvar groupObj = group._getSelf(),\n\t\tsubGroups = group.getSubGroups(),\n\t\tsubGroupResults = {},\n\t\tresults = {};\n\t\t\n\t\tsubGroups.forEach((subgroup) => {\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\n\t\t});\n\t\t\n\t\tresults = {\n\t\t\ttop: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},\n\t\t\tbottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},\n\t\t\tgroups: subGroupResults,\n\t\t};\n\t\t\n\t\treturn results;\n\t}\n\t\n\tadjustForScrollbar(width){\n\t\tif(this.botRow){\n\t\t\tif(this.table.rtl){\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\n\t\t\t}else{\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\n\t\t\t}\n\t\t}\n\t}\n}\n\nColumnCalcs.moduleName = \"columnCalcs\";\n\n//load defaults\nColumnCalcs.calculations = defaultCalculations;\n\nexport default ColumnCalcs;","import Module from '../../core/Module.js';\n\nimport Row from '../../core/row/Row.js';\n\nimport RowComponent from '../../core/row/RowComponent.js';\n\nclass DataTree extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.indent = 10;\n\t\tthis.field = \"\";\n\t\tthis.collapseEl = null;\n\t\tthis.expandEl = null;\n\t\tthis.branchEl = null;\n\t\tthis.elementField = false;\n\n\t\tthis.startOpen = function(){};\n\n\t\tthis.registerTableOption(\"dataTree\", false); //enable data tree\n\t\tthis.registerTableOption(\"dataTreeFilter\", true); //filter child rows\n\t\tthis.registerTableOption(\"dataTreeSort\", true); //sort child rows\n\t\tthis.registerTableOption(\"dataTreeElementColumn\", false);\n\t\tthis.registerTableOption(\"dataTreeBranchElement\", true);//show data tree branch element\n\t\tthis.registerTableOption(\"dataTreeChildIndent\", 9); //data tree child indent in px\n\t\tthis.registerTableOption(\"dataTreeChildField\", \"_children\");//data tre column field to look for child rows\n\t\tthis.registerTableOption(\"dataTreeCollapseElement\", false);//data tree row collapse element\n\t\tthis.registerTableOption(\"dataTreeExpandElement\", false);//data tree row expand element\n\t\tthis.registerTableOption(\"dataTreeStartExpanded\", false);\n\t\tthis.registerTableOption(\"dataTreeChildColumnCalcs\", false);//include visible data tree rows in column calculations\n\t\tthis.registerTableOption(\"dataTreeSelectPropagate\", false);//selecting a parent row selects its children\n\n\t\t//register component functions\n\t\tthis.registerComponentFunction(\"row\", \"treeCollapse\", this.collapseRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"treeExpand\", this.expandRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"treeToggle\", this.toggleRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"getTreeParent\", this.getTreeParent.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"getTreeChildren\", this.getRowChildren.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"addTreeChild\", this.addTreeChildRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"isTreeExpanded\", this.isRowExpanded.bind(this));\n\t}\n\n\tinitialize(){\n\t\tif(this.table.options.dataTree){\n\t\t\tvar dummyEl = null,\n\t\t\toptions = this.table.options;\n\n\t\t\tthis.field = options.dataTreeChildField;\n\t\t\tthis.indent = options.dataTreeChildIndent;\n\n\t\t\tif(this.options(\"movableRows\")){\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\n\t\t\t}\n\n\t\t\tif(options.dataTreeBranchElement){\n\n\t\t\t\tif(options.dataTreeBranchElement === true){\n\t\t\t\t\tthis.branchEl = document.createElement(\"div\");\n\t\t\t\t\tthis.branchEl.classList.add(\"tabulator-data-tree-branch\");\n\t\t\t\t}else{\n\t\t\t\t\tif(typeof options.dataTreeBranchElement === \"string\"){\n\t\t\t\t\t\tdummyEl = document.createElement(\"div\");\n\t\t\t\t\t\tdummyEl.innerHTML = options.dataTreeBranchElement;\n\t\t\t\t\t\tthis.branchEl = dummyEl.firstChild;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.branchEl = options.dataTreeBranchElement;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(options.dataTreeCollapseElement){\n\t\t\t\tif(typeof options.dataTreeCollapseElement === \"string\"){\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeCollapseElement;\n\t\t\t\t\tthis.collapseEl = dummyEl.firstChild;\n\t\t\t\t}else{\n\t\t\t\t\tthis.collapseEl = options.dataTreeCollapseElement;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.collapseEl = document.createElement(\"div\");\n\t\t\t\tthis.collapseEl.classList.add(\"tabulator-data-tree-control\");\n\t\t\t\tthis.collapseEl.tabIndex = 0;\n\t\t\t\tthis.collapseEl.innerHTML = \"
\";\n\t\t\t}\n\n\t\t\tif(options.dataTreeExpandElement){\n\t\t\t\tif(typeof options.dataTreeExpandElement === \"string\"){\n\t\t\t\t\tdummyEl = document.createElement(\"div\");\n\t\t\t\t\tdummyEl.innerHTML = options.dataTreeExpandElement;\n\t\t\t\t\tthis.expandEl = dummyEl.firstChild;\n\t\t\t\t}else{\n\t\t\t\t\tthis.expandEl = options.dataTreeExpandElement;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.expandEl = document.createElement(\"div\");\n\t\t\t\tthis.expandEl.classList.add(\"tabulator-data-tree-control\");\n\t\t\t\tthis.expandEl.tabIndex = 0;\n\t\t\t\tthis.expandEl.innerHTML = \"
\";\n\t\t\t}\n\n\n\t\t\tswitch(typeof options.dataTreeStartExpanded){\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tthis.startOpen = function(row, index){\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"function\":\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.startOpen = function(row, index){\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\n\t\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\n\t\t\tthis.subscribe(\"row-deleted\", this.rowDelete.bind(this),0);\n\t\t\tthis.subscribe(\"row-data-changed\", this.rowDataChanged.bind(this), 10);\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellValueChanged.bind(this));\n\t\t\tthis.subscribe(\"edit-cancelled\", this.cellValueChanged.bind(this));\n\t\t\tthis.subscribe(\"column-moving-rows\", this.columnMoving.bind(this));\n\t\t\tthis.subscribe(\"table-built\", this.initializeElementField.bind(this));\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.bind(this));\n\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 30);\n\t\t}\n\t}\n\n\ttableRedrawing(force){\n\t\tvar rows;\n\n\t\tif(force){\n\t\t\trows = this.table.rowManager.getRows();\n\t\t\t\n\t\t\trows.forEach((row) => {\n\t\t\t\tthis.reinitializeRowChildren(row);\n\t\t\t});\n\t\t}\n\t}\n\n\tinitializeElementField(){\n\t\tvar firstCol = this.table.columnManager.getFirstVisibleColumn();\n\n\t\tthis.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);\n\t}\n\t\n\tgetRowChildren(row){\n\t\treturn this.getTreeChildren(row, true);\n\t}\n\n\tcolumnMoving(){\n\t\tvar rows = [];\n\n\t\tthis.table.rowManager.rows.forEach((row) => {\n\t\t\trows = rows.concat(this.getTreeChildren(row, false, true));\n\t\t});\n\n\t\treturn rows;\n\t}\n\n\trowDataChanged(row, visible, updatedData){\n\t\tif(this.redrawNeeded(updatedData)){\n\t\t\tthis.initializeRow(row);\n\n\t\t\tif(visible){\n\t\t\t\tthis.layoutRow(row);\n\t\t\t\tthis.refreshData(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tcellValueChanged(cell){\n\t\tvar field = cell.column.getField();\n\n\t\tif(field === this.elementField){\n\t\t\tthis.layoutRow(cell.row);\n\t\t}\n\t}\n\n\tinitializeRow(row){\n\t\tvar childArray = row.getData()[this.field];\n\t\tvar isArray = Array.isArray(childArray);\n\n\t\tvar children = isArray || (!isArray && typeof childArray === \"object\" && childArray !== null);\n\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.branchEl){\n\t\t\trow.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl);\n\t\t}\n\n\t\tif(!children && row.modules.dataTree && row.modules.dataTree.controlEl){\n\t\t\trow.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl);\n\t\t}\n\n\t\trow.modules.dataTree = {\n\t\t\tindex: row.modules.dataTree ? row.modules.dataTree.index : 0,\n\t\t\topen: children ? (row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0)) : false,\n\t\t\tcontrolEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false,\n\t\t\tbranchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false,\n\t\t\tparent: row.modules.dataTree ? row.modules.dataTree.parent : false,\n\t\t\tchildren:children,\n\t\t};\n\t}\n\n\treinitializeRowChildren(row){\n\t\tvar children = this.getTreeChildren(row, false, true);\n\n\t\tchildren.forEach(function(child){\n\t\t\tchild.reinitialize(true);\n\t\t});\n\t}\n\n\tlayoutRow(row){\n\t\tvar cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0],\n\t\tel = cell.getElement(),\n\t\tconfig = row.modules.dataTree;\n\n\t\tif(config.branchEl){\n\t\t\tif(config.branchEl.parentNode){\n\t\t\t\tconfig.branchEl.parentNode.removeChild(config.branchEl);\n\t\t\t}\n\t\t\tconfig.branchEl = false;\n\t\t}\n\n\t\tif(config.controlEl){\n\t\t\tif(config.controlEl.parentNode){\n\t\t\t\tconfig.controlEl.parentNode.removeChild(config.controlEl);\n\t\t\t}\n\t\t\tconfig.controlEl = false;\n\t\t}\n\n\t\tthis.generateControlElement(row, el);\n\n\t\trow.getElement().classList.add(\"tabulator-tree-level-\" + config.index);\n\n\t\tif(config.index){\n\t\t\tif(this.branchEl){\n\t\t\t\tconfig.branchEl = this.branchEl.cloneNode(true);\n\t\t\t\tel.insertBefore(config.branchEl, el.firstChild);\n\n\t\t\t\tif(this.table.rtl){\n\t\t\t\t\tconfig.branchEl.style.marginRight = (((config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\n\t\t\t\t}else{\n\t\t\t\t\tconfig.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (config.index * this.indent)) + \"px\";\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\tif(this.table.rtl){\n\t\t\t\t\tel.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + (config.index * this.indent) + \"px\";\n\t\t\t\t}else{\n\t\t\t\t\tel.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + \"px\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateControlElement(row, el){\n\t\tvar config = row.modules.dataTree,\n\t\toldControl = config.controlEl;\n\n\t\tel = el || row.getCells()[0].getElement();\n\n\t\tif(config.children !== false){\n\n\t\t\tif(config.open){\n\t\t\t\tconfig.controlEl = this.collapseEl.cloneNode(true);\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tthis.collapseRow(row);\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tconfig.controlEl = this.expandEl.cloneNode(true);\n\t\t\t\tconfig.controlEl.addEventListener(\"click\", (e) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tthis.expandRow(row);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconfig.controlEl.addEventListener(\"mousedown\", (e) => {\n\t\t\t\te.stopPropagation();\n\t\t\t});\n\n\t\t\tif(oldControl && oldControl.parentNode === el){\n\t\t\t\toldControl.parentNode.replaceChild(config.controlEl,oldControl);\n\t\t\t}else{\n\t\t\t\tel.insertBefore(config.controlEl, el.firstChild);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetRows(rows){\n\t\tvar output = [];\n\n\t\trows.forEach((row, i) => {\n\t\t\tvar config, children;\n\n\t\t\toutput.push(row);\n\n\t\t\tif(row instanceof Row){\n\n\t\t\t\trow.create();\n\n\t\t\t\tconfig = row.modules.dataTree.children;\n\n\t\t\t\tif(!config.index && config.children !== false){\n\t\t\t\t\tchildren = this.getChildren(row);\n\n\t\t\t\t\tchildren.forEach((child) => {\n\t\t\t\t\t\tchild.create();\n\t\t\t\t\t\toutput.push(child);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tgetChildren(row, allChildren){\n\t\tvar config = row.modules.dataTree,\n\t\tchildren = [],\n\t\toutput = [];\n\n\t\tif(config.children !== false && (config.open || allChildren)){\n\t\t\tif(!Array.isArray(config.children)){\n\t\t\t\tconfig.children = this.generateChildren(row);\n\t\t\t}\n\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\n\t\t\t}else{\n\t\t\t\tchildren = config.children;\n\t\t\t}\n\n\t\t\tif(this.table.modExists(\"sort\") && this.table.options.dataTreeSort){\n\t\t\t\tthis.table.modules.sort.sort(children);\n\t\t\t}\n\n\t\t\tchildren.forEach((child) => {\n\t\t\t\toutput.push(child);\n\n\t\t\t\tvar subChildren = this.getChildren(child);\n\n\t\t\t\tsubChildren.forEach((sub) => {\n\t\t\t\t\toutput.push(sub);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tgenerateChildren(row){\n\t\tvar children = [];\n\n\t\tvar childArray = row.getData()[this.field];\n\n\t\tif(!Array.isArray(childArray)){\n\t\t\tchildArray = [childArray];\n\t\t}\n\n\t\tchildArray.forEach((childData) => {\n\t\t\tvar childRow = new Row(childData || {}, this.table.rowManager);\n\n\t\t\tchildRow.create();\n\n\t\t\tchildRow.modules.dataTree.index = row.modules.dataTree.index + 1;\n\t\t\tchildRow.modules.dataTree.parent = row;\n\n\t\t\tif(childRow.modules.dataTree.children){\n\t\t\t\tchildRow.modules.dataTree.open = this.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);\n\t\t\t}\n\t\t\tchildren.push(childRow);\n\t\t});\n\n\t\treturn children;\n\t}\n\n\texpandRow(row, silent){\n\t\tvar config = row.modules.dataTree;\n\n\t\tif(config.children !== false){\n\t\t\tconfig.open = true;\n\n\t\t\trow.reinitialize();\n\n\t\t\tthis.refreshData(true);\n\n\t\t\tthis.dispatchExternal(\"dataTreeRowExpanded\", row.getComponent(), row.modules.dataTree.index);\n\t\t}\n\t}\n\n\tcollapseRow(row){\n\t\tvar config = row.modules.dataTree;\n\n\t\tif(config.children !== false){\n\t\t\tconfig.open = false;\n\n\t\t\trow.reinitialize();\n\n\t\t\tthis.refreshData(true);\n\n\t\t\tthis.dispatchExternal(\"dataTreeRowCollapsed\", row.getComponent(), row.modules.dataTree.index);\n\t\t}\n\t}\n\n\ttoggleRow(row){\n\t\tvar config = row.modules.dataTree;\n\n\t\tif(config.children !== false){\n\t\t\tif(config.open){\n\t\t\t\tthis.collapseRow(row);\n\t\t\t}else{\n\t\t\t\tthis.expandRow(row);\n\t\t\t}\n\t\t}\n\t}\n\n\tisRowExpanded(row){\n\t\treturn row.modules.dataTree.open;\n\t}\n\n\tgetTreeParent(row){\n\t\treturn row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false;\n\t}\n\n\tgetTreeParentRoot(row){\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\n\t}\n\n\tgetFilteredTreeChildren(row){\n\t\tvar config = row.modules.dataTree,\n\t\toutput = [], children;\n\n\t\tif(config.children){\n\n\t\t\tif(!Array.isArray(config.children)){\n\t\t\t\tconfig.children = this.generateChildren(row);\n\t\t\t}\n\n\t\t\tif(this.table.modExists(\"filter\") && this.table.options.dataTreeFilter){\n\t\t\t\tchildren = this.table.modules.filter.filter(config.children);\n\t\t\t}else{\n\t\t\t\tchildren = config.children;\n\t\t\t}\n\n\t\t\tchildren.forEach((childRow) => {\n\t\t\t\tif(childRow instanceof Row){\n\t\t\t\t\toutput.push(childRow);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\trowDelete(row){\n\t\tvar parent = row.modules.dataTree.parent,\n\t\tchildIndex;\n\n\t\tif(parent){\n\t\t\tchildIndex = this.findChildIndex(row, parent);\n\n\t\t\tif(childIndex !== false){\n\t\t\t\tparent.data[this.field].splice(childIndex, 1);\n\t\t\t}\n\n\t\t\tif(!parent.data[this.field].length){\n\t\t\t\tdelete parent.data[this.field];\n\t\t\t}\n\n\t\t\tthis.initializeRow(parent);\n\t\t\tthis.layoutRow(parent);\n\t\t}\n\n\t\tthis.refreshData(true);\n\t}\n\n\taddTreeChildRow(row, data, top, index){\n\t\tvar childIndex = false;\n\n\t\tif(typeof data === \"string\"){\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\n\t\tif(!Array.isArray(row.data[this.field])){\n\t\t\trow.data[this.field] = [];\n\n\t\t\trow.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index);\n\t\t}\n\n\t\tif(typeof index !== \"undefined\"){\n\t\t\tchildIndex = this.findChildIndex(index, row);\n\n\t\t\tif(childIndex !== false){\n\t\t\t\trow.data[this.field].splice((top ? childIndex : childIndex + 1), 0, data);\n\t\t\t}\n\t\t}\n\n\t\tif(childIndex === false){\n\t\t\tif(top){\n\t\t\t\trow.data[this.field].unshift(data);\n\t\t\t}else{\n\t\t\t\trow.data[this.field].push(data);\n\t\t\t}\n\t\t}\n\n\t\tthis.initializeRow(row);\n\t\tthis.layoutRow(row);\n\n\t\tthis.refreshData(true);\n\t}\n\n\tfindChildIndex(subject, parent){\n\t\tvar match = false;\n\n\t\tif(typeof subject == \"object\"){\n\n\t\t\tif(subject instanceof Row){\n\t\t\t\t//subject is row element\n\t\t\t\tmatch = subject.data;\n\t\t\t}else if(subject instanceof RowComponent){\n\t\t\t\t//subject is public row component\n\t\t\t\tmatch = subject._getSelf().data;\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\n\t\t\t\tif(parent.modules.dataTree){\n\t\t\t\t\tmatch = parent.modules.dataTree.children.find((childRow) => {\n\t\t\t\t\t\treturn childRow instanceof Row ? childRow.element === subject : false;\n\t\t\t\t\t});\n\n\t\t\t\t\tif(match){\n\t\t\t\t\t\tmatch = match.data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(subject === null){\n\t\t\t\tmatch = false;\n\t\t\t}\n\n\t\t}else if(typeof subject == \"undefined\"){\n\t\t\tmatch = false;\n\t\t}else{\n\t\t\t//subject should be treated as the index of the row\n\t\t\tmatch = parent.data[this.field].find((row) => {\n\t\t\t\treturn row.data[this.table.options.index] == subject;\n\t\t\t});\n\t\t}\n\n\t\tif(match){\n\n\t\t\tif(Array.isArray(parent.data[this.field])){\n\t\t\t\tmatch = parent.data[this.field].indexOf(match);\n\t\t\t}\n\n\t\t\tif(match == -1){\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t}\n\n\t\t//catch all for any other type of input\n\n\t\treturn match;\n\t}\n\n\tgetTreeChildren(row, component, recurse){\n\t\tvar config = row.modules.dataTree,\n\t\toutput = [];\n\n\t\tif(config.children){\n\n\t\t\tif(!Array.isArray(config.children)){\n\t\t\t\tconfig.children = this.generateChildren(row);\n\t\t\t}\n\n\t\t\tconfig.children.forEach((childRow) => {\n\t\t\t\tif(childRow instanceof Row){\n\t\t\t\t\toutput.push(component ? childRow.getComponent() : childRow);\n\n\t\t\t\t\tif(recurse){\n\t\t\t\t\t\toutput = output.concat(this.getTreeChildren(childRow, component, recurse));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tgetChildField(){\n\t\treturn this.field;\n\t}\n\n\tredrawNeeded(data){\n\t\treturn (this.field ? typeof data[this.field] !== \"undefined\" : false) || (this.elementField ? typeof data[this.elementField] !== \"undefined\" : false);\n\t}\n}\n\nDataTree.moduleName = \"dataTree\";\n\nexport default DataTree;","import csv from './downloaders/csv.js';\nimport json from './downloaders/json.js';\nimport pdf from './downloaders/pdf.js';\nimport xlsx from './downloaders/xlsx.js';\nimport html from './downloaders/html.js';\nimport jsonLines from './downloaders/jsonLines.js';\n\nexport default {\n\tcsv:csv,\n\tjson:json,\n\tjsonLines:jsonLines,\n\tpdf:pdf,\n\txlsx:xlsx,\n\thtml:html,\n};","export default function(list, options = {}, setFileContents){\n\tvar delimiter = options.delimiter ? options.delimiter : \",\",\n\tfileContents = [],\n\theaders = [];\n\n\tlist.forEach((row) => {\n\t\tvar item = [];\n\n\t\tswitch(row.type){\n\t\t\tcase \"group\":\n\t\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process row groups\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"calc\":\n\t\t\t\tconsole.warn(\"Download Warning - CSV downloader cannot process column calculations\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"header\":\n\t\t\t\trow.columns.forEach((col, i) => {\n\t\t\t\t\tif(col && col.depth === 1){\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"row\":\n\t\t\t\trow.columns.forEach((col) => {\n\n\t\t\t\t\tif(col){\n\n\t\t\t\t\t\tswitch(typeof col.value){\n\t\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\t\t\tcol.value = \"\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tfileContents.push(item.join(delimiter));\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(headers.length){\n\t\tfileContents.unshift(headers.join(delimiter));\n\t}\n\n\tfileContents = fileContents.join(\"\\n\");\n\n\tif(options.bom){\n\t\tfileContents = \"\\ufeff\" + fileContents;\n\t}\n\n\tsetFileContents(fileContents, \"text/csv\");\n}\n","export default function(list, options, setFileContents){\n\tvar fileContents = [];\n\n\tlist.forEach((row) => {\n\t\tvar item = {};\n\n\t\tswitch(row.type){\n\t\t\tcase \"header\":\n\t\t\t\tbreak;\n\n\t\t\tcase \"group\":\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"calc\":\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"row\":\n\t\t\t\trow.columns.forEach((col) => {\n\t\t\t\t\tif(col){\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tfileContents.push(item);\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tfileContents = JSON.stringify(fileContents, null, '\\t');\n\n\tsetFileContents(fileContents, \"application/json\");\n}","export default function (list, options, setFileContents) {\n\tconst fileContents = [];\n\n\tlist.forEach((row) => {\n\t\tconst item = {};\n\n\t\tswitch (row.type) {\n\t\t\tcase \"header\":\n\t\t\t\tbreak;\n\n\t\t\tcase \"group\":\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process row groups\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"calc\":\n\t\t\t\tconsole.warn(\"Download Warning - JSON downloader cannot process column calculations\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"row\":\n\t\t\t\trow.columns.forEach((col) => {\n\t\t\t\t\tif (col) {\n\t\t\t\t\t\titem[col.component.getTitleDownload() || col.component.getField()] = col.value;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tfileContents.push(JSON.stringify(item));\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tsetFileContents(fileContents.join(\"\\n\"), \"application/x-ndjson\");\n}","export default function(list, options = {}, setFileContents){\n\tvar header = [],\n\tbody = [],\n\tautoTableParams = {},\n\trowGroupStyles = options.rowGroupStyles || {\n\t\tfontStyle: \"bold\",\n\t\tfontSize: 12,\n\t\tcellPadding: 6,\n\t\tfillColor: 220,\n\t},\n\trowCalcStyles = options.rowCalcStyles || {\n\t\tfontStyle: \"bold\",\n\t\tfontSize: 10,\n\t\tcellPadding: 4,\n\t\tfillColor: 232,\n\t},\n\tjsPDFParams = options.jsPDF || {},\n\ttitle = options.title ? options.title : \"\";\n\n\tif(!jsPDFParams.orientation){\n\t\tjsPDFParams.orientation = options.orientation || \"landscape\";\n\t}\n\n\tif(!jsPDFParams.unit){\n\t\tjsPDFParams.unit = \"pt\";\n\t}\n\n\t//parse row list\n\tlist.forEach((row) => {\n\t\tswitch(row.type){\n\t\t\tcase \"header\":\n\t\t\t\theader.push(parseRow(row));\n\t\t\t\tbreak;\n\n\t\t\tcase \"group\":\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\n\t\t\t\tbreak;\n\n\t\t\tcase \"calc\":\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\n\t\t\t\tbreak;\n\n\t\t\tcase \"row\":\n\t\t\t\tbody.push(parseRow(row));\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tfunction parseRow(row, styles){\n\t\tvar rowData = [];\n\n\t\trow.columns.forEach((col) =>{\n\t\t\tvar cell;\n\n\t\t\tif(col){\n\t\t\t\tswitch(typeof col.value){\n\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\tcol.value = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcell = {\n\t\t\t\t\tcontent:col.value,\n\t\t\t\t\tcolSpan:col.width,\n\t\t\t\t\trowSpan:col.height,\n\t\t\t\t};\n\n\t\t\t\tif(styles){\n\t\t\t\t\tcell.styles = styles;\n\t\t\t\t}\n\n\t\t\t\trowData.push(cell);\n\t\t\t}\n\t\t});\n\n\t\treturn rowData;\n\t}\n\n\n\t//configure PDF\n\tvar doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables\n\n\tif(options.autoTable){\n\t\tif(typeof options.autoTable === \"function\"){\n\t\t\tautoTableParams = options.autoTable(doc) || {};\n\t\t}else{\n\t\t\tautoTableParams = options.autoTable;\n\t\t}\n\t}\n\n\tif(title){\n\t\tautoTableParams.didDrawPage = function(data) {\n\t\t\tdoc.text(title, 40, 30);\n\t\t};\n\t}\n\n\tautoTableParams.head = header;\n\tautoTableParams.body = body;\n\n\tdoc.autoTable(autoTableParams);\n\n\tif(options.documentProcessing){\n\t\toptions.documentProcessing(doc);\n\t}\n\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\n}\n","import CoreFeature from '../../../../core/CoreFeature.js';\n\nexport default function(list, options, setFileContents){\n\tvar self = this,\n\tsheetName = options.sheetName || \"Sheet1\",\n\tworkbook = XLSX.utils.book_new(),\n\ttableFeatures = new CoreFeature(this),\n\tcompression = 'compress' in options ? options.compress : true,\n\toutput;\n\n\tworkbook.SheetNames = [];\n\tworkbook.Sheets = {};\n\n\tfunction generateSheet(){\n\t\tvar rows = [],\n\t\tmerges = [],\n\t\tworksheet = {},\n\t\trange = {s: {c:0, r:0}, e: {c:(list[0] ? list[0].columns.reduce((a, b) => a + (b && b.width ? b.width : 1), 0) : 0), r:list.length }};\n\n\t\t//parse row list\n\t\tlist.forEach((row, i) => {\n\t\t\tvar rowData = [];\n\n\t\t\trow.columns.forEach(function(col, j){\n\n\t\t\t\tif(col){\n\t\t\t\t\trowData.push(!(col.value instanceof Date) && typeof col.value === \"object\" ? JSON.stringify(col.value) : col.value);\n\n\t\t\t\t\tif(col.width > 1 || col.height > -1){\n\t\t\t\t\t\tif(col.height > 1 || col.width > 1){\n\t\t\t\t\t\t\tmerges.push({s:{r:i,c:j},e:{r:i + col.height - 1,c:j + col.width - 1}});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\trowData.push(\"\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\trows.push(rowData);\n\t\t});\n\n\t\t//convert rows to worksheet\n\t\tXLSX.utils.sheet_add_aoa(worksheet, rows);\n\n\t\tworksheet['!ref'] = XLSX.utils.encode_range(range);\n\n\t\tif(merges.length){\n\t\t\tworksheet[\"!merges\"] = merges;\n\t\t}\n\n\t\treturn worksheet;\n\t}\n\n\tif(options.sheetOnly){\n\t\tsetFileContents(generateSheet());\n\t\treturn;\n\t}\n\n\tif(options.sheets){\n\t\tfor(var sheet in options.sheets){\n\n\t\t\tif(options.sheets[sheet] === true){\n\t\t\t\tworkbook.SheetNames.push(sheet);\n\t\t\t\tworkbook.Sheets[sheet] = generateSheet();\n\t\t\t}else{\n\n\t\t\t\tworkbook.SheetNames.push(sheet);\n\n\t\t\t\ttableFeatures.commsSend(options.sheets[sheet], \"download\", \"intercept\",{\n\t\t\t\t\ttype:\"xlsx\",\n\t\t\t\t\toptions:{sheetOnly:true},\n\t\t\t\t\tactive:self.active,\n\t\t\t\t\tintercept:function(data){\n\t\t\t\t\t\tworkbook.Sheets[sheet] = data;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}else{\n\t\tworkbook.SheetNames.push(sheetName);\n\t\tworkbook.Sheets[sheetName] = generateSheet();\n\t}\n\n\tif(options.documentProcessing){\n\t\tworkbook = options.documentProcessing(workbook);\n\t}\n\n\t//convert workbook to binary array\n\tfunction s2ab(s) {\n\t\tvar buf = new ArrayBuffer(s.length);\n\t\tvar view = new Uint8Array(buf);\n\t\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\n\t\treturn buf;\n\t}\n\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\n\n\tsetFileContents(s2ab(output), \"application/octet-stream\");\n}","export default function(list, options, setFileContents){\n\tif(this.modExists(\"export\", true)){\n\t\tsetFileContents(this.modules.export.generateHTMLTable(list), \"text/html\");\n\t}\n}","import Module from '../../core/Module.js';\n\nimport defaultDownloaders from './defaults/downloaders.js';\n\nclass Download extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.registerTableOption(\"downloadEncoder\", function(data, mimeType){\n\t\t\treturn new Blob([data],{type:mimeType});\n\t\t}); //function to manipulate download data\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\n\t\tthis.registerTableOption(\"downloadConfig\", {}); //download config\n\t\tthis.registerTableOption(\"downloadRowRange\", \"active\"); //restrict download to active rows only\n\n\t\tthis.registerColumnOption(\"download\");\n\t\tthis.registerColumnOption(\"titleDownload\");\n\t}\n\n\tinitialize(){\n\t\tthis.deprecatedOptionsCheck();\n\n\t\tthis.registerTableFunction(\"download\", this.download.bind(this));\n\t\tthis.registerTableFunction(\"downloadToTab\", this.downloadToTab.bind(this));\n\t}\n\n\tdeprecatedOptionsCheck(){\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\n\t}\t\n\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\n\tdownloadToTab(type, filename, options, active){\n\t\tthis.download(type, filename, options, active, true);\n\t}\n\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\n\t//trigger file download\n\tdownload(type, filename, options, range, interceptCallback){\n\t\tvar downloadFunc = false;\n\n\t\tfunction buildLink(data, mime){\n\t\t\tif(interceptCallback){\n\t\t\t\tif(interceptCallback === true){\n\t\t\t\t\tthis.triggerDownload(data, mime, type, filename, true);\n\t\t\t\t}else{\n\t\t\t\t\tinterceptCallback(data);\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tthis.triggerDownload(data, mime, type, filename);\n\t\t\t}\n\t\t}\n\n\t\tif(typeof type == \"function\"){\n\t\t\tdownloadFunc = type;\n\t\t}else{\n\t\t\tif(Download.downloaders[type]){\n\t\t\t\tdownloadFunc = Download.downloaders[type];\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Download Error - No such download type found: \", type);\n\t\t\t}\n\t\t}\n\n\t\tif(downloadFunc){\n\t\t\tvar list = this.generateExportList(range);\n\n\t\t\tdownloadFunc.call(this.table, list , options || {}, buildLink.bind(this));\n\t\t}\n\t}\n\n\tgenerateExportList(range){\n\t\tvar list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, \"download\");\n\n\t\t//assign group header formatter\n\t\tvar groupHeader = this.table.options.groupHeaderDownload;\n\n\t\tif(groupHeader && !Array.isArray(groupHeader)){\n\t\t\tgroupHeader = [groupHeader];\n\t\t}\n\n\t\tlist.forEach((row) => {\n\t\t\tvar group;\n\n\t\t\tif(row.type === \"group\"){\n\t\t\t\tgroup = row.columns[0];\n\n\t\t\t\tif(groupHeader && groupHeader[row.indent]){\n\t\t\t\t\tgroup.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn list;\n\t}\n\n\ttriggerDownload(data, mime, type, filename, newTab){\n\t\tvar element = document.createElement('a'),\n\t\tblob = this.table.options.downloadEncoder(data, mime);\n\n\t\tif(blob){\n\t\t\tif(newTab){\n\t\t\t\twindow.open(window.URL.createObjectURL(blob));\n\t\t\t}else{\n\t\t\t\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\n\t\t\t\t\n\t\t\t\tif(navigator.msSaveOrOpenBlob){\n\t\t\t\t\tnavigator.msSaveOrOpenBlob(blob, filename);\n\t\t\t\t}else{\n\t\t\t\t\telement.setAttribute('href', window.URL.createObjectURL(blob));\n\n\t\t\t\t\t//set file title\n\t\t\t\t\telement.setAttribute('download', filename);\n\n\t\t\t\t\t//trigger download\n\t\t\t\t\telement.style.display = 'none';\n\t\t\t\t\tdocument.body.appendChild(element);\n\t\t\t\t\telement.click();\n\n\t\t\t\t\t//remove temporary link element\n\t\t\t\t\tdocument.body.removeChild(element);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.dispatchExternal(\"downloadComplete\");\n\t\t}\n\t}\n\n\tcommsReceived(table, action, data){\n\t\tswitch(action){\n\t\t\tcase \"intercept\":\n\t\t\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nDownload.moduleName = \"download\";\n\n//load defaults\nDownload.downloaders = defaultDownloaders;\n\nexport default Download;","export default function maskInput(el, options){\n\tvar mask = options.mask,\n\tmaskLetter = typeof options.maskLetterChar !== \"undefined\" ? options.maskLetterChar : \"A\",\n\tmaskNumber = typeof options.maskNumberChar !== \"undefined\" ? options.maskNumberChar : \"9\",\n\tmaskWildcard = typeof options.maskWildcardChar !== \"undefined\" ? options.maskWildcardChar : \"*\";\n\n\tfunction fillSymbols(index){\n\t\tvar symbol = mask[index];\n\t\tif(typeof symbol !== \"undefined\" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber){\n\t\t\tel.value = el.value + \"\" + symbol;\n\t\t\tfillSymbols(index+1);\n\t\t}\n\t}\n\n\tel.addEventListener(\"keydown\", (e) => {\n\t\tvar index = el.value.length,\n\t\tchar = e.key;\n\n\t\tif(e.keyCode > 46 && !e.ctrlKey && !e.metaKey){\n\t\t\tif(index >= mask.length){\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\tswitch(mask[index]){\n\t\t\t\t\tcase maskLetter:\n\t\t\t\t\t\tif(char.toUpperCase() == char.toLowerCase()){\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase maskNumber:\n\t\t\t\t\t\tif(isNaN(char)){\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase maskWildcard:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(char !== mask[index]){\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t});\n\n\tel.addEventListener(\"keyup\", (e) => {\n\t\tif(e.keyCode > 46){\n\t\t\tif(options.maskAutoFill){\n\t\t\t\tfillSymbols(el.value.length);\n\t\t\t}\n\t\t}\n\t});\n\n\n\tif(!el.placeholder){\n\t\tel.placeholder = mask;\n\t}\n\n\tif(options.maskAutoFill){\n\t\tfillSymbols(el.value.length);\n\t}\n}","import maskInput from './inputMask.js';\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\n\nexport default class Edit{\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\n\t\tthis.edit = editor;\n\t\tthis.table = editor.table;\n\t\tthis.cell = cell;\n\t\tthis.params = this._initializeParams(editorParams);\n\t\t\n\t\tthis.data = [];\n\t\tthis.displayItems = [];\n\t\tthis.currentItems = [];\n\t\tthis.focusedItem = null;\n\t\t\n\t\tthis.input = this._createInputElement();\n\t\tthis.listEl = this._createListElement();\n\t\t\n\t\tthis.initialValues = null; \n\t\t\n\t\tthis.isFilter = !cell._getSelf;\n\t\t\n\t\tthis.filterTimeout = null;\n\t\tthis.filtered = false;\n\t\tthis.typing = false;\n\t\t\n\t\tthis.values = []; \n\t\tthis.popup = null; \n\t\t\n\t\tthis.listIteration = 0;\n\t\t\n\t\tthis.lastAction=\"\";\n\t\tthis.filterTerm=\"\";\n\t\t\n\t\tthis.blurable = true;\n\t\t\n\t\tthis.actions = {\n\t\t\tsuccess:success,\n\t\t\tcancel:cancel\n\t\t};\n\t\t\n\t\tthis._deprecatedOptionsCheck();\n\t\tthis._initializeValue();\n\t\t\n\t\tonRendered(this._onRendered.bind(this));\n\t}\n\t\n\t_deprecatedOptionsCheck(){\n\t\tif(this.params.listItemFormatter){\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\n\t\t}\n\t\t\n\t\tif(this.params.sortValuesList){\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\n\t\t}\n\t\t\n\t\tif(this.params.searchFunc){\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\n\t\t}\n\t\t\n\t\tif(this.params.searchingPlaceholder){\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\n\t\t}\n\t}\n\t\n\t_initializeValue(){\n\t\tvar initialValue = this.cell.getValue();\n\t\t\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\n\t\t\tinitialValue = this.params.defaultValue;\n\t\t}\n\t\t\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\n\t\t\n\t\tif(this.isFilter){\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\n\t\t\tthis.headerFilterInitialListGen(); \n\t\t}\n\t}\n\t\n\t_onRendered(){\n\t\tvar cellEl = this.cell.getElement();\n\t\t\n\t\tfunction clickStop(e){\n\t\t\te.stopPropagation();\n\t\t}\t\n\t\n\t\tif(!this.isFilter){\n\t\t\tthis.input.style.height = \"100%\";\n\t\t\tthis.input.focus({preventScroll: true});\n\t\t}\n\t\t\n\t\t\n\t\tcellEl.addEventListener(\"click\", clickStop);\n\t\t\n\t\tsetTimeout(() => {\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\n\t\t}, 1000);\n\t\t\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\n\t}\n\t\n\t_createListElement(){\n\t\tvar listEl = document.createElement(\"div\");\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\n\t\t\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\n\t\t\n\t\treturn listEl;\n\t}\n\t\n\t_setListWidth(){\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\n\t\t\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\n\t\t\n\t\tif(this.params.maxWidth){\n\t\t\tif(this.params.maxWidth === true){\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\n\t\t\t}else{\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t_createInputElement(){\n\t\tvar attribs = this.params.elementAttributes;\n\t\tvar input = document.createElement(\"input\");\n\t\t\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\n\t\t\n\t\tinput.style.padding = \"4px\";\n\t\tinput.style.width = \"100%\";\n\t\tinput.style.boxSizing = \"border-box\";\n\t\t\n\t\tif(!this.params.autocomplete){\n\t\t\tinput.style.cursor = \"default\";\n\t\t\tinput.style.caretColor = \"transparent\";\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\n\t\t}\n\t\t\n\t\tif(attribs && typeof attribs == \"object\"){\n\t\t\tfor (let key in attribs){\n\t\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\t\tkey = key.slice(1);\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\n\t\t\t\t}else{\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.params.mask){\n\t\t\tmaskInput(input, this.params);\n\t\t}\n\t\t\n\t\tthis._bindInputEvents(input);\n\t\t\n\t\treturn input;\n\t}\n\t\n\t_initializeParams(params){\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\n\t\tvalueCheck;\n\t\t\n\t\tparams = Object.assign({}, params);\n\t\t\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\n\t\t\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\n\t\t\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\n\t\t\n\t\tif(!valueCheck){\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\n\t\t}else if(valueCheck > 1){\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\n\t\t}\n\t\t\n\t\tif(params.autocomplete){\n\t\t\tif(params.multiselect){\n\t\t\t\tparams.multiselect = false;\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\n\t\t\t}\n\t\t}else{\n\t\t\tif(params.freetext){\n\t\t\t\tparams.freetext = false;\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t\t\n\t\t\tif(params.filterFunc){\n\t\t\t\tparams.filterFunc = false;\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t\t\n\t\t\tif(params.filterRemote){\n\t\t\t\tparams.filterRemote = false;\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t\t\n\t\t\tif(params.mask){\n\t\t\t\tparams.mask = false;\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t\t\n\t\t\tif(params.allowEmpty){\n\t\t\t\tparams.allowEmpty = false;\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t\t\n\t\t\tif(params.listOnEmpty){\n\t\t\t\tparams.listOnEmpty = false;\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\n\t\t\tparams.filterRemote = false;\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\n\t\t}\n\t\treturn params;\n\t}\n\t//////////////////////////////////////\n\t////////// Event Handling ////////////\n\t//////////////////////////////////////\n\t\n\t_bindInputEvents(input){\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\n\t\t\n\t\tif(this.params.autocomplete){\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\n\t\t}\n\t}\n\t\n\t\n\t_inputFocus(e){\n\t\tthis.rebuildOptionsList();\n\t}\n\t\n\t_filter(){\n\t\tif(this.params.filterRemote){\n\t\t\tclearTimeout(this.filterTimeout);\n\t\t\t\n\t\t\tthis.filterTimeout = setTimeout(() => {\n\t\t\t\tthis.rebuildOptionsList();\n\t\t\t}, this.params.filterDelay);\n\t\t}else{\n\t\t\tthis._filterList();\n\t\t}\n\t}\n\t\n\t_inputClick(e){\n\t\te.stopPropagation();\n\t}\n\t\n\t_inputBlur(e){\n\t\tif(this.blurable){\n\t\t\tif(this.popup){\n\t\t\t\tthis.popup.hide();\n\t\t\t}else{\n\t\t\t\tthis._resolveValue(true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_inputSearch(){\n\t\tthis._clearChoices();\n\t}\n\t\n\t_inputKeyDown(e){\n\t\tswitch(e.keyCode){\n\t\t\t\n\t\t\tcase 38: //up arrow\n\t\t\t\tthis._keyUp(e);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 40: //down arrow\n\t\t\t\tthis._keyDown(e);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 37: //left arrow\n\t\t\tcase 39: //right arrow\n\t\t\t\tthis._keySide(e);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 13: //enter\n\t\t\t\tthis._keyEnter();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 27: //escape\n\t\t\t\tthis._keyEsc();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 36: //home\n\t\t\tcase 35: //end\n\t\t\t\tthis._keyHomeEnd(e);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 9: //tab\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthis._keySelectLetter(e);\n\t\t}\n\t}\n\t\n\t_inputKeyUp(e){\n\t\tswitch(e.keyCode){\n\t\t\tcase 38: //up arrow\n\t\t\tcase 37: //left arrow\n\t\t\tcase 39: //up arrow\n\t\t\tcase 40: //right arrow\n\t\t\tcase 13: //enter\n\t\t\tcase 27: //escape\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthis._keyAutoCompLetter(e);\n\t\t}\n\t}\n\t\n\t_preventPopupBlur(){\n\t\tif(this.popup){\n\t\t\tthis.popup.blockHide();\n\t\t}\n\t\t\n\t\tsetTimeout(() =>{\n\t\t\tif(this.popup){\n\t\t\t\tthis.popup.restoreHide();\n\t\t\t}\n\t\t}, 10);\n\t}\n\t\n\t_preventBlur(){\n\t\tthis.blurable = false;\n\t\t\n\t\tsetTimeout(() =>{\n\t\t\tthis.blurable = true;\n\t\t}, 10);\n\t}\n\t\n\t//////////////////////////////////////\n\t//////// Keyboard Navigation /////////\n\t//////////////////////////////////////\n\t\n\t_keyUp(e){\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\n\t\t\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\n\t\t\te.stopImmediatePropagation();\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tif(index > 0){\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_keyDown(e){\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\n\t\t\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\n\t\t\te.stopImmediatePropagation();\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tif(index < this.displayItems.length - 1){\n\t\t\t\tif(index == -1){\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\n\t\t\t\t}else{\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_keySide(e){\n\t\tif(!this.params.autocomplete){\n\t\t\te.stopImmediatePropagation();\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\t\n\t_keyEnter(e){\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\n\t\t\tthis._resolveValue(true);\n\t\t}else{\n\t\t\tif(this.focusedItem){\n\t\t\t\tthis._chooseItem(this.focusedItem);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_keyEsc(e){\n\t\tthis._cancel();\n\t}\n\t\n\t_keyHomeEnd(e){\n\t\tif(this.params.autocomplete){\n\t\t\t//prevent table navigation while using input element\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\t\n\t_keySelectLetter(e){\n\t\tif(!this.params.autocomplete){\n\t\t\t// if(this.edit.currentCell === false){\n\t\t\te.preventDefault();\n\t\t\t// }\n\t\t\t\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\n\t\t\t\tthis._scrollToValue(e.keyCode);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_keyAutoCompLetter(e){\n\t\tthis._filter();\n\t\tthis.lastAction = \"typing\";\n\t\tthis.typing = true;\n\t}\n\t\n\t\n\t_scrollToValue(char){\n\t\tclearTimeout(this.filterTimeout);\n\t\t\n\t\tvar character = String.fromCharCode(char).toLowerCase();\n\t\tthis.filterTerm += character.toLowerCase();\n\t\t\n\t\tvar match = this.displayItems.find((item) => {\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\n\t\t});\n\t\t\n\t\tif(match){\n\t\t\tthis._focusItem(match);\n\t\t}\n\t\t\n\t\tthis.filterTimeout = setTimeout(() => {\n\t\t\tthis.filterTerm = \"\";\n\t\t}, 800);\n\t}\n\t\n\t_focusItem(item){\n\t\tthis.lastAction = \"focus\";\n\t\t\n\t\tif(this.focusedItem && this.focusedItem.element){\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\n\t\t}\n\t\t\n\t\tthis.focusedItem = item;\n\t\t\n\t\tif(item && item.element){\n\t\t\titem.element.classList.add(\"focused\");\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\n\t\t}\n\t}\n\t\n\t\n\t//////////////////////////////////////\n\t/////// Data List Generation /////////\n\t//////////////////////////////////////\n\theaderFilterInitialListGen(){\n\t\tthis._generateOptions(true);\n\t}\n\t\n\trebuildOptionsList(){\n\t\tthis._generateOptions()\n\t\t\t.then(this._sortOptions.bind(this))\n\t\t\t.then(this._buildList.bind(this))\n\t\t\t.then(this._showList.bind(this))\n\t\t\t.catch((e) => {\n\t\t\t\tif(!Number.isInteger(e)){\n\t\t\t\t\tconsole.error(\"List generation error\", e);\n\t\t\t\t}\n\t\t\t});\n\t}\n\t\n\t_filterList(){\n\t\tthis._buildList(this._filterOptions());\n\t\tthis._showList();\n\t}\n\t\n\t_generateOptions(silent){\n\t\tvar values = [];\n\t\tvar iteration = ++ this.listIteration;\n\t\t\n\t\tthis.filtered = false;\n\t\t\n\t\tif(this.params.values){\n\t\t\tvalues = this.params.values;\n\t\t}else if (this.params.valuesURL){\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\n\t\t}else{\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\n\t\t\t}else if(this.params.valuesLookup){\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(values instanceof Promise){\n\t\t\tif(!silent){\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\n\t\t\t}\n\t\t\t\n\t\t\treturn values.then()\n\t\t\t\t.then((responseValues) => {\n\t\t\t\t\tif(this.listIteration === iteration){\n\t\t\t\t\t\treturn this._parseList(responseValues);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn Promise.reject(iteration);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}else{\n\t\t\treturn Promise.resolve(this._parseList(values));\n\t\t}\n\t}\n\t\n\t_addPlaceholder(contents){\n\t\tvar placeholder = document.createElement(\"div\");\n\t\t\n\t\tif(typeof contents === \"function\"){\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\n\t\t}\n\t\t\n\t\tif(contents){\n\t\t\tthis._clearList();\n\t\t\t\n\t\t\tif(contents instanceof HTMLElement){\n\t\t\t\tplaceholder = contents;\n\t\t\t}else{\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\n\t\t\t\tplaceholder.innerHTML = contents;\n\t\t\t}\n\t\t\t\n\t\t\tthis.listEl.appendChild(placeholder);\n\t\t\t\n\t\t\tthis._showList();\n\t\t}\n\t}\n\t\n\t_ajaxRequest(url, term){\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\n\t\turl = urlBuilder(url, {}, params);\n\t\t\n\t\treturn fetch(url)\n\t\t\t.then((response)=>{\n\t\t\t\tif(response.ok) {\n\t\t\t\t\treturn response.json()\n\t\t\t\t\t\t.catch((error)=>{\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\n\t\t\t\t\t\t\treturn Promise.reject(error);\n\t\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\n\t\t\t\t\treturn Promise.reject(response);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch((error)=>{\n\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \", error);\n\t\t\t\treturn Promise.reject(error);\n\t\t\t});\n\t}\n\t\n\t_uniqueColumnValues(field){\n\t\tvar output = {},\n\t\tdata = this.table.getData(this.params.valuesLookup),\n\t\tcolumn;\n\t\t\n\t\tif(field){\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\n\t\t}else{\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\n\t\t}\n\t\t\n\t\tif(column){\n\t\t\tdata.forEach((row) => {\n\t\t\t\tvar val = column.getFieldValue(row);\n\t\t\t\t\n\t\t\t\tif(val !== null && typeof val !== \"undefined\" && val !== \"\"){\n\t\t\t\t\toutput[val] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tconsole.warn(\"unable to find matching column to create select lookup list:\", field);\n\t\t\toutput = [];\n\t\t}\n\t\t\n\t\treturn Object.keys(output);\n\t}\n\t\n\t\n\t_parseList(inputValues){\n\t\tvar data = [];\n\t\t\n\t\tif(!Array.isArray(inputValues)){\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\n\t\t\t\treturn {\n\t\t\t\t\tlabel:value,\n\t\t\t\t\tvalue:key,\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\t\n\t\tinputValues.forEach((value) => {\n\t\t\tif(typeof value !== \"object\"){\n\t\t\t\tvalue = {\n\t\t\t\t\tlabel:value,\n\t\t\t\t\tvalue:value,\n\t\t\t\t};\n\t\t\t}\n\t\t\t\n\t\t\tthis._parseListItem(value, data, 0);\n\t\t});\n\t\t\n\t\tif(!this.currentItems.length && this.params.freetext){\n\t\t\tthis.input.value = this.initialValues;\n\t\t\tthis.typing = true;\n\t\t\tthis.lastAction = \"typing\";\n\t\t}\n\t\t\n\t\tthis.data = data;\n\t\t\n\t\treturn data; \n\t}\n\t\n\t_parseListItem(option, data, level){\n\t\tvar item = {};\n\t\t\n\t\tif(option.options){\n\t\t\titem = this._parseListGroup(option, level + 1);\n\t\t}else{\n\t\t\titem = {\n\t\t\t\tlabel:option.label,\n\t\t\t\tvalue:option.value,\n\t\t\t\titemParams:option.itemParams,\n\t\t\t\telementAttributes: option.elementAttributes,\n\t\t\t\telement:false,\n\t\t\t\tselected:false,\n\t\t\t\tvisible:true,\n\t\t\t\tlevel:level,\n\t\t\t\toriginal:option,\n\t\t\t};\n\t\t\t\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\n\t\t\t\tthis._chooseItem(item, true);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdata.push(item);\n\t}\n\t\n\t_parseListGroup(option, level){\n\t\tvar item = {\n\t\t\tlabel:option.label,\n\t\t\tgroup:true,\n\t\t\titemParams:option.itemParams,\n\t\t\telementAttributes:option.elementAttributes,\n\t\t\telement:false,\n\t\t\tvisible:true,\n\t\t\tlevel:level,\n\t\t\toptions:[],\n\t\t\toriginal:option,\n\t\t};\n\t\t\n\t\toption.options.forEach((child) => {\n\t\t\tthis._parseListItem(child, item.options, level);\n\t\t});\n\t\t\n\t\treturn item;\n\t}\n\t\n\t_sortOptions(options){\n\t\tvar sorter;\n\t\t\n\t\tif(this.params.sort){\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\n\t\t\t\n\t\t\tthis._sortGroup(sorter, options);\n\t\t}\n\t\t\n\t\treturn options;\n\t}\n\t\n\t_sortGroup(sorter, options){\n\t\toptions.sort((a,b) => {\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\n\t\t});\n\t\t\n\t\toptions.forEach((option) => {\n\t\t\tif(option.group){\n\t\t\t\tthis._sortGroup(sorter, option.options);\n\t\t\t}\n\t\t});\n\t}\n\t\n\t_defaultSortFunction(as, bs){\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\n\t\tvar emptyAlign = 0;\n\t\t\n\t\tif(this.params.sort === \"desc\"){\n\t\t\t[as, bs] = [bs, as];\n\t\t}\n\t\t\n\t\t//handle empty values\n\t\tif(!as && as!== 0){\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\n\t\t}else if(!bs && bs!== 0){\n\t\t\temptyAlign = 1;\n\t\t}else{\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\n\t\t\ta = String(as).toLowerCase();\n\t\t\tb = String(bs).toLowerCase();\n\t\t\tif(a === b) return 0;\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\n\t\t\ta = a.match(rx);\n\t\t\tb = b.match(rx);\n\t\t\tL = a.length > b.length ? b.length : a.length;\n\t\t\twhile(i < L){\n\t\t\t\ta1= a[i];\n\t\t\t\tb1= b[i++];\n\t\t\t\tif(a1 !== b1){\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\n\t\t\t\t\t\treturn a1 - b1;\n\t\t\t\t\t}\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn a.length > b.length;\n\t\t}\n\t\t\n\t\treturn emptyAlign;\n\t}\n\t\n\t_filterOptions(){\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\n\t\tterm = this.input.value;\n\t\t\n\t\tif(term){\n\t\t\tthis.filtered = true;\n\t\t\t\n\t\t\tthis.data.forEach((item) => {\n\t\t\t\tthis._filterItem(filterFunc, term, item);\n\t\t\t});\n\t\t}else{\n\t\t\tthis.filtered = false;\n\t\t}\n\t\t\n\t\treturn this.data;\n\t}\n\t\n\t_filterItem(func, term, item){\n\t\tvar matches = false;\n\t\t\n\t\tif(!item.group){\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\n\t\t}else{\n\t\t\titem.options.forEach((option) => {\n\t\t\t\tif(this._filterItem(func, term, option)){\n\t\t\t\t\tmatches = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\titem.visible = matches;\n\t\t}\n\t\t\n\t\treturn item.visible;\n\t}\n\t\n\t_defaultFilterFunc(term, label, value, item){\n\t\tterm = String(term).toLowerCase();\n\t\t\n\t\tif(label !== null && typeof label !== \"undefined\"){\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\t//////////////////////////////////////\n\t/////////// Display List /////////////\n\t//////////////////////////////////////\n\t\n\t_clearList(){\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\n\t\t\n\t\tthis.displayItems = [];\n\t}\n\t\n\t_buildList(data){\n\t\tthis._clearList();\n\t\t\n\t\tdata.forEach((option) => {\n\t\t\tthis._buildItem(option);\n\t\t});\n\t\t\n\t\tif(!this.displayItems.length){\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\n\t\t} \n\t}\n\t\n\t_buildItem(item){\n\t\tvar el = item.element,\n\t\tcontents;\n\t\t\n\t\tif(!this.filtered || item.visible){\n\t\t\t\n\t\t\tif(!el){\n\t\t\t\tel = document.createElement(\"div\");\n\t\t\t\tel.tabIndex = 0;\n\t\t\t\t\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\n\t\t\t\t\n\t\t\t\tif(contents instanceof HTMLElement){\n\t\t\t\t\tel.appendChild(contents);\n\t\t\t\t}else{\n\t\t\t\t\tel.innerHTML = contents;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(item.group){\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\n\t\t\t\t}else{\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\n\t\t\t\t\n\t\t\t\tif(item.elementAttributes && typeof item.elementAttributes == \"object\"){\n\t\t\t\t\tfor (let key in item.elementAttributes){\n\t\t\t\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\t\t\t\tkey = key.slice(1);\n\t\t\t\t\t\t\tel.setAttribute(key, this.input.getAttribute(key) + item.elementAttributes[\"+\" + key]);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tel.setAttribute(key, item.elementAttributes[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(item.group){\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\n\t\t\t\t}else{\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\n\t\t\t\t\n\t\t\t\titem.element = el;\n\t\t\t}\n\t\t\t\n\t\t\tthis._styleItem(item);\n\t\t\t\n\t\t\tthis.listEl.appendChild(el);\n\t\t\t\n\t\t\tif(item.group){\n\t\t\t\titem.options.forEach((option) => {\n\t\t\t\t\tthis._buildItem(option);\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tthis.displayItems.push(item);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_showList(){\n\t\tvar startVis = this.popup && this.popup.isVisible();\n\t\t\n\t\tif(this.input.parentNode){\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\n\t\t\t\tif(this.popup){\n\t\t\t\t\tthis.popup.hide(true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis._setListWidth();\n\t\t\t\n\t\t\tif(!this.popup){\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\n\t\t\t}\n\t\t\t\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\n\t\t\t\n\t\t\tif(!startVis){\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\n\t\t\t\t}, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_styleItem(item){\n\t\tif(item && item.element){\n\t\t\tif(item.selected){\n\t\t\t\titem.element.classList.add(\"active\");\n\t\t\t}else{\n\t\t\t\titem.element.classList.remove(\"active\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//////////////////////////////////////\n\t///////// User Interaction ///////////\n\t//////////////////////////////////////\n\t\n\t_itemClick(item, e){\n\t\te.stopPropagation();\n\t\t\n\t\tthis._chooseItem(item);\n\t}\n\t\n\t_groupClick(item, e){\n\t\te.stopPropagation();\n\t}\n\t\n\t\n\t//////////////////////////////////////\n\t////// Current Item Management ///////\n\t//////////////////////////////////////\n\t\n\t_cancel(){\n\t\tthis.popup.hide(true);\n\t\tthis.actions.cancel();\n\t}\n\t\n\t_clearChoices(){\n\t\tthis.typing = true;\n\t\t\n\t\tthis.currentItems.forEach((item) => {\n\t\t\titem.selected = false;\n\t\t\tthis._styleItem(item);\n\t\t});\n\t\t\n\t\tthis.currentItems = [];\n\t\t\n\t\tthis.focusedItem = null;\n\t}\n\t\n\t_chooseItem(item, silent){\n\t\tvar index;\n\t\t\n\t\tthis.typing = false;\n\t\t\n\t\tif(this.params.multiselect){\n\t\t\tindex = this.currentItems.indexOf(item);\n\t\t\t\n\t\t\tif(index > -1){\n\t\t\t\tthis.currentItems.splice(index, 1);\n\t\t\t\titem.selected = false;\n\t\t\t}else{\n\t\t\t\tthis.currentItems.push(item);\n\t\t\t\titem.selected = true;\n\t\t\t}\n\t\t\t\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\n\t\t\t\n\t\t\tthis._styleItem(item);\n\t\t\t\n\t\t}else{\n\t\t\tthis.currentItems = [item];\n\t\t\titem.selected = true;\n\t\t\t\n\t\t\tthis.input.value = item.label;\n\t\t\t\n\t\t\tthis._styleItem(item);\n\t\t\t\n\t\t\tif(!silent){\n\t\t\t\tthis._resolveValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis._focusItem(item);\n\t}\n\t\n\t_resolveValue(blur){\n\t\tvar output, initialValue;\n\n\t\tif(this.popup){\n\t\t\tthis.popup.hide(true);\n\t\t}\n\t\t\n\t\tif(this.params.multiselect){\n\t\t\toutput = this.currentItems.map(item => item.value);\n\t\t}else{\n\t\t\tif(blur && this.params.autocomplete && this.typing){\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\n\t\t\t\t\toutput = this.input.value;\n\t\t\t\t}else{\n\t\t\t\t\tthis.actions.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(this.currentItems[0]){\n\t\t\t\t\toutput = this.currentItems[0].value;\n\t\t\t\t}else{\n\t\t\t\t\tinitialValue = Array.isArray(this.initialValues) ? this.initialValues[0] : this.initialValues;\n\t\t\t\t\t\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\n\t\t\t\t\t\toutput = initialValue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\toutput = this.params.emptyValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(output === \"\"){\n\t\t\toutput = this.params.emptyValue;\n\t\t}\n\t\t\n\t\tthis.actions.success(output);\n\t\t\n\t\tif(this.isFilter){\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\n\t\t\tthis.currentItems = [];\n\t\t}\n\t}\n\t\n}\n","import input from './editors/input.js';\nimport textarea from './editors/textarea.js';\nimport number from './editors/number.js';\nimport range from './editors/range.js';\nimport date from './editors/date.js';\nimport time from './editors/time.js';\nimport datetime from './editors/datetime.js';\nimport select from './editors/select.js';\nimport list from './editors/list.js';\nimport autocomplete from './editors/autocomplete.js';\nimport star from './editors/star.js';\nimport progress from './editors/progress.js';\nimport tickCross from './editors/tickCross.js';\n\nexport default {\n\tinput:input,\n\ttextarea:textarea,\n\tnumber:number,\n\trange:range,\n\tdate:date,\n\ttime:time,\n\tdatetime:datetime,\n\tselect:select,\n\tlist:list,\n\tautocomplete:autocomplete,\n\tstar:star,\n\tprogress:progress,\n\ttickCross:tickCross,\n};","import maskInput from '../../inputMask.js';\n\n//input element\nexport default function(cell, onRendered, success, cancel, editorParams){\n\t//create and style input\n\tvar cellValue = cell.getValue(),\n\tinput = document.createElement(\"input\");\n\n\tinput.setAttribute(\"type\", editorParams.search ? \"search\" : \"text\");\n\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\tinput.value = typeof cellValue !== \"undefined\" ? cellValue : \"\";\n\n\tonRendered(function(){\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction onChange(e){\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\n\t\t\tif(success(input.value)){\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\n\t//submit new value on blur or change\n\tinput.addEventListener(\"change\", onChange);\n\tinput.addEventListener(\"blur\", onChange);\n\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\t// case 9:\n\t\t\tcase 13:\n\t\t\t\tonChange(e);\n\t\t\t\tbreak;\n\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(editorParams.mask){\n\t\tmaskInput(input, editorParams);\n\t}\n\n\treturn input;\n}","import maskInput from '../../inputMask.js';\n\n//resizable text area element\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar cellValue = cell.getValue(),\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\n\tinput = document.createElement(\"textarea\"),\n\tscrollHeight = 0;\n\n\t//create and style input\n\tinput.style.display = \"block\";\n\tinput.style.padding = \"2px\";\n\tinput.style.height = \"100%\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\tinput.style.whiteSpace = \"pre-wrap\";\n\tinput.style.resize = \"none\";\n\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\tinput.value = value;\n\n\tonRendered(function(){\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\n\t\t\tinput.scrollHeight;\n\t\t\tinput.style.height = input.scrollHeight + \"px\";\n\t\t\tcell.getRow().normalizeHeight();\n\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction onChange(e){\n\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\n\n\t\t\tif(success(input.value)){\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tcell.getRow().normalizeHeight();\n\t\t\t},300);\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\n\t//submit new value on blur or change\n\tinput.addEventListener(\"change\", onChange);\n\tinput.addEventListener(\"blur\", onChange);\n\n\tinput.addEventListener(\"keyup\", function(){\n\n\t\tinput.style.height = \"\";\n\n\t\tvar heightNow = input.scrollHeight;\n\n\t\tinput.style.height = heightNow + \"px\";\n\n\t\tif(heightNow != scrollHeight){\n\t\t\tscrollHeight = heightNow;\n\t\t\tcell.getRow().normalizeHeight();\n\t\t}\n\t});\n\n\tinput.addEventListener(\"keydown\", function(e){\n\n\t\tswitch(e.keyCode){\n\n\t\t\tcase 13:\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\n\t\t\t\t\tonChange(e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\n\t\t\tcase 38: //up arrow\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 40: //down arrow\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(editorParams.mask){\n\t\tmaskInput(input, editorParams);\n\t}\n\n\treturn input;\n}","import maskInput from '../../inputMask.js';\n\n//input element with type of number\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar cellValue = cell.getValue(),\n\tvertNav = editorParams.verticalNavigation || \"editor\",\n\tinput = document.createElement(\"input\");\n\n\tinput.setAttribute(\"type\", \"number\");\n\n\tif(typeof editorParams.max != \"undefined\"){\n\t\tinput.setAttribute(\"max\", editorParams.max);\n\t}\n\n\tif(typeof editorParams.min != \"undefined\"){\n\t\tinput.setAttribute(\"min\", editorParams.min);\n\t}\n\n\tif(typeof editorParams.step != \"undefined\"){\n\t\tinput.setAttribute(\"step\", editorParams.step);\n\t}\n\n\t//create and style input\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\tinput.value = cellValue;\n\n\tvar blurFunc = function(e){\n\t\tonChange();\n\t};\n\n\tonRendered(function () {\n\t\tif(cell._getSelf){\n\t\t\t//submit new value on blur\n\t\t\tinput.removeEventListener(\"blur\", blurFunc);\n\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\n\t\t\t//submit new value on blur\n\t\t\tinput.addEventListener(\"blur\", blurFunc);\n\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction onChange(){\n\t\tvar value = input.value;\n\n\t\tif(!isNaN(value) && value !==\"\"){\n\t\t\tvalue = Number(value);\n\t\t}\n\n\t\tif(value !== cellValue){\n\t\t\tif(success(value)){\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\tcase 13:\n\t\t\t// case 9:\n\t\t\t\tonChange();\n\t\t\t\tbreak;\n\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\n\t\t\tcase 38: //up arrow\n\t\t\tcase 40: //down arrow\n\t\t\t\tif(vertNav == \"editor\"){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(editorParams.mask){\n\t\tmaskInput(input, editorParams);\n\t}\n\n\treturn input;\n}","//input element with type of number\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar cellValue = cell.getValue(),\n\tinput = document.createElement(\"input\");\n\t\n\tinput.setAttribute(\"type\", \"range\");\n\t\n\tif (typeof editorParams.max != \"undefined\") {\n\t\tinput.setAttribute(\"max\", editorParams.max);\n\t}\n\t\n\tif (typeof editorParams.min != \"undefined\") {\n\t\tinput.setAttribute(\"min\", editorParams.min);\n\t}\n\t\n\tif (typeof editorParams.step != \"undefined\") {\n\t\tinput.setAttribute(\"step\", editorParams.step);\n\t}\n\t\n\t//create and style input\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\t\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tinput.value = cellValue;\n\t\n\tonRendered(function () {\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\t\t}\n\t});\n\t\n\tfunction onChange(){\n\t\tvar value = input.value;\n\t\t\n\t\tif(!isNaN(value) && value !==\"\"){\n\t\t\tvalue = Number(value);\n\t\t}\n\t\t\n\t\tif(value != cellValue){\n\t\t\tif(success(value)){\n\t\t\t\tcellValue = value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\t\n\t//submit new value on blur\n\tinput.addEventListener(\"blur\", function(e){\n\t\tonChange();\n\t});\n\t\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\tcase 13:\n\t\t\t// case 9:\n\t\t\t\tonChange();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\t\t}\n\t});\n\t\n\treturn input;\n}","//input element\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar inputFormat = editorParams.format,\n\tvertNav = editorParams.verticalNavigation || \"editor\",\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\n\t\n\t//create and style input\n\tvar cellValue = cell.getValue(),\n\tinput = document.createElement(\"input\");\n\t\n\tfunction convertDate(value){\n\t\tvar newDatetime;\n\t\t\n\t\tif(DT.isDateTime(value)){\n\t\t\tnewDatetime = value;\n\t\t}else if(inputFormat === \"iso\"){\n\t\t\tnewDatetime = DT.fromISO(String(value));\n\t\t}else{\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\n\t\t}\n\t\t\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\n\t}\n\t\n\tinput.type = \"date\";\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\n\tif(editorParams.max){\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\n\t}\n\n\tif(editorParams.min){\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\n\t}\n\t\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\n\t\n\tif(inputFormat){\n\t\tif(DT){\t\t\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\n\t\t}else{\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'format' param is dependant on luxon.js\");\n\t\t}\n\t}\n\t\n\tinput.value = cellValue;\n\t\n\tonRendered(function(){\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\t\t\t\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\t\n\tfunction onChange(){\n\t\tvar value = input.value,\n\t\tluxDate;\n\t\t\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\n\t\t\t\n\t\t\tif(value && inputFormat){\n\t\t\t\tluxDate = DT.fromFormat(String(value), \"yyyy-MM-dd\");\n\n\t\t\t\tswitch(inputFormat){\n\t\t\t\t\tcase true:\n\t\t\t\t\t\tvalue = luxDate;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"iso\":\n\t\t\t\t\t\tvalue = luxDate.toISO();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tvalue = luxDate.toFormat(inputFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(success(value)){\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\t\n\t//submit new value on blur\n\tinput.addEventListener(\"blur\", function(e) {\n\t\tif (e.relatedTarget || e.rangeParent || e.explicitOriginalTarget !== input) {\n\t\t\tonChange(); // only on a \"true\" blur; not when focusing browser's date/time picker\n\t\t}\n\t});\n\t\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\t// case 9:\n\t\t\tcase 13:\n\t\t\t\tonChange();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 38: //up arrow\n\t\t\tcase 40: //down arrow\n\t\t\t\tif(vertNav == \"editor\"){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t});\n\t\n\treturn input;\n}\n","//input element\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar inputFormat = editorParams.format,\n\tvertNav = editorParams.verticalNavigation || \"editor\",\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \n\tnewDatetime;\n\t\n\t//create and style input\n\tvar cellValue = cell.getValue(),\n\tinput = document.createElement(\"input\");\n\t\n\tinput.type = \"time\";\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\t\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\n\t\n\tif(inputFormat){\n\t\tif(DT){\n\t\t\tif(DT.isDateTime(cellValue)){\n\t\t\t\tnewDatetime = cellValue;\n\t\t\t}else if(inputFormat === \"iso\"){\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\n\t\t\t}else{\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\n\t\t\t}\n\t\t\t\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\n\t\t\t\n\t\t}else{\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'format' param is dependant on luxon.js\");\n\t\t}\n\t}\n\t\n\tinput.value = cellValue;\n\t\n\tonRendered(function(){\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\t\t\t\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\t\n\tfunction onChange(){\n\t\tvar value = input.value,\n\t\tluxTime;\n\t\t\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\n\t\t\t\n\t\t\tif(value && inputFormat){\n\t\t\t\tluxTime = DT.fromFormat(String(value), \"hh:mm\");\n\n\t\t\t\tswitch(inputFormat){\n\t\t\t\t\tcase true:\n\t\t\t\t\t\tvalue = luxTime;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"iso\":\n\t\t\t\t\t\tvalue = luxTime.toISO();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tvalue = luxTime.toFormat(inputFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(success(value)){\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\t\n\t//submit new value on blur\n\tinput.addEventListener(\"blur\", function(e) {\n\t\tif (e.relatedTarget || e.rangeParent || e.explicitOriginalTarget !== input) {\n\t\t\tonChange(); // only on a \"true\" blur; not when focusing browser's date/time picker\n\t\t}\n\t});\n\t\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\t// case 9:\n\t\t\tcase 13:\n\t\t\t\tonChange();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\n\t\t\tcase 38: //up arrow\n\t\t\tcase 40: //down arrow\n\t\t\t\tif(vertNav == \"editor\"){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t});\n\t\n\treturn input;\n}\n","//input element\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar inputFormat = editorParams.format,\n\tvertNav = editorParams.verticalNavigation || \"editor\",\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \n\tnewDatetime;\n\t\n\t//create and style input\n\tvar cellValue = cell.getValue(),\n\tinput = document.createElement(\"input\");\n\t\n\tinput.type = \"datetime-local\";\n\tinput.style.padding = \"4px\";\n\tinput.style.width = \"100%\";\n\tinput.style.boxSizing = \"border-box\";\n\t\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\n\t\n\tif(inputFormat){\n\t\tif(DT){\n\t\t\tif(DT.isDateTime(cellValue)){\n\t\t\t\tnewDatetime = cellValue;\n\t\t\t}else if(inputFormat === \"iso\"){\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\n\t\t\t}else{\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\n\t\t\t}\n\t\t\t\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\n\t\t}else{\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'format' param is dependant on luxon.js\");\n\t\t}\n\t}\n\t\n\tinput.value = cellValue;\n\t\n\tonRendered(function(){\n\t\tif(cell._getSelf){\n\t\t\tinput.focus({preventScroll: true});\n\t\t\tinput.style.height = \"100%\";\n\t\t\t\n\t\t\tif(editorParams.selectContents){\n\t\t\t\tinput.select();\n\t\t\t}\n\t\t}\n\t});\n\t\n\tfunction onChange(){\n\t\tvar value = input.value,\n\t\tluxDateTime;\n\t\t\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\n\n\t\t\tif(value && inputFormat){\n\t\t\t\tluxDateTime = DT.fromISO(String(value));\n\n\t\t\t\tswitch(inputFormat){\n\t\t\t\t\tcase true:\n\t\t\t\t\t\tvalue = luxDateTime;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"iso\":\n\t\t\t\t\t\tvalue = luxDateTime.toISO();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tvalue = luxDateTime.toFormat(inputFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(success(value)){\n\t\t\t\tcellValue = input.value; //persist value if successfully validated incase editor is used as header filter\n\t\t\t}\n\t\t}else{\n\t\t\tcancel();\n\t\t}\n\t}\n\t\n\t//submit new value on blur\n\tinput.addEventListener(\"blur\", function(e) {\n\t\tif (e.relatedTarget || e.rangeParent || e.explicitOriginalTarget !== input) {\n\t\t\tonChange(); // only on a \"true\" blur; not when focusing browser's date/time picker\n\t\t}\n\t});\n\t\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\t// case 9:\n\t\t\tcase 13:\n\t\t\t\tonChange();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 27:\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 35:\n\t\t\tcase 36:\n\t\t\t\te.stopPropagation();\n\t\t\t\tbreak;\n\n\t\t\tcase 38: //up arrow\n\t\t\tcase 40: //down arrow\n\t\t\t\tif(vertNav == \"editor\"){\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t});\n\t\n\treturn input;\n}\n","import List from '../../List.js';\n\nexport default function(cell, onRendered, success, cancel, editorParams){\n\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\n\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\n\n\treturn list.input;\n}","import List from '../../List.js';\n\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\n\n\treturn list.input;\n}","import List from '../../List.js';\n\nexport default function(cell, onRendered, success, cancel, editorParams){\n\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\n\n\teditorParams.autocomplete = true;\n\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\n\n\treturn list.input;\n}","//star rating\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar self = this,\n\telement = cell.getElement(),\n\tvalue = cell.getValue(),\n\tmaxStars = element.getElementsByTagName(\"svg\").length || 5,\n\tsize = element.getElementsByTagName(\"svg\")[0] ? element.getElementsByTagName(\"svg\")[0].getAttribute(\"width\") : 14,\n\tstars = [],\n\tstarsHolder = document.createElement(\"div\"),\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\n\n\n\t//change star type\n\tfunction starChange(val){\n\t\tstars.forEach(function(star, i){\n\t\t\tif(i < val){\n\t\t\t\tif(self.table.browser == \"ie\"){\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-active\");\n\t\t\t\t}else{\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-inactive\", \"tabulator-star-active\");\n\t\t\t\t}\n\n\t\t\t\tstar.innerHTML = '';\n\t\t\t}else{\n\t\t\t\tif(self.table.browser == \"ie\"){\n\t\t\t\t\tstar.setAttribute(\"class\", \"tabulator-star-inactive\");\n\t\t\t\t}else{\n\t\t\t\t\tstar.classList.replace(\"tabulator-star-active\", \"tabulator-star-inactive\");\n\t\t\t\t}\n\n\t\t\t\tstar.innerHTML = '';\n\t\t\t}\n\t\t});\n\t}\n\n\t//build stars\n\tfunction buildStar(i){\n\n\t\tvar starHolder = document.createElement(\"span\");\n\t\tvar nextStar = star.cloneNode(true);\n\n\t\tstars.push(nextStar);\n\n\t\tstarHolder.addEventListener(\"mouseenter\", function(e){\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\t\t\tstarChange(i);\n\t\t});\n\n\t\tstarHolder.addEventListener(\"mousemove\", function(e){\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\t\t});\n\n\t\tstarHolder.addEventListener(\"click\", function(e){\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\t\t\tsuccess(i);\n\t\t\telement.blur();\n\t\t});\n\n\t\tstarHolder.appendChild(nextStar);\n\t\tstarsHolder.appendChild(starHolder);\n\n\t}\n\n\t//handle keyboard navigation value change\n\tfunction changeValue(val){\n\t\tvalue = val;\n\t\tstarChange(val);\n\t}\n\n\t//style cell\n\telement.style.whiteSpace = \"nowrap\";\n\telement.style.overflow = \"hidden\";\n\telement.style.textOverflow = \"ellipsis\";\n\n\t//style holding element\n\tstarsHolder.style.verticalAlign = \"middle\";\n\tstarsHolder.style.display = \"inline-block\";\n\tstarsHolder.style.padding = \"4px\";\n\n\t//style star\n\tstar.setAttribute(\"width\", size);\n\tstar.setAttribute(\"height\", size);\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\n\tstar.setAttribute(\"xml:space\", \"preserve\");\n\tstar.style.padding = \"0 1px\";\n\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tstarsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tstarsHolder.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\t//create correct number of stars\n\tfor(var i=1;i<= maxStars;i++){\n\t\tbuildStar(i);\n\t}\n\n\t//ensure value does not exceed number of stars\n\tvalue = Math.min(parseInt(value), maxStars);\n\n\t// set initial styling of stars\n\tstarChange(value);\n\n\tstarsHolder.addEventListener(\"mousemove\", function(e){\n\t\tstarChange(0);\n\t});\n\n\tstarsHolder.addEventListener(\"click\", function(e){\n\t\tsuccess(0);\n\t});\n\n\telement.addEventListener(\"blur\", function(e){\n\t\tcancel();\n\t});\n\n\t//allow key based navigation\n\telement.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\tcase 39: //right arrow\n\t\t\t\tchangeValue(value + 1);\n\t\t\t\tbreak;\n\n\t\t\tcase 37: //left arrow\n\t\t\t\tchangeValue(value - 1);\n\t\t\t\tbreak;\n\n\t\t\tcase 13: //enter\n\t\t\t\tsuccess(value);\n\t\t\t\tbreak;\n\n\t\t\tcase 27: //escape\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\treturn starsHolder;\n}","//draggable progress bar\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar element = cell.getElement(),\n\tmax = typeof editorParams.max === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"max\")) || 100) : editorParams.max,\n\tmin = typeof editorParams.min === \"undefined\" ? ((element.getElementsByTagName(\"div\")[0] && element.getElementsByTagName(\"div\")[0].getAttribute(\"min\")) || 0) : editorParams.min,\n\tpercent = (max - min) / 100,\n\tvalue = cell.getValue() || 0,\n\thandle = document.createElement(\"div\"),\n\tbar = document.createElement(\"div\"),\n\tmouseDrag, mouseDragWidth;\n\n\t//set new value\n\tfunction updateValue(){\n\t\tvar style = window.getComputedStyle(element, null);\n\n\t\tvar calcVal = (percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue(\"padding-left\")) - parseInt(style.getPropertyValue(\"padding-right\")))/100))) + min;\n\t\tsuccess(calcVal);\n\t\telement.setAttribute(\"aria-valuenow\", calcVal);\n\t\telement.setAttribute(\"aria-label\", value);\n\t}\n\n\t//style handle\n\thandle.style.position = \"absolute\";\n\thandle.style.right = \"0\";\n\thandle.style.top = \"0\";\n\thandle.style.bottom = \"0\";\n\thandle.style.width = \"5px\";\n\thandle.classList.add(\"tabulator-progress-handle\");\n\n\t//style bar\n\tbar.style.display = \"inline-block\";\n\tbar.style.position = \"relative\";\n\t// bar.style.top = \"8px\";\n\t// bar.style.bottom = \"8px\";\n\t// bar.style.left = \"4px\";\n\t// bar.style.marginRight = \"4px\";\n\tbar.style.height = \"100%\";\n\tbar.style.backgroundColor = \"#488CE9\";\n\tbar.style.maxWidth = \"100%\";\n\tbar.style.minWidth = \"0%\";\n\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tbar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tbar.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\t//style cell\n\telement.style.padding = \"4px 4px\";\n\n\t//make sure value is in range\n\tvalue = Math.min(parseFloat(value), max);\n\tvalue = Math.max(parseFloat(value), min);\n\n\t//workout percentage\n\tvalue = Math.round((value - min) / percent);\n\t// bar.style.right = value + \"%\";\n\tbar.style.width = value + \"%\";\n\n\telement.setAttribute(\"aria-valuemin\", min);\n\telement.setAttribute(\"aria-valuemax\", max);\n\n\tbar.appendChild(handle);\n\n\thandle.addEventListener(\"mousedown\", function(e){\n\t\tmouseDrag = e.screenX;\n\t\tmouseDragWidth = bar.offsetWidth;\n\t});\n\n\thandle.addEventListener(\"mouseover\", function(){\n\t\thandle.style.cursor = \"ew-resize\";\n\t});\n\n\telement.addEventListener(\"mousemove\", function(e){\n\t\tif(mouseDrag){\n\t\t\tbar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + \"px\";\n\t\t}\n\t});\n\n\telement.addEventListener(\"mouseup\", function(e){\n\t\tif(mouseDrag){\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\tmouseDrag = false;\n\t\t\tmouseDragWidth = false;\n\n\t\t\tupdateValue();\n\t\t}\n\t});\n\n\t//allow key based navigation\n\telement.addEventListener(\"keydown\", function(e){\n\t\tswitch(e.keyCode){\n\t\t\tcase 39: //right arrow\n\t\t\t\te.preventDefault();\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\n\t\t\t\tbreak;\n\n\t\t\tcase 37: //left arrow\n\t\t\t\te.preventDefault();\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\n\t\t\t\tbreak;\n\n\t\t\tcase 9: //tab\n\t\t\tcase 13: //enter\n\t\t\t\tupdateValue();\n\t\t\t\tbreak;\n\n\t\t\tcase 27: //escape\n\t\t\t\tcancel();\n\t\t\t\tbreak;\n\n\t\t}\n\t});\n\n\telement.addEventListener(\"blur\", function(){\n\t\tcancel();\n\t});\n\n\treturn bar;\n}","//checkbox\nexport default function(cell, onRendered, success, cancel, editorParams){\n\tvar value = cell.getValue(),\n\tinput = document.createElement(\"input\"),\n\ttristate = editorParams.tristate,\n\tindetermValue = typeof editorParams.indeterminateValue === \"undefined\" ? null : editorParams.indeterminateValue,\n\tindetermState = false,\n\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\n\t\n\tinput.setAttribute(\"type\", \"checkbox\");\n\tinput.style.marginTop = \"5px\";\n\tinput.style.boxSizing = \"border-box\";\n\t\n\tif(editorParams.elementAttributes && typeof editorParams.elementAttributes == \"object\"){\n\t\tfor (let key in editorParams.elementAttributes){\n\t\t\tif(key.charAt(0) == \"+\"){\n\t\t\t\tkey = key.slice(1);\n\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes[\"+\" + key]);\n\t\t\t}else{\n\t\t\t\tinput.setAttribute(key, editorParams.elementAttributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tinput.value = value;\n\t\n\tif(tristate && (typeof value === \"undefined\" || value === indetermValue || value === \"\")){\n\t\tindetermState = true;\n\t\tinput.indeterminate = true;\n\t}\n\t\n\tif(this.table.browser != \"firefox\" && this.table.browser != \"safari\"){ //prevent blur issue on mac firefox\n\t\tonRendered(function(){\n\t\t\tif(cell._getSelf){\n\t\t\t\tinput.focus({preventScroll: true});\n\t\t\t}\n\t\t});\n\t}\n\t\n\tinput.checked = trueValueSet ? value === editorParams.trueValue : (value === true || value === \"true\" || value === \"True\" || value === 1);\n\t\n\tfunction setValue(blur){\n\t\tvar checkedValue = input.checked;\n\t\t\n\t\tif(trueValueSet && checkedValue){\n\t\t\tcheckedValue = editorParams.trueValue;\n\t\t}else if(falseValueSet && !checkedValue){\n\t\t\tcheckedValue = editorParams.falseValue;\n\t\t}\n\t\t\n\t\tif(tristate){\n\t\t\tif(!blur){\n\t\t\t\tif(input.checked && !indetermState){\n\t\t\t\t\tinput.checked = false;\n\t\t\t\t\tinput.indeterminate = true;\n\t\t\t\t\tindetermState = true;\n\t\t\t\t\treturn indetermValue;\n\t\t\t\t}else{\n\t\t\t\t\tindetermState = false;\n\t\t\t\t\treturn checkedValue;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(indetermState){\n\t\t\t\t\treturn indetermValue;\n\t\t\t\t}else{\n\t\t\t\t\treturn checkedValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn checkedValue;\n\t\t}\n\t}\n\t\n\t//submit new value on blur\n\tinput.addEventListener(\"change\", function(e){\n\t\tsuccess(setValue());\n\t});\n\n\tinput.addEventListener(\"blur\", function(e){\n\t\tsuccess(setValue(true));\n\t});\n\t\n\t//submit new value on enter\n\tinput.addEventListener(\"keydown\", function(e){\n\t\tif(e.keyCode == 13){\n\t\t\tsuccess(setValue());\n\t\t}\n\t\tif(e.keyCode == 27){\n\t\t\tcancel();\n\t\t}\n\t});\n\t\n\treturn input;\n}","import Module from '../../core/Module.js';\nimport Helpers from '../../core/tools/Helpers.js';\n\nimport defaultEditors from './defaults/editors.js';\n\nclass Edit extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.currentCell = false; //hold currently editing cell\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden by editor opening\n\t\tthis.recursionBlock = false; //prevent focus recursion\n\t\tthis.invalidEdit = false;\n\t\tthis.editedCells = [];\n\t\t\n\t\tthis.editors = Edit.editors;\n\t\t\n\t\tthis.registerColumnOption(\"editable\");\n\t\tthis.registerColumnOption(\"editor\");\n\t\tthis.registerColumnOption(\"editorParams\");\n\t\t\n\t\tthis.registerColumnOption(\"cellEditing\");\n\t\tthis.registerColumnOption(\"cellEdited\");\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\n\t\t\n\t\tthis.registerTableFunction(\"getEditedCells\", this.getEditedCells.bind(this));\n\t\tthis.registerTableFunction(\"clearCellEdited\", this.clearCellEdited.bind(this));\n\t\tthis.registerTableFunction(\"navigatePrev\", this.navigatePrev.bind(this));\n\t\tthis.registerTableFunction(\"navigateNext\", this.navigateNext.bind(this));\n\t\tthis.registerTableFunction(\"navigateLeft\", this.navigateLeft.bind(this));\n\t\tthis.registerTableFunction(\"navigateRight\", this.navigateRight.bind(this));\n\t\tthis.registerTableFunction(\"navigateUp\", this.navigateUp.bind(this));\n\t\tthis.registerTableFunction(\"navigateDown\", this.navigateDown.bind(this));\n\t\t\n\t\tthis.registerComponentFunction(\"cell\", \"isEdited\", this.cellIsEdited.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"clearEdited\", this.clearEdited.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"edit\", this.editCell.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"cancelEdit\", this.cellCancelEdit.bind(this));\n\t\t\n\t\tthis.registerComponentFunction(\"cell\", \"navigatePrev\", this.navigatePrev.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"navigateNext\", this.navigateNext.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"navigateLeft\", this.navigateLeft.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"navigateRight\", this.navigateRight.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"navigateUp\", this.navigateUp.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"navigateDown\", this.navigateDown.bind(this));\n\t}\n\t\n\tinitialize(){\n\t\tthis.subscribe(\"cell-init\", this.bindEditor.bind(this));\n\t\tthis.subscribe(\"cell-delete\", this.clearEdited.bind(this));\n\t\tthis.subscribe(\"cell-value-changed\", this.updateCellClass.bind(this));\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\n\t\tthis.subscribe(\"column-delete\", this.columnDeleteCheck.bind(this));\n\t\tthis.subscribe(\"row-deleting\", this.rowDeleteCheck.bind(this));\n\t\tthis.subscribe(\"row-layout\", this.rowEditableCheck.bind(this));\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\n\t\t\n\t\tthis.subscribe(\"keybinding-nav-prev\", this.navigatePrev.bind(this, undefined));\n\t\tthis.subscribe(\"keybinding-nav-next\", this.keybindingNavigateNext.bind(this));\n\t\tthis.subscribe(\"keybinding-nav-left\", this.navigateLeft.bind(this, undefined));\n\t\tthis.subscribe(\"keybinding-nav-right\", this.navigateRight.bind(this, undefined));\n\t\tthis.subscribe(\"keybinding-nav-up\", this.navigateUp.bind(this, undefined));\n\t\tthis.subscribe(\"keybinding-nav-down\", this.navigateDown.bind(this, undefined));\n\t}\n\t\n\t\n\t///////////////////////////////////\n\t////// Keybinding Functions ///////\n\t///////////////////////////////////\n\t\n\tkeybindingNavigateNext(e){\n\t\tvar cell = this.currentCell,\n\t\tnewRow = this.options(\"tabEndNewRow\");\n\t\t\n\t\tif(cell){\n\t\t\tif(!this.navigateNext(cell, e)){\n\t\t\t\tif(newRow){\n\t\t\t\t\tcell.getElement().firstChild.blur();\n\t\t\t\t\t\n\t\t\t\t\tif(newRow === true){\n\t\t\t\t\t\tnewRow = this.table.addRow({});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(typeof newRow == \"function\"){\n\t\t\t\t\t\t\tnewRow = this.table.addRow(newRow(cell.row.getComponent()));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tnewRow = this.table.addRow(Object.assign({}, newRow));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnewRow.then(() => {\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tcell.getComponent().navigateNext();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Cell Functions //////////\n\t///////////////////////////////////\n\t\n\tcellIsEdited(cell){\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\n\t}\n\t\n\tcellCancelEdit(cell){\n\t\tif(cell === this.currentCell){\n\t\t\tthis.table.modules.edit.cancelEdit();\n\t\t}else{\n\t\t\tconsole.warn(\"Cancel Editor Error - This cell is not currently being edited \");\n\t\t}\n\t}\n\t\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\tupdateCellClass(cell){\n\t\tif(this.allowEdit(cell)) {\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\n\t\t}\n\t\telse {\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\n\t\t}\n\t}\n\t\n\tclearCellEdited(cells){\n\t\tif(!cells){\n\t\t\tcells = this.table.modules.edit.getEditedCells();\n\t\t}\n\t\t\n\t\tif(!Array.isArray(cells)){\n\t\t\tcells = [cells];\n\t\t}\n\t\t\n\t\tcells.forEach((cell) => {\n\t\t\tthis.table.modules.edit.clearEdited(cell._getSelf());\n\t\t});\n\t}\n\t\n\tnavigatePrev(cell = this.currentCell, e){\n\t\tvar nextCell, prevRow;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tnextCell = this.navigateLeft();\n\t\t\t\n\t\t\tif(nextCell){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tprevRow = this.table.rowManager.prevDisplayRow(cell.row, true);\n\t\t\t\t\n\t\t\t\tif(prevRow){\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\n\t\t\t\t\t\n\t\t\t\t\tif(nextCell){\n\t\t\t\t\t\tnextCell.getComponent().edit();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tnavigateNext(cell = this.currentCell, e){\n\t\tvar nextCell, nextRow;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tnextCell = this.navigateRight();\n\t\t\t\n\t\t\tif(nextCell){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\n\t\t\t\t\n\t\t\t\tif(nextRow){\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\n\t\t\t\t\t\n\t\t\t\t\tif(nextCell){\n\t\t\t\t\t\tnextCell.getComponent().edit();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tnavigateLeft(cell = this.currentCell, e){\n\t\tvar index, nextCell;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tindex = cell.getIndex();\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\n\t\t\t\n\t\t\tif(nextCell){\n\t\t\t\tnextCell.getComponent().edit();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tnavigateRight(cell = this.currentCell, e){\n\t\tvar index, nextCell;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tindex = cell.getIndex();\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\n\t\t\t\n\t\t\tif(nextCell){\n\t\t\t\tnextCell.getComponent().edit();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tnavigateUp(cell = this.currentCell, e){\n\t\tvar index, nextRow;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tindex = cell.getIndex();\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\n\t\t\t\n\t\t\tif(nextRow){\n\t\t\t\tnextRow.cells[index].getComponent().edit();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tnavigateDown(cell = this.currentCell, e){\n\t\tvar index, nextRow;\n\t\t\n\t\tif(cell){\n\t\t\t\n\t\t\tif(e){\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\t\n\t\t\tindex = cell.getIndex();\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\n\t\t\t\n\t\t\tif(nextRow){\n\t\t\t\tnextRow.cells[index].getComponent().edit();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tfindNextEditableCell(row, index){\n\t\tvar nextCell = false;\n\t\t\n\t\tif(index < row.cells.length-1){\n\t\t\tfor(var i = index+1; i < row.cells.length; i++){\n\t\t\t\tlet cell = row.cells[i];\n\t\t\t\t\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\n\t\t\t\t\t\n\t\t\t\t\tif(allowEdit){\n\t\t\t\t\t\tnextCell = cell;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn nextCell;\n\t}\n\t\n\tfindPrevEditableCell(row, index){\n\t\tvar prevCell = false;\n\t\t\n\t\tif(index > 0){\n\t\t\tfor(var i = index-1; i >= 0; i--){\n\t\t\t\tlet cell = row.cells[i];\n\t\t\t\t\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\n\t\t\t\t\t\n\t\t\t\t\tif(allowEdit){\n\t\t\t\t\t\tprevCell = cell;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn prevCell;\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\tinitializeColumnCheck(column){\n\t\tif(typeof column.definition.editor !== \"undefined\"){\n\t\t\tthis.initializeColumn(column);\n\t\t}\n\t}\n\t\n\tcolumnDeleteCheck(column){\n\t\tif(this.currentCell && this.currentCell.column === column){\n\t\t\tthis.cancelEdit();\n\t\t}\n\t}\n\t\n\trowDeleteCheck(row){\n\t\tif(this.currentCell && this.currentCell.row === row){\n\t\t\tthis.cancelEdit();\n\t\t}\n\t}\n\n\trowEditableCheck(row){\n\t\trow.getCells().forEach((cell) => {\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\n\t\t\t\tthis.updateCellClass(cell);\n\t\t\t}\n\t\t});\n\t}\n\t\n\t//initialize column editor\n\tinitializeColumn(column){\n\t\tvar config = {\n\t\t\teditor:false,\n\t\t\tblocked:false,\n\t\t\tcheck:column.definition.editable,\n\t\t\tparams:column.definition.editorParams || {}\n\t\t};\n\t\t\n\t\t//set column editor\n\t\tswitch(typeof column.definition.editor){\n\t\t\tcase \"string\":\n\t\t\t\tif(this.editors[column.definition.editor]){\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"function\":\n\t\t\t\tconfig.editor = column.definition.editor;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"boolean\":\n\t\t\t\tif(column.definition.editor === true){\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(config.editor){\n\t\t\tcolumn.modules.edit = config;\n\t\t}\n\t}\n\t\n\tgetCurrentCell(){\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\n\t}\n\t\n\tclearEditor(cancel){\n\t\tvar cell = this.currentCell,\n\t\tcellEl;\n\t\t\n\t\tthis.invalidEdit = false;\n\t\t\n\t\tif(cell){\n\t\t\tthis.currentCell = false;\n\t\t\t\n\t\t\tcellEl = cell.getElement();\n\t\t\t\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\n\t\t\t\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\n\t\t\t\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\n\t\t\t\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\n\t\t\t\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\n\t\t}\n\t}\n\t\n\tcancelEdit(){\n\t\tif(this.currentCell){\n\t\t\tvar cell = this.currentCell;\n\t\t\tvar component = this.currentCell.getComponent();\n\t\t\t\n\t\t\tthis.clearEditor(true);\n\t\t\tcell.setValueActual(cell.getValue());\n\t\t\tcell.cellRendered();\n\t\t\t\n\t\t\tif(cell.column.definition.editor == \"textarea\" || cell.column.definition.variableHeight){\n\t\t\t\tcell.row.normalizeHeight(true);\n\t\t\t}\n\t\t\t\n\t\t\tif(cell.column.definition.cellEditCancelled){\n\t\t\t\tcell.column.definition.cellEditCancelled.call(this.table, component);\n\t\t\t}\n\t\t\t\n\t\t\tthis.dispatch(\"edit-cancelled\", cell);\n\t\t\tthis.dispatchExternal(\"cellEditCancelled\", component);\n\t\t}\n\t}\n\t\n\t//return a formatted value for a cell\n\tbindEditor(cell){\n\t\tif(cell.column.modules.edit){\n\t\t\tvar self = this,\n\t\t\telement = cell.getElement(true);\n\t\t\t\n\t\t\tthis.updateCellClass(cell);\n\t\t\telement.setAttribute(\"tabindex\", 0);\n\t\t\t\n\t\t\telement.addEventListener(\"click\", function(e){\n\t\t\t\tif(!element.classList.contains(\"tabulator-editing\")){\n\t\t\t\t\telement.focus({preventScroll: true});\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\telement.addEventListener(\"mousedown\", function(e){\n\t\t\t\tif (e.button === 2) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}else{\n\t\t\t\t\tself.mouseClick = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\telement.addEventListener(\"focus\", function(e){\n\t\t\t\tif(!self.recursionBlock){\n\t\t\t\t\tself.edit(cell, e, false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t\n\tfocusCellNoEvent(cell, block){\n\t\tthis.recursionBlock = true;\n\t\t\n\t\tif(!(block && this.table.browser === \"ie\")){\n\t\t\tcell.getElement().focus({preventScroll: true});\n\t\t}\n\t\t\n\t\tthis.recursionBlock = false;\n\t}\n\t\n\teditCell(cell, forceEdit){\n\t\tthis.focusCellNoEvent(cell);\n\t\tthis.edit(cell, false, forceEdit);\n\t}\n\t\n\tfocusScrollAdjust(cell){\n\t\tif(this.table.rowManager.getRenderMode() == \"virtual\"){\n\t\t\tvar topEdge = this.table.rowManager.element.scrollTop,\n\t\t\tbottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,\n\t\t\trowEl = cell.row.getElement();\n\t\t\t\n\t\t\tif(rowEl.offsetTop < topEdge){\n\t\t\t\tthis.table.rowManager.element.scrollTop -= (topEdge - rowEl.offsetTop);\n\t\t\t}else{\n\t\t\t\tif(rowEl.offsetTop + rowEl.offsetHeight > bottomEdge){\n\t\t\t\t\tthis.table.rowManager.element.scrollTop += (rowEl.offsetTop + rowEl.offsetHeight - bottomEdge);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar leftEdge = this.table.rowManager.element.scrollLeft,\n\t\t\trightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,\n\t\t\tcellEl = cell.getElement();\n\t\t\t\n\t\t\tif(this.table.modExists(\"frozenColumns\")){\n\t\t\t\tleftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);\n\t\t\t\trightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\n\t\t\t\tleftEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\n\t\t\t\trightEdge -= parseInt(this.table.columnManager.renderer.vDomPadLeft);\n\t\t\t}\n\t\t\t\n\t\t\tif(cellEl.offsetLeft < leftEdge){\n\t\t\t\t\n\t\t\t\tthis.table.rowManager.element.scrollLeft -= (leftEdge - cellEl.offsetLeft);\n\t\t\t}else{\n\t\t\t\tif(cellEl.offsetLeft + cellEl.offsetWidth > rightEdge){\n\t\t\t\t\tthis.table.rowManager.element.scrollLeft += (cellEl.offsetLeft + cellEl.offsetWidth - rightEdge);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tallowEdit(cell) {\n\t\tvar check = cell.column.modules.edit ? true : false;\n\n\t\tif(cell.column.modules.edit){\n\t\t\tswitch(typeof cell.column.modules.edit.check){\n\t\t\t\tcase \"function\":\n\t\t\t\t\tif(cell.row.initialized){\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"string\":\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn check;\n\t}\n\t\n\tedit(cell, e, forceEdit){\n\t\tvar self = this,\n\t\tallowEdit = true,\n\t\trendered = function(){},\n\t\telement = cell.getElement(),\n\t\tcellEditor, component, params;\n\t\t\n\t\t//prevent editing if another cell is refusing to leave focus (eg. validation fail)\n\n\t\tif(this.currentCell){\n\t\t\tif(!this.invalidEdit && this.currentCell !== cell){\n\t\t\t\tthis.cancelEdit();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//handle successful value change\n\t\tfunction success(value){\n\t\t\tif(self.currentCell === cell){\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\n\t\t\t\t\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\n\t\t\t\t\tself.clearEditor();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!cell.modules.edit){\n\t\t\t\t\t\tcell.modules.edit = {};\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcell.modules.edit.edited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(self.editedCells.indexOf(cell) == -1){\n\t\t\t\t\t\tself.editedCells.push(cell);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcell.setValue(value, true);\n\t\t\t\t\t\n\t\t\t\t\treturn valid === true;\n\t\t\t\t}else{\n\t\t\t\t\tself.invalidEdit = true;\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\n\t\t\t\t\trendered();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call success on a cell that is no longer being edited\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//handle aborted edit\n\t\tfunction cancel(){\n\t\t\tif(self.currentCell === cell){\n\t\t\t\tself.cancelEdit();\n\t\t\t}else{\n\t\t\t\t// console.warn(\"Edit Success Error - cannot call cancel on a cell that is no longer being edited\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction onRendered(callback){\n\t\t\trendered = callback;\n\t\t}\n\t\t\n\t\tif(!cell.column.modules.edit.blocked){\n\t\t\tif(e){\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\t\n\t\t\tallowEdit = this.allowEdit(cell);\n\t\t\t\n\t\t\tif(allowEdit || forceEdit){\n\t\t\t\t\n\t\t\t\tself.cancelEdit();\n\t\t\t\t\n\t\t\t\tself.currentCell = cell;\n\t\t\t\t\n\t\t\t\tthis.focusScrollAdjust(cell);\n\t\t\t\t\n\t\t\t\tcomponent = cell.getComponent();\n\t\t\t\t\n\t\t\t\tif(this.mouseClick){\n\t\t\t\t\tthis.mouseClick = false;\n\t\t\t\t\t\n\t\t\t\t\tif(cell.column.definition.cellClick){\n\t\t\t\t\t\tcell.column.definition.cellClick.call(this.table, e, component);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(cell.column.definition.cellEditing){\n\t\t\t\t\tcell.column.definition.cellEditing.call(this.table, component);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\n\t\t\t\t\n\t\t\t\tparams = typeof cell.column.modules.edit.params === \"function\" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;\n\t\t\t\t\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\n\t\t\t\t\n\t\t\t\t//if editor returned, add to DOM, if false, abort edit\n\t\t\t\tif(this.currentCell && cellEditor !== false){\n\t\t\t\t\tif(cellEditor instanceof Node){\n\t\t\t\t\t\telement.classList.add(\"tabulator-editing\");\n\t\t\t\t\t\tcell.row.getElement().classList.add(\"tabulator-editing\");\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-editing\");\n\t\t\t\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\t\t\t\t\t\telement.appendChild(cellEditor);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//trigger onRendered Callback\n\t\t\t\t\t\trendered();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//prevent editing from triggering rowClick event\n\t\t\t\t\t\tvar children = element.children;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\t\t\tchildren[i].addEventListener(\"click\", function(e){\n\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Edit Error - Editor should return an instance of Node, the editor returned:\", cellEditor);\n\t\t\t\t\t\telement.blur();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\telement.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tthis.mouseClick = false;\n\t\t\t\telement.blur();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\tthis.mouseClick = false;\n\t\t\telement.blur();\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\tgetEditedCells(){\n\t\tvar output = [];\n\t\t\n\t\tthis.editedCells.forEach((cell) => {\n\t\t\toutput.push(cell.getComponent());\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tclearEdited(cell){\n\t\tvar editIndex;\n\t\t\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\n\t\t\tcell.modules.edit.edited = false;\n\t\t\t\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\n\t\t}\n\t\t\n\t\teditIndex = this.editedCells.indexOf(cell);\n\t\t\n\t\tif(editIndex > -1){\n\t\t\tthis.editedCells.splice(editIndex, 1);\n\t\t}\n\t}\n}\n\nEdit.moduleName = \"edit\";\n\n//load defaults\nEdit.editors = defaultEditors;\n\n\nexport default Edit;\n","class ExportRow{\n\tconstructor(type, columns, component, indent){\n\t\tthis.type = type;\n\t\tthis.columns = columns;\n\t\tthis.component = component || false;\n\t\tthis.indent = indent || 0;\n\t}\n}\n\nexport default ExportRow;","class ExportColumn{\n\tconstructor(value, component, width, height, depth){\n\t\tthis.value = value;\n\t\tthis.component = component || false;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.depth = depth;\n\t}\n}\n\nexport default ExportColumn;","import Module from '../../core/Module.js';\n\nimport ExportRow from './ExportRow.js';\nimport ExportColumn from './ExportColumn.js';\n\nclass Export extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.config = {};\n\t\tthis.cloneTableStyle = true;\n\t\tthis.colVisProp = \"\";\n\t\t\n\t\tthis.registerTableOption(\"htmlOutputConfig\", false); //html output config\n\t\t\n\t\tthis.registerColumnOption(\"htmlOutput\");\n\t\tthis.registerColumnOption(\"titleHtmlOutput\");\n\t}\n\t\n\tinitialize(){\n\t\tthis.registerTableFunction(\"getHtml\", this.getHtml.bind(this));\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\t\n\t\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\tgenerateExportList(config, style, range, colVisProp){\n\t\tthis.cloneTableStyle = style;\n\t\tthis.config = config || {};\n\t\tthis.colVisProp = colVisProp;\n\t\t\n\t\tvar headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [];\n\t\tvar body = this.bodyToExportRows(this.rowLookup(range));\n\t\t\n\t\treturn headers.concat(body);\n\t}\n\t\n\tgenerateTable(config, style, range, colVisProp){\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\n\t\t\n\t\treturn this.generateTableElement(list);\n\t}\n\t\n\trowLookup(range){\n\t\tvar rows = [];\n\t\t\n\t\tif(typeof range == \"function\"){\n\t\t\trange.call(this.table).forEach((row) =>{\n\t\t\t\trow = this.table.rowManager.findRow(row);\n\t\t\t\t\n\t\t\t\tif(row){\n\t\t\t\t\trows.push(row);\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tswitch(range){\n\t\t\t\tcase true:\n\t\t\t\tcase \"visible\":\n\t\t\t\t\trows = this.table.rowManager.getVisibleRows(false, true);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"all\":\n\t\t\t\t\trows = this.table.rowManager.rows;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"selected\":\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"active\":\n\t\t\t\tdefault:\n\t\t\t\t\tif(this.table.options.pagination){\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\n\t\t\t\t\t}else{\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Object.assign([], rows);\n\t}\n\t\n\tgenerateColumnGroupHeaders(){\n\t\tvar output = [];\n\t\t\n\t\tvar columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex;\n\t\t\n\t\tcolumns.forEach((column) => {\n\t\t\tvar colData = this.processColumnGroup(column);\n\t\t\t\n\t\t\tif(colData){\n\t\t\t\toutput.push(colData);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tprocessColumnGroup(column){\n\t\tvar subGroups = column.columns,\n\t\tmaxDepth = 0,\n\t\ttitle = column.definition[\"title\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title;\n\t\t\n\t\tvar groupData = {\n\t\t\ttitle:title,\n\t\t\tcolumn:column,\n\t\t\tdepth:1,\n\t\t};\n\t\t\n\t\tif(subGroups.length){\n\t\t\tgroupData.subGroups = [];\n\t\t\tgroupData.width = 0;\n\t\t\t\n\t\t\tsubGroups.forEach((subGroup) => {\n\t\t\t\tvar subGroupData = this.processColumnGroup(subGroup);\n\t\t\t\t\n\t\t\t\tif(subGroupData){\n\t\t\t\t\tgroupData.width += subGroupData.width;\n\t\t\t\t\tgroupData.subGroups.push(subGroupData);\n\t\t\t\t\t\n\t\t\t\t\tif(subGroupData.depth > maxDepth){\n\t\t\t\t\t\tmaxDepth = subGroupData.depth;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tgroupData.depth += maxDepth;\n\t\t\t\n\t\t\tif(!groupData.width){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\tif(this.columnVisCheck(column)){\n\t\t\t\tgroupData.width = 1;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn groupData;\n\t}\n\t\n\tcolumnVisCheck(column){\n\t\tvar visProp = column.definition[this.colVisProp];\n\t\t\n\t\tif(typeof visProp === \"function\"){\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\n\t\t}\n\t\t\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\n\t}\n\t\n\theadersToExportRows(columns){\n\t\tvar headers = [],\n\t\theaderDepth = 0,\n\t\texportRows = [];\n\t\t\n\t\tfunction parseColumnGroup(column, level){\n\t\t\t\n\t\t\tvar depth = headerDepth - level;\n\t\t\t\n\t\t\tif(typeof headers[level] === \"undefined\"){\n\t\t\t\theaders[level] = [];\n\t\t\t}\n\t\t\t\n\t\t\tcolumn.height = column.subGroups ? 1 : (depth - column.depth) + 1;\n\t\t\t\n\t\t\theaders[level].push(column);\n\t\t\t\n\t\t\tif(column.height > 1){\n\t\t\t\tfor(let i = 1; i < column.height; i ++){\n\t\t\t\t\t\n\t\t\t\t\tif(typeof headers[level + i] === \"undefined\"){\n\t\t\t\t\t\theaders[level + i] = [];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\theaders[level + i].push(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(column.width > 1){\n\t\t\t\tfor(let i = 1; i < column.width; i ++){\n\t\t\t\t\theaders[level].push(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(column.subGroups){\n\t\t\t\tcolumn.subGroups.forEach(function(subGroup){\n\t\t\t\t\tparseColumnGroup(subGroup, level+1);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t\n\t\t//calculate maximum header depth\n\t\tcolumns.forEach(function(column){\n\t\t\tif(column.depth > headerDepth){\n\t\t\t\theaderDepth = column.depth;\n\t\t\t}\n\t\t});\n\t\t\n\t\tcolumns.forEach(function(column){\n\t\t\tparseColumnGroup(column,0);\n\t\t});\n\t\t\n\t\theaders.forEach((header) => {\n\t\t\tvar columns = [];\n\t\t\t\n\t\t\theader.forEach((col) => {\n\t\t\t\tif(col){\n\t\t\t\t\tlet title = typeof col.title === \"undefined\" ? \"\" : col.title;\n\t\t\t\t\tcolumns.push(new ExportColumn(title, col.column.getComponent(), col.width, col.height, col.depth));\n\t\t\t\t}else{\n\t\t\t\t\tcolumns.push(null);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\texportRows.push(new ExportRow(\"header\", columns));\n\t\t});\n\t\t\n\t\treturn exportRows;\n\t}\n\t\n\tbodyToExportRows(rows){\n\t\t\n\t\tvar columns = [];\n\t\tvar exportRows = [];\n\t\t\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\tif (this.columnVisCheck(column)) {\n\t\t\t\tcolumns.push(column.getComponent());\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(this.config.columnCalcs !== false && this.table.modExists(\"columnCalcs\")){\n\t\t\tif(this.table.modules.columnCalcs.topInitialized){\n\t\t\t\trows.unshift(this.table.modules.columnCalcs.topRow);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.modules.columnCalcs.botInitialized){\n\t\t\t\trows.push(this.table.modules.columnCalcs.botRow);\n\t\t\t}\n\t\t}\n\t\t\n\t\trows = rows.filter((row) => {\n\t\t\tswitch(row.type){\n\t\t\t\tcase \"group\":\n\t\t\t\t\treturn this.config.rowGroups !== false;\n\t\t\t\t\n\t\t\t\tcase \"calc\":\n\t\t\t\t\treturn this.config.columnCalcs !== false;\n\t\t\t\t\n\t\t\t\tcase \"row\":\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\trows.forEach((row, i) => {\n\t\t\tvar rowData = row.getData(this.colVisProp);\n\t\t\tvar exportCols = [];\n\t\t\tvar indent = 0;\n\t\t\t\n\t\t\tswitch(row.type){\n\t\t\t\tcase \"group\":\n\t\t\t\t\tindent = row.level;\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"calc\" :\n\t\t\t\tcase \"row\" :\n\t\t\t\t\tcolumns.forEach((col) => {\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\texportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent));\n\t\t});\n\t\t\n\t\treturn exportRows;\n\t}\n\t\n\tgenerateTableElement(list){\n\t\tvar table = document.createElement(\"table\"),\n\t\theaderEl = document.createElement(\"thead\"),\n\t\tbodyEl = document.createElement(\"tbody\"),\n\t\tstyles = this.lookupTableStyles(),\n\t\trowFormatter = this.table.options[\"rowFormatter\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))],\n\t\tsetup = {};\n\t\t\n\t\tsetup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter;\n\t\t\n\t\tif(this.table.options.dataTree &&this.config.dataTree !== false && this.table.modExists(\"columnCalcs\")){\n\t\t\tsetup.treeElementField = this.table.modules.dataTree.elementField;\n\t\t}\n\t\t\n\t\t//assign group header formatter\n\t\tsetup.groupHeader = this.table.options[\"groupHeader\" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))];\n\t\t\n\t\tif(setup.groupHeader && !Array.isArray(setup.groupHeader)){\n\t\t\tsetup.groupHeader = [setup.groupHeader];\n\t\t}\n\t\t\n\t\ttable.classList.add(\"tabulator-print-table\");\n\t\t\n\t\tthis.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"background-color\", \"color\", \"font-weight\", \"font-family\", \"font-size\"]);\n\t\t\n\t\t\n\t\tif(list.length > 1000){\n\t\t\tconsole.warn(\"It may take a long time to render an HTML table with more than 1000 rows\");\n\t\t}\n\t\t\n\t\tlist.forEach((row, i) => {\n\t\t\tlet rowEl;\n\t\t\t\n\t\t\tswitch(row.type){\n\t\t\t\tcase \"header\":\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"group\":\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"calc\":\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"row\":\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\n\t\t\t\t\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\n\t\t\t\t\tbodyEl.appendChild(rowEl);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(headerEl.innerHTML){\n\t\t\ttable.appendChild(headerEl);\n\t\t}\n\t\t\n\t\ttable.appendChild(bodyEl);\n\t\t\n\t\t\n\t\tthis.mapElementStyles(this.table.element, table, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\"]);\n\t\treturn table;\n\t}\n\t\n\tlookupTableStyles(){\n\t\tvar styles = {};\n\t\t\n\t\t//lookup row styles\n\t\tif(this.cloneTableStyle && window.getComputedStyle){\n\t\t\tstyles.oddRow = this.table.element.querySelector(\".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)\");\n\t\t\tstyles.evenRow = this.table.element.querySelector(\".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)\");\n\t\t\tstyles.calcRow = this.table.element.querySelector(\".tabulator-row.tabulator-calcs\");\n\t\t\tstyles.firstRow = this.table.element.querySelector(\".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)\");\n\t\t\tstyles.firstGroup = this.table.element.getElementsByClassName(\"tabulator-group\")[0];\n\t\t\t\n\t\t\tif(styles.firstRow){\n\t\t\t\tstyles.styleCells = styles.firstRow.getElementsByClassName(\"tabulator-cell\");\n\t\t\t\tstyles.firstCell = styles.styleCells[0];\n\t\t\t\tstyles.lastCell = styles.styleCells[styles.styleCells.length - 1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn styles;\n\t}\n\t\n\tgenerateHeaderElement(row, setup, styles){\n\t\tvar rowEl = document.createElement(\"tr\");\n\t\t\n\t\trow.columns.forEach((column) => {\n\t\t\tif(column){\n\t\t\t\tvar cellEl = document.createElement(\"th\");\n\t\t\t\tvar classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(\" \") : [];\n\t\t\t\t\n\t\t\t\tcellEl.colSpan = column.width;\n\t\t\t\tcellEl.rowSpan = column.height;\n\t\t\t\t\n\t\t\t\tcellEl.innerHTML = column.value;\n\t\t\t\t\n\t\t\t\tif(this.cloneTableStyle){\n\t\t\t\t\tcellEl.style.boxSizing = \"border-box\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tclassNames.forEach(function(className) {\n\t\t\t\t\tcellEl.classList.add(className);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"text-align\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"background-color\", \"color\", \"font-weight\", \"font-family\", \"font-size\"]);\n\t\t\t\tthis.mapElementStyles(column.component._column.contentElement, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\n\t\t\t\t\n\t\t\t\tif(column.component._column.visible){\n\t\t\t\t\tthis.mapElementStyles(column.component.getElement(), cellEl, [\"width\"]);\n\t\t\t\t}else{\n\t\t\t\t\tif(column.component._column.definition.width){\n\t\t\t\t\t\tcellEl.style.width = column.component._column.definition.width + \"px\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(column.component._column.parent){\n\t\t\t\t\tthis.mapElementStyles(column.component._column.parent.groupElement, cellEl, [\"border-top\"]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trowEl.appendChild(cellEl);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn rowEl;\n\t}\n\t\n\tgenerateGroupElement(row, setup, styles){\n\t\t\n\t\tvar rowEl = document.createElement(\"tr\"),\n\t\tcellEl = document.createElement(\"td\"),\n\t\tgroup = row.columns[0];\n\t\t\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\n\t\t\n\t\tif(setup.groupHeader && setup.groupHeader[row.indent]){\n\t\t\tgroup.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\n\t\t}else{\n\t\t\tif(setup.groupHeader !== false){\n\t\t\t\tgroup.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcellEl.colSpan = group.width;\n\t\tcellEl.innerHTML = group.value;\n\t\t\n\t\trowEl.classList.add(\"tabulator-print-table-group\");\n\t\trowEl.classList.add(\"tabulator-group-level-\" + row.indent);\n\t\t\n\t\tif(group.component.isVisible()){\n\t\t\trowEl.classList.add(\"tabulator-group-visible\");\n\t\t}\n\t\t\n\t\tthis.mapElementStyles(styles.firstGroup, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\n\t\tthis.mapElementStyles(styles.firstGroup, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\"]);\n\t\t\n\t\trowEl.appendChild(cellEl);\n\t\t\n\t\treturn rowEl;\n\t}\n\t\n\tgenerateCalcElement(row, setup, styles){\n\t\tvar rowEl = this.generateRowElement(row, setup, styles);\n\t\t\n\t\trowEl.classList.add(\"tabulator-print-table-calcs\");\n\t\tthis.mapElementStyles(styles.calcRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\n\t\t\n\t\treturn rowEl;\n\t}\n\t\n\tgenerateRowElement(row, setup, styles){\n\t\tvar rowEl = document.createElement(\"tr\");\n\t\t\n\t\trowEl.classList.add(\"tabulator-print-table-row\");\n\t\t\n\t\trow.columns.forEach((col, i) => {\n\t\t\tif(col){\n\t\t\t\tvar cellEl = document.createElement(\"td\"),\n\t\t\t\tcolumn = col.component._column,\n\t\t\t\tindex = this.table.columnManager.findColumnIndex(column),\n\t\t\t\tvalue = col.value,\n\t\t\t\tcellStyle;\n\t\t\t\t\n\t\t\t\tvar cellWrapper = {\n\t\t\t\t\tmodules:{},\n\t\t\t\t\tgetValue:function(){\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t},\n\t\t\t\t\tgetField:function(){\n\t\t\t\t\t\treturn column.definition.field;\n\t\t\t\t\t},\n\t\t\t\t\tgetElement:function(){\n\t\t\t\t\t\treturn cellEl;\n\t\t\t\t\t},\n\t\t\t\t\tgetColumn:function(){\n\t\t\t\t\t\treturn column.getComponent();\n\t\t\t\t\t},\n\t\t\t\t\tgetData:function(){\n\t\t\t\t\t\treturn row.component.getData();\n\t\t\t\t\t},\n\t\t\t\t\tgetRow:function(){\n\t\t\t\t\t\treturn row.component;\n\t\t\t\t\t},\n\t\t\t\t\tgetComponent:function(){\n\t\t\t\t\t\treturn cellWrapper;\n\t\t\t\t\t},\n\t\t\t\t\tcolumn:column,\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tvar classNames = column.definition.cssClass ? column.definition.cssClass.split(\" \") : [];\n\t\t\t\t\n\t\t\t\tclassNames.forEach(function(className) {\n\t\t\t\t\tcellEl.classList.add(className);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif(this.table.modExists(\"format\") && this.config.formatCells !== false){\n\t\t\t\t\tvalue = this.table.modules.format.formatExportValue(cellWrapper, this.colVisProp);\n\t\t\t\t}else{\n\t\t\t\t\tswitch(typeof value){\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\t\tvalue = \"\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(value instanceof Node){\n\t\t\t\t\tcellEl.appendChild(value);\n\t\t\t\t}else{\n\t\t\t\t\tcellEl.innerHTML = value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\n\t\t\t\t\n\t\t\t\tif(cellStyle){\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\n\t\t\t\t\t\n\t\t\t\t\tif(column.definition.align){\n\t\t\t\t\t\tcellEl.style.textAlign = column.definition.align;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\n\t\t\t\t\tif((setup.treeElementField && setup.treeElementField == column.field) || (!setup.treeElementField && i == 0)){\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.controlEl){\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(row.component._row.modules.dataTree.branchEl){\n\t\t\t\t\t\t\tcellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trowEl.appendChild(cellEl);\n\t\t\t\t\n\t\t\t\tif(cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback){\n\t\t\t\t\tcellWrapper.modules.format.renderedCallback();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(setup.rowFormatter && row.type === \"row\" && this.config.formatCells !== false){\n\t\t\tlet formatComponent = Object.assign(row.component);\n\n\t\t\tformatComponent.getElement = function(){return rowEl;};\n\n\t\t\tsetup.rowFormatter(row.component);\n\t\t}\n\t\t\n\t\treturn rowEl;\n\t}\n\t\n\tgenerateHTMLTable(list){\n\t\tvar holder = document.createElement(\"div\");\n\t\t\n\t\tholder.appendChild(this.generateTableElement(list));\n\t\t\n\t\treturn holder.innerHTML;\n\t}\n\t\n\tgetHtml(visible, style, config, colVisProp){\n\t\tvar list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || \"htmlOutput\");\n\t\t\n\t\treturn this.generateHTMLTable(list);\n\t}\n\t\n\tmapElementStyles(from, to, props){\n\t\tif(this.cloneTableStyle && from && to){\n\t\t\t\n\t\t\tvar lookup = {\n\t\t\t\t\"background-color\" : \"backgroundColor\",\n\t\t\t\t\"color\" : \"fontColor\",\n\t\t\t\t\"width\" : \"width\",\n\t\t\t\t\"font-weight\" : \"fontWeight\",\n\t\t\t\t\"font-family\" : \"fontFamily\",\n\t\t\t\t\"font-size\" : \"fontSize\",\n\t\t\t\t\"text-align\" : \"textAlign\",\n\t\t\t\t\"border-top\" : \"borderTop\",\n\t\t\t\t\"border-left\" : \"borderLeft\",\n\t\t\t\t\"border-right\" : \"borderRight\",\n\t\t\t\t\"border-bottom\" : \"borderBottom\",\n\t\t\t\t\"padding-top\" : \"paddingTop\",\n\t\t\t\t\"padding-left\" : \"paddingLeft\",\n\t\t\t\t\"padding-right\" : \"paddingRight\",\n\t\t\t\t\"padding-bottom\" : \"paddingBottom\",\n\t\t\t};\n\t\t\t\n\t\t\tif(window.getComputedStyle){\n\t\t\t\tvar fromStyle = window.getComputedStyle(from);\n\t\t\t\t\n\t\t\t\tprops.forEach(function(prop){\n\t\t\t\t\tif(!to.style[lookup[prop]]){\n\t\t\t\t\t\tto.style[lookup[prop]] = fromStyle.getPropertyValue(prop);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\nExport.moduleName = \"export\";\n\nexport default Export;\n","export default {\n\n\t//equal to\n\t\"=\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal == filterVal ? true : false;\n\t},\n\n\t//less than\n\t\"<\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal < filterVal ? true : false;\n\t},\n\n\t//less than or equal to\n\t\"<=\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal <= filterVal ? true : false;\n\t},\n\n\t//greater than\n\t\">\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal > filterVal ? true : false;\n\t},\n\n\t//greater than or equal to\n\t\">=\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal >= filterVal ? true : false;\n\t},\n\n\t//not equal to\n\t\"!=\":function(filterVal, rowVal, rowData, filterParams){\n\t\treturn rowVal != filterVal ? true : false;\n\t},\n\n\t\"regex\":function(filterVal, rowVal, rowData, filterParams){\n\n\t\tif(typeof filterVal == \"string\"){\n\t\t\tfilterVal = new RegExp(filterVal);\n\t\t}\n\n\t\treturn filterVal.test(rowVal);\n\t},\n\n\t//contains the string\n\t\"like\":function(filterVal, rowVal, rowData, filterParams){\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\n\t\t\treturn rowVal === filterVal ? true : false;\n\t\t}else{\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\n\t\t\t\treturn String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t},\n\n\t//contains the keywords\n\t\"keywords\":function(filterVal, rowVal, rowData, filterParams){\n\t\tvar keywords = filterVal.toLowerCase().split(typeof filterParams.separator === \"undefined\" ? \" \" : filterParams.separator),\n\t\tvalue = String(rowVal === null || typeof rowVal === \"undefined\" ? \"\" : rowVal).toLowerCase(),\n\t\tmatches = [];\n\n\t\tkeywords.forEach((keyword) =>{\n\t\t\tif(value.includes(keyword)){\n\t\t\t\tmatches.push(true);\n\t\t\t}\n\t\t});\n\n\t\treturn filterParams.matchAll ? matches.length === keywords.length : !!matches.length;\n\t},\n\n\t//starts with the string\n\t\"starts\":function(filterVal, rowVal, rowData, filterParams){\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\n\t\t\treturn rowVal === filterVal ? true : false;\n\t\t}else{\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\n\t\t\t\treturn String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase());\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t},\n\n\t//ends with the string\n\t\"ends\":function(filterVal, rowVal, rowData, filterParams){\n\t\tif(filterVal === null || typeof filterVal === \"undefined\"){\n\t\t\treturn rowVal === filterVal ? true : false;\n\t\t}else{\n\t\t\tif(typeof rowVal !== 'undefined' && rowVal !== null){\n\t\t\t\treturn String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase());\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t},\n\n\t//in array\n\t\"in\":function(filterVal, rowVal, rowData, filterParams){\n\t\tif(Array.isArray(filterVal)){\n\t\t\treturn filterVal.length ? filterVal.indexOf(rowVal) > -1 : true;\n\t\t}else{\n\t\t\tconsole.warn(\"Filter Error - filter value is not an array:\", filterVal);\n\t\t\treturn false;\n\t\t}\n\t},\n};","import Module from '../../core/Module.js';\n\nimport defaultFilters from './defaults/filters.js';\n\nclass Filter extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.filterList = []; //hold filter list\n\t\tthis.headerFilters = {}; //hold column filters\n\t\tthis.headerFilterColumns = []; //hold columns that use header filters\n\n\t\tthis.prevHeaderFilterChangeCheck = \"\";\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\n\n\t\tthis.changed = false; //has filtering changed since last render\n\t\tthis.tableInitialized = false;\n\n\t\tthis.registerTableOption(\"filterMode\", \"local\"); //local or remote filtering\n\n\t\tthis.registerTableOption(\"initialFilter\", false); //initial filtering criteria\n\t\tthis.registerTableOption(\"initialHeaderFilter\", false); //initial header filtering criteria\n\t\tthis.registerTableOption(\"headerFilterLiveFilterDelay\", 300); //delay before updating column after user types in header filter\n\n\t\tthis.registerColumnOption(\"headerFilter\");\n\t\tthis.registerColumnOption(\"headerFilterPlaceholder\");\n\t\tthis.registerColumnOption(\"headerFilterParams\");\n\t\tthis.registerColumnOption(\"headerFilterEmptyCheck\");\n\t\tthis.registerColumnOption(\"headerFilterFunc\");\n\t\tthis.registerColumnOption(\"headerFilterFuncParams\");\n\t\tthis.registerColumnOption(\"headerFilterLiveFilter\");\n\n\t\tthis.registerTableFunction(\"searchRows\", this.searchRows.bind(this));\n\t\tthis.registerTableFunction(\"searchData\", this.searchData.bind(this));\n\n\t\tthis.registerTableFunction(\"setFilter\", this.userSetFilter.bind(this));\n\t\tthis.registerTableFunction(\"refreshFilter\", this.userRefreshFilter.bind(this));\n\t\tthis.registerTableFunction(\"addFilter\", this.userAddFilter.bind(this));\n\t\tthis.registerTableFunction(\"getFilters\", this.getFilters.bind(this));\n\t\tthis.registerTableFunction(\"setHeaderFilterFocus\", this.userSetHeaderFilterFocus.bind(this));\n\t\tthis.registerTableFunction(\"getHeaderFilterValue\", this.userGetHeaderFilterValue.bind(this));\n\t\tthis.registerTableFunction(\"setHeaderFilterValue\", this.userSetHeaderFilterValue.bind(this));\n\t\tthis.registerTableFunction(\"getHeaderFilters\", this.getHeaderFilters.bind(this));\n\t\tthis.registerTableFunction(\"removeFilter\", this.userRemoveFilter.bind(this));\n\t\tthis.registerTableFunction(\"clearFilter\", this.userClearFilter.bind(this));\n\t\tthis.registerTableFunction(\"clearHeaderFilter\", this.userClearHeaderFilter.bind(this));\n\n\t\tthis.registerComponentFunction(\"column\", \"headerFilterFocus\", this.setHeaderFilterFocus.bind(this));\n\t\tthis.registerComponentFunction(\"column\", \"reloadHeaderFilter\", this.reloadHeaderFilter.bind(this));\n\t\tthis.registerComponentFunction(\"column\", \"getHeaderFilterValue\", this.getHeaderFilterValue.bind(this));\n\t\tthis.registerComponentFunction(\"column\", \"setHeaderFilterValue\", this.setHeaderFilterValue.bind(this));\n\t}\n\n\tinitialize(){\n\t\tthis.subscribe(\"column-init\", this.initializeColumnHeaderFilter.bind(this));\n\t\tthis.subscribe(\"column-width-fit-before\", this.hideHeaderFilterElements.bind(this));\n\t\tthis.subscribe(\"column-width-fit-after\", this.showHeaderFilterElements.bind(this));\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\n\n\t\tif(this.table.options.filterMode === \"remote\"){\n\t\t\tthis.subscribe(\"data-params\", this.remoteFilterParams.bind(this));\n\t\t}\n\n\t\tthis.registerDataHandler(this.filter.bind(this), 10);\n\t}\n\n\ttableBuilt(){\n\t\tif(this.table.options.initialFilter){\n\t\t\tthis.setFilter(this.table.options.initialFilter);\n\t\t}\n\n\t\tif(this.table.options.initialHeaderFilter){\n\t\t\tthis.table.options.initialHeaderFilter.forEach((item) => {\n\n\t\t\t\tvar column = this.table.columnManager.findColumn(item.field);\n\n\t\t\t\tif(column){\n\t\t\t\t\tthis.setHeaderFilterValue(column, item.value);\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", item.field);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.tableInitialized = true;\n\t}\n\n\tremoteFilterParams(data, config, silent, params){\n\t\tparams.filter = this.getFilters(true, true);\n\t\treturn params;\n\t}\n\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\n\t//set standard filters\n\tuserSetFilter(field, type, value, params){\n\t\tthis.setFilter(field, type, value, params);\n\t\tthis.refreshFilter();\n\t}\n\n\t//set standard filters\n\tuserRefreshFilter(){\n\t\tthis.refreshFilter();\n\t}\n\n\t//add filter to array\n\tuserAddFilter(field, type, value, params){\n\t\tthis.addFilter(field, type, value, params);\n\t\tthis.refreshFilter();\n\t}\n\n\tuserSetHeaderFilterFocus(field){\n\t\tvar column = this.table.columnManager.findColumn(field);\n\n\t\tif(column){\n\t\t\tthis.setHeaderFilterFocus(column);\n\t\t}else{\n\t\t\tconsole.warn(\"Column Filter Focus Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tuserGetHeaderFilterValue(field) {\n\t\tvar column = this.table.columnManager.findColumn(field);\n\n\t\tif(column){\n\t\t\treturn this.getHeaderFilterValue(column);\n\t\t}else{\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\n\t\t}\n\t}\n\n\tuserSetHeaderFilterValue(field, value){\n\t\tvar column = this.table.columnManager.findColumn(field);\n\n\t\tif(column){\n\t\t\tthis.setHeaderFilterValue(column, value);\n\t\t}else{\n\t\t\tconsole.warn(\"Column Filter Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t//remove filter from array\n\tuserRemoveFilter(field, type, value){\n\t\tthis.removeFilter(field, type, value);\n\t\tthis.refreshFilter();\n\t}\n\n\t//clear filters\n\tuserClearFilter(all){\n\t\tthis.clearFilter(all);\n\t\tthis.refreshFilter();\n\t}\n\n\t//clear header filters\n\tuserClearHeaderFilter(){\n\t\tthis.clearHeaderFilter();\n\t\tthis.refreshFilter();\n\t}\n\n\n\t//search for specific row components\n\tsearchRows(field, type, value){\n\t\treturn this.search(\"rows\", field, type, value);\n\t}\n\n\t//search for specific data\n\tsearchData(field, type, value){\n\t\treturn this.search(\"data\", field, type, value);\n\t}\n\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\n\tinitializeColumnHeaderFilter(column){\n\t\tvar def = column.definition;\n\n\t\tif(def.headerFilter){\n\t\t\tthis.initializeColumn(column);\n\t\t}\n\t}\n\n\t//initialize column header filter\n\tinitializeColumn(column, value){\n\t\tvar self = this,\n\t\tfield = column.getField();\n\n\t\t//handle successfully value change\n\t\tfunction success(value){\n\t\t\tvar filterType = (column.modules.filter.tagType == \"input\" && column.modules.filter.attrType == \"text\") || column.modules.filter.tagType == \"textarea\" ? \"partial\" : \"match\",\n\t\t\ttype = \"\",\n\t\t\tfilterChangeCheck = \"\",\n\t\t\tfilterFunc;\n\n\t\t\tif(typeof column.modules.filter.prevSuccess === \"undefined\" || column.modules.filter.prevSuccess !== value){\n\n\t\t\t\tcolumn.modules.filter.prevSuccess = value;\n\n\t\t\t\tif(!column.modules.filter.emptyFunc(value)){\n\t\t\t\t\tcolumn.modules.filter.value = value;\n\n\t\t\t\t\tswitch(typeof column.definition.headerFilterFunc){\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\tif(Filter.filters[column.definition.headerFilterFunc]){\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\n\n\t\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\n\n\t\t\t\t\t\t\t\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tconsole.warn(\"Header Filter Error - Matching filter function not found: \", column.definition.headerFilterFunc);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\n\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\n\n\t\t\t\t\t\t\t\tparams = typeof params === \"function\" ? params(value, fieldVal, data) : params;\n\n\t\t\t\t\t\t\t\treturn column.definition.headerFilterFunc(value, fieldVal, data, params);\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\ttype = filterFunc;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!filterFunc){\n\t\t\t\t\t\tswitch(filterType){\n\t\t\t\t\t\t\tcase \"partial\":\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\n\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\n\t\t\t\t\t\t\t\t\t\treturn String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\ttype = \"like\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\ttype = \"=\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tself.headerFilters[field] = {value:value, func:filterFunc, type:type};\n\t\t\t\t}else{\n\t\t\t\t\tdelete self.headerFilters[field];\n\t\t\t\t}\n\n\t\t\t\tcolumn.modules.filter.value = value;\n\n\t\t\t\tfilterChangeCheck = JSON.stringify(self.headerFilters);\n\n\t\t\t\tif(self.prevHeaderFilterChangeCheck !== filterChangeCheck){\n\t\t\t\t\tself.prevHeaderFilterChangeCheck = filterChangeCheck;\n\n\t\t\t\t\tself.trackChanges();\n\t\t\t\t\tself.refreshFilter();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\tcolumn.modules.filter = {\n\t\t\tsuccess:success,\n\t\t\tattrType:false,\n\t\t\ttagType:false,\n\t\t\temptyFunc:false,\n\t\t};\n\n\t\tthis.generateHeaderFilterElement(column);\n\t}\n\n\tgenerateHeaderFilterElement(column, initialValue, reinitialize){\n\t\tvar self = this,\n\t\tsuccess = column.modules.filter.success,\n\t\tfield = column.getField(),\n\t\tfilterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params, onRenderedCallback;\n\n\t\tcolumn.modules.filter.value = initialValue;\n\n\t\t//handle aborted edit\n\t\tfunction cancel(){}\n\n\t\tfunction onRendered(callback){\n\t\t\tonRenderedCallback = callback;\n\t\t}\n\n\t\tif(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){\n\t\t\tcolumn.contentElement.removeChild(column.modules.filter.headerElement.parentNode);\n\t\t}\n\n\t\tif(field){\n\n\t\t\t//set empty value function\n\t\t\tcolumn.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){\n\t\t\t\treturn !value && value !== 0;\n\t\t\t};\n\n\t\t\tfilterElement = document.createElement(\"div\");\n\t\t\tfilterElement.classList.add(\"tabulator-header-filter\");\n\n\t\t\t//set column editor\n\t\t\tswitch(typeof column.definition.headerFilter){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\n\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\n\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\n\t\t\t\t\t\t\t\treturn value !== true && value !== false;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"function\":\n\t\t\t\t\teditor = column.definition.headerFilter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\n\t\t\t\t\t\teditor = column.modules.edit.editor;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\n\n\t\t\t\t\t\t\tif((column.definition.formatter === \"tick\" || column.definition.formatter === \"tickCross\") && !column.definition.headerFilterEmptyCheck){\n\t\t\t\t\t\t\t\tcolumn.modules.filter.emptyFunc = function(value){\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== false;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(editor){\n\n\t\t\t\tcellWrapper = {\n\t\t\t\t\tgetValue:function(){\n\t\t\t\t\t\treturn typeof initialValue !== \"undefined\" ? initialValue : \"\";\n\t\t\t\t\t},\n\t\t\t\t\tgetField:function(){\n\t\t\t\t\t\treturn column.definition.field;\n\t\t\t\t\t},\n\t\t\t\t\tgetElement:function(){\n\t\t\t\t\t\treturn filterElement;\n\t\t\t\t\t},\n\t\t\t\t\tgetColumn:function(){\n\t\t\t\t\t\treturn column.getComponent();\n\t\t\t\t\t},\n\t\t\t\t\tgetTable:() => {\n\t\t\t\t\t\treturn this.table;\n\t\t\t\t\t},\n\t\t\t\t\tgetRow:function(){\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tnormalizeHeight:function(){\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tparams = column.definition.headerFilterParams || {};\n\n\t\t\t\tparams = typeof params === \"function\" ? params.call(self.table, cellWrapper) : params;\n\n\t\t\t\teditorElement = editor.call(this.table.modules.edit, cellWrapper, onRendered, success, cancel, params);\n\n\t\t\t\tif(!editorElement){\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor returned a value of false\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif(!(editorElement instanceof Node)){\n\t\t\t\t\tconsole.warn(\"Filter Error - Cannot add filter to \" + field + \" column, editor should return an instance of Node, the editor returned:\", editorElement);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//set Placeholder Text\n\t\t\t\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : (column.definition.headerFilterPlaceholder || self.langText(\"headerFilters|default\")));\n\t\t\t\t});\n\n\t\t\t\t//focus on element on click\n\t\t\t\teditorElement.addEventListener(\"click\", function(e){\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\teditorElement.focus();\n\t\t\t\t});\n\n\t\t\t\teditorElement.addEventListener(\"focus\", (e) => {\n\t\t\t\t\tvar left = this.table.columnManager.contentsElement.scrollLeft;\n\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft;\n\n\t\t\t\t\tif(left !== headerPos){\n\t\t\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\n\t\t\t\t\t\tthis.table.columnManager.scrollHorizontal(left);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t//live update filters as user types\n\t\t\t\ttypingTimer = false;\n\n\t\t\t\tsearchTrigger = function(e){\n\t\t\t\t\tif(typingTimer){\n\t\t\t\t\t\tclearTimeout(typingTimer);\n\t\t\t\t\t}\n\n\t\t\t\t\ttypingTimer = setTimeout(function(){\n\t\t\t\t\t\tsuccess(editorElement.value);\n\t\t\t\t\t},self.table.options.headerFilterLiveFilterDelay);\n\t\t\t\t};\n\n\t\t\t\tcolumn.modules.filter.headerElement = editorElement;\n\t\t\t\tcolumn.modules.filter.attrType = editorElement.hasAttribute(\"type\") ? editorElement.getAttribute(\"type\").toLowerCase() : \"\" ;\n\t\t\t\tcolumn.modules.filter.tagType = editorElement.tagName.toLowerCase();\n\n\t\t\t\tif(column.definition.headerFilterLiveFilter !== false){\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!(\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'autocomplete' ||\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === 'tickCross' ||\n\t\t\t\t\t\t\t((column.definition.editor === 'autocomplete' ||\n\t\t\t\t\t\t\t\tcolumn.definition.editor === 'tickCross') &&\n\t\t\t\t\t\t\tcolumn.definition.headerFilter === true)\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\n\n\n\t\t\t\t\t\t//update number filtered columns on change\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//change text inputs to search inputs to allow for clearing of field\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\n\t\t\t\t\t\t\teditorElement.setAttribute(\"type\", \"search\");\n\t\t\t\t\t\t// editorElement.off(\"change blur\"); //prevent blur from triggering filter and preventing selection click\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//prevent input and select elements from propagating click to column sorters etc\n\t\t\t\t\tif(column.modules.filter.tagType == \"input\" || column.modules.filter.tagType == \"select\" || column.modules.filter.tagType == \"textarea\"){\n\t\t\t\t\t\teditorElement.addEventListener(\"mousedown\",function(e){\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfilterElement.appendChild(editorElement);\n\n\t\t\t\tcolumn.contentElement.appendChild(filterElement);\n\n\t\t\t\tif(!reinitialize){\n\t\t\t\t\tself.headerFilterColumns.push(column);\n\t\t\t\t}\n\n\t\t\t\tif(onRenderedCallback){\n\t\t\t\t\tonRenderedCallback();\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.warn(\"Filter Error - Cannot add header filter, column has no field set:\", column.definition.title);\n\t\t}\n\t}\n\n\t//hide all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\n\thideHeaderFilterElements(){\n\t\tthis.headerFilterColumns.forEach(function(column){\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = 'none';\n\t\t\t}\n\t\t});\n\t}\n\n\t//show all header filter elements (used to ensure correct column widths in \"fitData\" layout mode)\n\tshowHeaderFilterElements(){\n\t\tthis.headerFilterColumns.forEach(function(column){\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\t\tcolumn.modules.filter.headerElement.style.display = '';\n\t\t\t}\n\t\t});\n\t}\n\n\t//programmatically set focus of header filter\n\tsetHeaderFilterFocus(column){\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\tcolumn.modules.filter.headerElement.focus();\n\t\t}else{\n\t\t\tconsole.warn(\"Column Filter Focus Error - No header filter set on column:\", column.getField());\n\t\t}\n\t}\n\n\t//programmatically get value of header filter\n\tgetHeaderFilterValue(column){\n\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\treturn column.modules.filter.value;\n\t\t} else {\n\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\n\t\t}\n\t}\n\n\t//programmatically set value of header filter\n\tsetHeaderFilterValue(column, value){\n\t\tif (column){\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\t\tthis.generateHeaderFilterElement(column, value, true);\n\t\t\t\tcolumn.modules.filter.success(value);\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\n\t\t\t}\n\t\t}\n\t}\n\n\treloadHeaderFilter(column){\n\t\tif (column){\n\t\t\tif(column.modules.filter && column.modules.filter.headerElement){\n\t\t\t\tthis.generateHeaderFilterElement(column, column.modules.filter.value, true);\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Column Filter Error - No header filter set on column:\", column.getField());\n\t\t\t}\n\t\t}\n\t}\n\n\trefreshFilter(){\n\t\tif(this.tableInitialized){\n\t\t\tif(this.table.options.filterMode === \"remote\"){\n\t\t\t\tthis.reloadData(null, false, false);\n\t\t\t}else{\n\t\t\t\tthis.refreshData(true);\n\t\t\t}\n\t\t}\n\n\t\t//TODO - Persist left position of row manager\n\t\t// left = this.scrollLeft;\n\t\t// this.scrollHorizontal(left);\n\t}\n\n\t//check if the filters has changed since last use\n\ttrackChanges(){\n\t\tthis.changed = true;\n\t\tthis.dispatch(\"filter-changed\");\n\t}\n\n\t//check if the filters has changed since last use\n\thasChanged(){\n\t\tvar changed = this.changed;\n\t\tthis.changed = false;\n\t\treturn changed;\n\t}\n\n\t//set standard filters\n\tsetFilter(field, type, value, params){\n\t\tthis.filterList = [];\n\n\t\tif(!Array.isArray(field)){\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\n\t\t}\n\n\t\tthis.addFilter(field);\n\t}\n\n\t//add filter to array\n\taddFilter(field, type, value, params){\n\t\tvar changed = false;\n\n\t\tif(!Array.isArray(field)){\n\t\t\tfield = [{field:field, type:type, value:value, params:params}];\n\t\t}\n\n\t\tfield.forEach((filter) => {\n\t\t\tfilter = this.findFilter(filter);\n\n\t\t\tif(filter){\n\t\t\t\tthis.filterList.push(filter);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t});\n\n\t\tif(changed){\n\t\t\tthis.trackChanges();\n\t\t}\n\t}\n\n\tfindFilter(filter){\n\t\tvar column;\n\n\t\tif(Array.isArray(filter)){\n\t\t\treturn this.findSubFilters(filter);\n\t\t}\n\n\t\tvar filterFunc = false;\n\n\t\tif(typeof filter.field == \"function\"){\n\t\t\tfilterFunc = function(data){\n\t\t\t\treturn filter.field(data, filter.type || {});// pass params to custom filter function\n\t\t\t};\n\t\t}else{\n\n\t\t\tif(Filter.filters[filter.type]){\n\n\t\t\t\tcolumn = this.table.columnManager.getColumnByField(filter.field);\n\n\t\t\t\tif(column){\n\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {});\n\t\t\t\t\t};\n\t\t\t\t}else{\n\t\t\t\t\tfilterFunc = function(data){\n\t\t\t\t\t\treturn Filter.filters[filter.type](filter.value, data[filter.field], data, filter.params || {});\n\t\t\t\t\t};\n\t\t\t\t}\n\n\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Filter Error - No such filter type found, ignoring: \", filter.type);\n\t\t\t}\n\t\t}\n\n\t\tfilter.func = filterFunc;\n\n\t\treturn filter.func ? filter : false;\n\t}\n\n\tfindSubFilters(filters){\n\t\tvar output = [];\n\n\t\tfilters.forEach((filter) => {\n\t\t\tfilter = this.findFilter(filter);\n\n\t\t\tif(filter){\n\t\t\t\toutput.push(filter);\n\t\t\t}\n\t\t});\n\n\t\treturn output.length ? output : false;\n\t}\n\n\t//get all filters\n\tgetFilters(all, ajax){\n\t\tvar output = [];\n\n\t\tif(all){\n\t\t\toutput = this.getHeaderFilters();\n\t\t}\n\n\t\tif(ajax){\n\t\t\toutput.forEach(function(item){\n\t\t\t\tif(typeof item.type == \"function\"){\n\t\t\t\t\titem.type = \"function\";\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\toutput = output.concat(this.filtersToArray(this.filterList, ajax));\n\n\t\treturn output;\n\t}\n\n\t//filter to Object\n\tfiltersToArray(filterList, ajax){\n\t\tvar output = [];\n\n\t\tfilterList.forEach((filter) => {\n\t\t\tvar item;\n\n\t\t\tif(Array.isArray(filter)){\n\t\t\t\toutput.push(this.filtersToArray(filter, ajax));\n\t\t\t}else{\n\t\t\t\titem = {field:filter.field, type:filter.type, value:filter.value};\n\n\t\t\t\tif(ajax){\n\t\t\t\t\tif(typeof item.type == \"function\"){\n\t\t\t\t\t\titem.type = \"function\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toutput.push(item);\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n\n\t//get all filters\n\tgetHeaderFilters(){\n\t\tvar output = [];\n\n\t\tfor(var key in this.headerFilters){\n\t\t\toutput.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value});\n\t\t}\n\n\t\treturn output;\n\t}\n\n\t//remove filter from array\n\tremoveFilter(field, type, value){\n\t\tif(!Array.isArray(field)){\n\t\t\tfield = [{field:field, type:type, value:value}];\n\t\t}\n\n\t\tfield.forEach((filter) => {\n\t\t\tvar index = -1;\n\n\t\t\tif(typeof filter.field == \"object\"){\n\t\t\t\tindex = this.filterList.findIndex((element) => {\n\t\t\t\t\treturn filter === element;\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tindex = this.filterList.findIndex((element) => {\n\t\t\t\t\treturn filter.field === element.field && filter.type === element.type && filter.value === element.value;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif(index > -1){\n\t\t\t\tthis.filterList.splice(index, 1);\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Filter Error - No matching filter type found, ignoring: \", filter.type);\n\t\t\t}\n\t\t});\n\n\t\tthis.trackChanges();\n\t}\n\n\t//clear filters\n\tclearFilter(all){\n\t\tthis.filterList = [];\n\n\t\tif(all){\n\t\t\tthis.clearHeaderFilter();\n\t\t}\n\n\t\tthis.trackChanges();\n\t}\n\n\t//clear header filters\n\tclearHeaderFilter(){\n\t\tthis.headerFilters = {};\n\t\tthis.prevHeaderFilterChangeCheck = \"{}\";\n\n\t\tthis.headerFilterColumns.forEach((column) => {\n\t\t\tif(typeof column.modules.filter.value !== \"undefined\"){\n\t\t\t\tdelete column.modules.filter.value;\n\t\t\t}\n\t\t\tcolumn.modules.filter.prevSuccess = undefined;\n\t\t\tthis.reloadHeaderFilter(column);\n\t\t});\n\n\t\tthis.trackChanges();\n\t}\n\n\t//search data and return matching rows\n\tsearch (searchType, field, type, value){\n\t\tvar activeRows = [],\n\t\tfilterList = [];\n\n\t\tif(!Array.isArray(field)){\n\t\t\tfield = [{field:field, type:type, value:value}];\n\t\t}\n\n\t\tfield.forEach((filter) => {\n\t\t\tfilter = this.findFilter(filter);\n\n\t\t\tif(filter){\n\t\t\t\tfilterList.push(filter);\n\t\t\t}\n\t\t});\n\n\t\tthis.table.rowManager.rows.forEach((row) => {\n\t\t\tvar match = true;\n\n\t\t\tfilterList.forEach((filter) => {\n\t\t\t\tif(!this.filterRecurse(filter, row.getData())){\n\t\t\t\t\tmatch = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif(match){\n\t\t\t\tactiveRows.push(searchType === \"data\" ? row.getData(\"data\") : row.getComponent());\n\t\t\t}\n\n\t\t});\n\n\t\treturn activeRows;\n\t}\n\n\t//filter row array\n\tfilter(rowList, filters){\n\t\tvar activeRows = [],\n\t\tactiveRowComponents = [];\n\n\t\tif(this.subscribedExternal(\"dataFiltering\")){\n\t\t\tthis.dispatchExternal(\"dataFiltering\", this.getFilters(true));\n\t\t}\n\n\t\tif(this.table.options.filterMode !== \"remote\" && (this.filterList.length || Object.keys(this.headerFilters).length)){\n\n\t\t\trowList.forEach((row) => {\n\t\t\t\tif(this.filterRow(row)){\n\t\t\t\t\tactiveRows.push(row);\n\t\t\t\t}\n\t\t\t});\n\n\t\t}else{\n\t\t\tactiveRows = rowList.slice(0);\n\t\t}\n\n\t\tif(this.subscribedExternal(\"dataFiltered\")){\n\n\t\t\tactiveRows.forEach((row) => {\n\t\t\t\tactiveRowComponents.push(row.getComponent());\n\t\t\t});\n\n\t\t\tthis.dispatchExternal(\"dataFiltered\", this.getFilters(true), activeRowComponents);\n\t\t}\n\n\t\treturn activeRows;\n\t}\n\n\t//filter individual row\n\tfilterRow(row, filters){\n\t\tvar match = true,\n\t\tdata = row.getData();\n\n\t\tthis.filterList.forEach((filter) => {\n\t\t\tif(!this.filterRecurse(filter, data)){\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t});\n\n\n\t\tfor(var field in this.headerFilters){\n\t\t\tif(!this.headerFilters[field].func(data)){\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t}\n\n\t\treturn match;\n\t}\n\n\tfilterRecurse(filter, data){\n\t\tvar match = false;\n\n\t\tif(Array.isArray(filter)){\n\t\t\tfilter.forEach((subFilter) => {\n\t\t\t\tif(this.filterRecurse(subFilter, data)){\n\t\t\t\t\tmatch = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tmatch = filter.func(data);\n\t\t}\n\n\t\treturn match;\n\t}\n}\n\nFilter.moduleName = \"filter\";\n\n//load defaults\nFilter.filters = defaultFilters;\n\nexport default Filter;","import plaintext from './formatters/plaintext.js';\nimport html from './formatters/html.js';\nimport textarea from './formatters/textarea.js';\nimport money from './formatters/money.js';\nimport link from './formatters/link.js';\nimport image from './formatters/image.js';\nimport tickCross from './formatters/tickCross.js';\nimport datetime from './formatters/datetime.js';\nimport datetimediff from './formatters/datetimediff.js';\nimport lookup from './formatters/lookup.js';\nimport star from './formatters/star.js';\nimport traffic from './formatters/traffic.js';\nimport progress from './formatters/progress.js';\nimport color from './formatters/color.js';\nimport buttonTick from './formatters/buttonTick.js';\nimport buttonCross from './formatters/buttonCross.js';\nimport rownum from './formatters/rownum.js';\nimport handle from './formatters/handle.js';\nimport responsiveCollapse from './formatters/responsiveCollapse.js';\nimport rowSelection from './formatters/rowSelection.js';\n\nexport default {\n\tplaintext:plaintext,\n\thtml:html,\n\ttextarea:textarea,\n\tmoney:money,\n\tlink:link,\n\timage:image,\n\ttickCross:tickCross,\n\tdatetime:datetime,\n\tdatetimediff:datetimediff,\n\tlookup:lookup,\n\tstar:star,\n\ttraffic:traffic,\n\tprogress:progress,\n\tcolor:color,\n\tbuttonTick:buttonTick,\n\tbuttonCross:buttonCross,\n\trownum:rownum,\n\thandle:handle,\n\tresponsiveCollapse:responsiveCollapse,\n\trowSelection:rowSelection,\n};","export default function(cell, formatterParams, onRendered){\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\n}","export default function(cell, formatterParams, onRendered){\n\treturn cell.getValue();\n}","export default function(cell, formatterParams, onRendered){\n\tcell.getElement().style.whiteSpace = \"pre-wrap\";\n\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\n}","export default function(cell, formatterParams, onRendered){\n\tvar floatVal = parseFloat(cell.getValue()),\n\tsign = \"\",\n\tnumber, integer, decimal, rgx;\n\n\tvar decimalSym = formatterParams.decimal || \".\";\n\tvar thousandSym = formatterParams.thousand || \",\";\n\tvar negativeSign = formatterParams.negativeSign || \"-\";\n\tvar symbol = formatterParams.symbol || \"\";\n\tvar after = !!formatterParams.symbolAfter;\n\tvar precision = typeof formatterParams.precision !== \"undefined\" ? formatterParams.precision : 2;\n\n\tif(isNaN(floatVal)){\n\t\treturn this.emptyToSpace(this.sanitizeHTML(cell.getValue()));\n\t}\n\n\tif(floatVal < 0){\n\t\tfloatVal = Math.abs(floatVal);\n\t\tsign = negativeSign;\n\t}\n\n\tnumber = precision !== false ? floatVal.toFixed(precision) : floatVal;\n\tnumber = String(number).split(\".\");\n\n\tinteger = number[0];\n\tdecimal = number.length > 1 ? decimalSym + number[1] : \"\";\n\n\tif (formatterParams.thousand !== false) {\n\t\trgx = /(\\d+)(\\d{3})/;\n\n\t\twhile (rgx.test(integer)){\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\n\t\t}\n\t}\n\n\treturn after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;\n}","export default function(cell, formatterParams, onRendered){\n\tvar value = cell.getValue(),\n\turlPrefix = formatterParams.urlPrefix || \"\",\n\tdownload = formatterParams.download,\n\tlabel = value,\n\tel = document.createElement(\"a\"),\n\tdata;\n\n\tfunction labelTraverse(path, data){\n\t\tvar item = path.shift(),\n\t\tvalue = data[item];\n\t\t\n\t\tif(path.length && typeof value === \"object\"){\n\t\t\treturn labelTraverse(path, value);\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tif(formatterParams.labelField){\n\t\tdata = cell.getData();\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\n\t}\n\n\tif(formatterParams.label){\n\t\tswitch(typeof formatterParams.label){\n\t\t\tcase \"string\":\n\t\t\t\tlabel = formatterParams.label;\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\tlabel = formatterParams.label(cell);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(label){\n\t\tif(formatterParams.urlField){\n\t\t\tdata = cell.getData();\n\t\t\tvalue = data[formatterParams.urlField];\n\t\t}\n\n\t\tif(formatterParams.url){\n\t\t\tswitch(typeof formatterParams.url){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tvalue = formatterParams.url;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"function\":\n\t\t\t\t\tvalue = formatterParams.url(cell);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tel.setAttribute(\"href\", urlPrefix + value);\n\n\t\tif(formatterParams.target){\n\t\t\tel.setAttribute(\"target\", formatterParams.target);\n\t\t}\n\n\t\tif(formatterParams.download){\n\n\t\t\tif(typeof download == \"function\"){\n\t\t\t\tdownload = download(cell);\n\t\t\t}else{\n\t\t\t\tdownload = download === true ? \"\" : download;\n\t\t\t}\n\n\t\t\tel.setAttribute(\"download\", download);\n\t\t}\n\n\t\tel.innerHTML = this.emptyToSpace(this.sanitizeHTML(label));\n\n\t\treturn el;\n\t}else{\n\t\treturn \" \";\n\t}\n}","export default function(cell, formatterParams, onRendered){\n\tvar el = document.createElement(\"img\"),\n\tsrc = cell.getValue();\n\n\tif(formatterParams.urlPrefix){\n\t\tsrc = formatterParams.urlPrefix + cell.getValue();\n\t}\n\n\tif(formatterParams.urlSuffix){\n\t\tsrc = src + formatterParams.urlSuffix;\n\t}\n\n\tel.setAttribute(\"src\", src);\n\n\tswitch(typeof formatterParams.height){\n\t\tcase \"number\":\n\t\t\tel.style.height = formatterParams.height + \"px\";\n\t\t\tbreak;\n\n\t\tcase \"string\":\n\t\t\tel.style.height = formatterParams.height;\n\t\t\tbreak;\n\t}\n\n\tswitch(typeof formatterParams.width){\n\t\tcase \"number\":\n\t\t\tel.style.width = formatterParams.width + \"px\";\n\t\t\tbreak;\n\n\t\tcase \"string\":\n\t\t\tel.style.width = formatterParams.width;\n\t\t\tbreak;\n\t}\n\n\tel.addEventListener(\"load\", function(){\n\t\tcell.getRow().normalizeHeight();\n\t});\n\n\treturn el;\n}","export default function(cell, formatterParams, onRendered){\n\tvar value = cell.getValue(),\n\telement = cell.getElement(),\n\tempty = formatterParams.allowEmpty,\n\ttruthy = formatterParams.allowTruthy,\n\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\n\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((truthy && value) || (value === true || value === \"true\" || value === \"True\" || value === 1 || value === \"1\")))){\n\t\telement.setAttribute(\"aria-checked\", true);\n\t\treturn tick || \"\";\n\t}else{\n\t\tif(empty && (value === \"null\" || value === \"\" || value === null || typeof value === \"undefined\")){\n\t\t\telement.setAttribute(\"aria-checked\", \"mixed\");\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\telement.setAttribute(\"aria-checked\", false);\n\t\t\treturn cross || \"\";\n\t\t}\n\t}\n}","export default function(cell, formatterParams, onRendered){\n\tvar DT = window.DateTime || luxon.DateTime;\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\n\tvar\toutputFormat = formatterParams.outputFormat || \"dd/MM/yyyy HH:mm:ss\";\n\tvar\tinvalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\n\tvar value = cell.getValue();\n\n\tif(typeof DT != \"undefined\"){\n\t\tvar newDatetime;\n\n\t\tif(DT.isDateTime(value)){\n\t\t\tnewDatetime = value;\n\t\t}else if(inputFormat === \"iso\"){\n\t\t\tnewDatetime = DT.fromISO(String(value));\n\t\t}else{\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\n\t\t}\n\n\t\tif(newDatetime.isValid){\n\t\t\tif(formatterParams.timezone){\n\t\t\t\tnewDatetime = newDatetime.setZone(formatterParams.timezone);\n\t\t\t}\n\n\t\t\treturn newDatetime.toFormat(outputFormat);\n\t\t}else{\n\t\t\tif(invalid === true || !value){\n\t\t\t\treturn value;\n\t\t\t}else if(typeof invalid === \"function\"){\n\t\t\t\treturn invalid(value);\n\t\t\t}else{\n\t\t\t\treturn invalid;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tconsole.error(\"Format Error - 'datetime' formatter is dependant on luxon.js\");\n\t}\n}","export default function (cell, formatterParams, onRendered) {\n\tvar DT = window.DateTime || luxon.DateTime;\n\tvar inputFormat = formatterParams.inputFormat || \"yyyy-MM-dd HH:mm:ss\";\n\tvar invalid = typeof formatterParams.invalidPlaceholder !== \"undefined\" ? formatterParams.invalidPlaceholder : \"\";\n\tvar suffix = typeof formatterParams.suffix !== \"undefined\" ? formatterParams.suffix : false;\n\tvar unit = typeof formatterParams.unit !== \"undefined\" ? formatterParams.unit : \"days\";\n\tvar humanize = typeof formatterParams.humanize !== \"undefined\" ? formatterParams.humanize : false;\n\tvar date = typeof formatterParams.date !== \"undefined\" ? formatterParams.date : DT.now();\n\tvar value = cell.getValue();\n\n\tif(typeof DT != \"undefined\"){\n\t\tvar newDatetime;\n\n\t\tif(DT.isDateTime(value)){\n\t\t\tnewDatetime = value;\n\t\t}else if(inputFormat === \"iso\"){\n\t\t\tnewDatetime = DT.fromISO(String(value));\n\t\t}else{\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\n\t\t}\n\n\t\tif (newDatetime.isValid){\n\t\t\tif(humanize){\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + suffix : \"\");\n\t\t\t}else{\n\t\t\t\treturn parseInt(newDatetime.diff(date, unit)[unit]) + (suffix ? \" \" + suffix : \"\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tif (invalid === true) {\n\t\t\t\treturn value;\n\t\t\t} else if (typeof invalid === \"function\") {\n\t\t\t\treturn invalid(value);\n\t\t\t} else {\n\t\t\t\treturn invalid;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tconsole.error(\"Format Error - 'datetimediff' formatter is dependant on luxon.js\");\n\t}\n}","export default function (cell, formatterParams, onRendered) {\n\tvar value = cell.getValue();\n\n\tif (typeof formatterParams[value] === \"undefined\") {\n\t\tconsole.warn('Missing display value for ' + value);\n\t\treturn value;\n\t}\n\n\treturn formatterParams[value];\n}","export default function(cell, formatterParams, onRendered){\n\tvar value = cell.getValue(),\n\telement = cell.getElement(),\n\tmaxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5,\n\tstars = document.createElement(\"span\"),\n\tstar = document.createElementNS('http://www.w3.org/2000/svg', \"svg\"),\n\tstarActive = '',\n\tstarInactive = '';\n\n\t//style stars holder\n\tstars.style.verticalAlign = \"middle\";\n\n\t//style star\n\tstar.setAttribute(\"width\", \"14\");\n\tstar.setAttribute(\"height\", \"14\");\n\tstar.setAttribute(\"viewBox\", \"0 0 512 512\");\n\tstar.setAttribute(\"xml:space\", \"preserve\");\n\tstar.style.padding = \"0 1px\";\n\n\tvalue = value && !isNaN(value) ? parseInt(value) : 0;\n\n\tvalue = Math.max(0, Math.min(value, maxStars));\n\n\tfor(var i=1;i<= maxStars;i++){\n\t\tvar nextStar = star.cloneNode(true);\n\t\tnextStar.innerHTML = i <= value ? starActive : starInactive;\n\n\t\tstars.appendChild(nextStar);\n\t}\n\n\telement.style.whiteSpace = \"nowrap\";\n\telement.style.overflow = \"hidden\";\n\telement.style.textOverflow = \"ellipsis\";\n\n\telement.setAttribute(\"aria-label\", value);\n\n\treturn stars;\n}","export default function(cell, formatterParams, onRendered){\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\n\tel = document.createElement(\"span\"),\n\tmax = formatterParams && formatterParams.max ? formatterParams.max : 100,\n\tmin = formatterParams && formatterParams.min ? formatterParams.min : 0,\n\tcolors = formatterParams && typeof formatterParams.color !== \"undefined\" ? formatterParams.color : [\"red\", \"orange\", \"green\"],\n\tcolor = \"#666666\",\n\tpercent, percentValue;\n\n\tif(isNaN(value) || typeof cell.getValue() === \"undefined\"){\n\t\treturn;\n\t}\n\n\tel.classList.add(\"tabulator-traffic-light\");\n\n\t//make sure value is in range\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\n\n\t//workout percentage\n\tpercent = (max - min) / 100;\n\tpercentValue = Math.round((percentValue - min) / percent);\n\n\t//set color\n\tswitch(typeof colors){\n\t\tcase \"string\":\n\t\t\tcolor = colors;\n\t\t\tbreak;\n\t\tcase \"function\":\n\t\t\tcolor = colors(value);\n\t\t\tbreak;\n\t\tcase \"object\":\n\t\t\tif(Array.isArray(colors)){\n\t\t\t\tvar unit = 100 / colors.length;\n\t\t\t\tvar index = Math.floor(percentValue / unit);\n\n\t\t\t\tindex = Math.min(index, colors.length - 1);\n\t\t\t\tindex = Math.max(index, 0);\n\t\t\t\tcolor = colors[index];\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\n\tel.style.backgroundColor = color;\n\n\treturn el;\n}","import CellComponent from '../../../../core/cell/CellComponent.js';\n\nexport default function(cell, formatterParams = {}, onRendered){ //progress bar\n\tvar value = this.sanitizeHTML(cell.getValue()) || 0,\n\telement = cell.getElement(),\n\tmax = formatterParams.max ? formatterParams.max : 100,\n\tmin = formatterParams.min ? formatterParams.min : 0,\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\n\tpercent, percentValue, color, legend, legendColor;\n\n\t//make sure value is in range\n\tpercentValue = parseFloat(value) <= max ? parseFloat(value) : max;\n\tpercentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min;\n\n\t//workout percentage\n\tpercent = (max - min) / 100;\n\tpercentValue = Math.round((percentValue - min) / percent);\n\n\t//set bar color\n\tswitch(typeof formatterParams.color){\n\t\tcase \"string\":\n\t\t\tcolor = formatterParams.color;\n\t\t\tbreak;\n\t\tcase \"function\":\n\t\t\tcolor = formatterParams.color(value);\n\t\t\tbreak;\n\t\tcase \"object\":\n\t\t\tif(Array.isArray(formatterParams.color)){\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\n\t\t\t\tlet index = Math.floor(percentValue / unit);\n\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\n\t\t\t\tindex = Math.max(index, 0);\n\t\t\t\tcolor = formatterParams.color[index];\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\tcolor = \"#2DC214\";\n\t}\n\n\t//generate legend\n\tswitch(typeof formatterParams.legend){\n\t\tcase \"string\":\n\t\t\tlegend = formatterParams.legend;\n\t\t\tbreak;\n\t\tcase \"function\":\n\t\t\tlegend = formatterParams.legend(value);\n\t\t\tbreak;\n\t\tcase \"boolean\":\n\t\t\tlegend = value;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlegend = false;\n\t}\n\n\t//set legend color\n\tswitch(typeof formatterParams.legendColor){\n\t\tcase \"string\":\n\t\t\tlegendColor = formatterParams.legendColor;\n\t\t\tbreak;\n\t\tcase \"function\":\n\t\t\tlegendColor = formatterParams.legendColor(value);\n\t\t\tbreak;\n\t\tcase \"object\":\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\n\t\t\t\tlet index = Math.floor(percentValue / unit);\n\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\n\t\t\t\tindex = Math.max(index, 0);\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlegendColor = \"#000\";\n\t}\n\n\telement.style.minWidth = \"30px\";\n\telement.style.position = \"relative\";\n\n\telement.setAttribute(\"aria-label\", percentValue);\n\n\tvar barEl = document.createElement(\"div\");\n\tbarEl.style.display = \"inline-block\";\n\tbarEl.style.width = percentValue + \"%\";\n\tbarEl.style.backgroundColor = color;\n\tbarEl.style.height = \"100%\";\n\n\tbarEl.setAttribute('data-max', max);\n\tbarEl.setAttribute('data-min', min);\n\n\tvar barContainer = document.createElement(\"div\");\n\tbarContainer.style.position = \"relative\";\n\tbarContainer.style.width = \"100%\";\n\tbarContainer.style.height = \"100%\";\n\n\tif(legend){\n\t\tvar legendEl = document.createElement(\"div\");\n\t\tlegendEl.style.position = \"absolute\";\n\t\tlegendEl.style.top = 0;\n\t\tlegendEl.style.left = 0;\n\t\tlegendEl.style.textAlign = legendAlign;\n\t\tlegendEl.style.width = \"100%\";\n\t\tlegendEl.style.color = legendColor;\n\t\tlegendEl.innerHTML = legend;\n\t}\n\n\tonRendered(function(){\n\n\t\t//handle custom element needed if formatter is to be included in printed/downloaded output\n\t\tif(!(cell instanceof CellComponent)){\n\t\t\tvar holderEl = document.createElement(\"div\");\n\t\t\tholderEl.style.position = \"absolute\";\n\t\t\tholderEl.style.top = \"4px\";\n\t\t\tholderEl.style.bottom = \"4px\";\n\t\t\tholderEl.style.left = \"4px\";\n\t\t\tholderEl.style.right = \"4px\";\n\n\t\t\telement.appendChild(holderEl);\n\n\t\t\telement = holderEl;\n\t\t}\n\n\t\telement.appendChild(barContainer);\n\t\tbarContainer.appendChild(barEl);\n\n\t\tif(legend){\n\t\t\tbarContainer.appendChild(legendEl);\n\t\t}\n\t});\n\n\treturn \"\";\n}","export default function(cell, formatterParams, onRendered){\n\tcell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue());\n\treturn \"\";\n}","export default function(cell, formatterParams, onRendered){\n\treturn '';\n}","export default function(cell, formatterParams, onRendered){\n\treturn '';\n}","export default function(cell, formatterParams, onRendered){\n\tvar content = document.createElement(\"span\");\n\tvar row = cell.getRow();\n\n\trow.watchPosition((position) => {\n\t\tcontent.innerText = position;\n\t});\n\t\n\treturn content;\n}","export default function(cell, formatterParams, onRendered){\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\n\treturn \"
\";\n}","export default function(cell, formatterParams, onRendered){\n\tvar el = document.createElement(\"div\"),\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\n\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\n\t\n\tel.innerHTML = `\n \n \n\n\n\n \n`;\n\n\tcell.getElement().classList.add(\"tabulator-row-handle\");\n\n\tfunction toggleList(isOpen){\n\t\tvar collapseEl = config.element;\n\n\t\tconfig.open = isOpen;\n\n\t\tif(collapseEl){\n\n\t\t\tif(config.open){\n\t\t\t\tel.classList.add(\"open\");\n\t\t\t\tcollapseEl.style.display = '';\n\t\t\t}else{\n\t\t\t\tel.classList.remove(\"open\");\n\t\t\t\tcollapseEl.style.display = 'none';\n\t\t\t}\n\t\t}\n\t}\n\n\tel.addEventListener(\"click\", function(e){\n\t\te.stopImmediatePropagation();\n\t\ttoggleList(!config.open);\n\t\tcell.getTable().rowManager.adjustTableSize();\n\t});\n\n\ttoggleList(config.open);\n\n\treturn el;\n}","import RowComponent from '../../../../core/row/RowComponent.js';\n\nexport default function(cell, formatterParams, onRendered){\n\tvar checkbox = document.createElement(\"input\");\n\tvar blocked = false;\n\n\tcheckbox.type = 'checkbox';\n\n\tcheckbox.setAttribute(\"aria-label\", \"Select Row\");\n\t\n\tif(this.table.modExists(\"selectRow\", true)){\n\n\t\tcheckbox.addEventListener(\"click\", (e) => {\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tif(typeof cell.getRow == 'function'){\n\t\t\tvar row = cell.getRow();\n\n\t\t\tif(row instanceof RowComponent){\n\n\t\t\t\tcheckbox.addEventListener(\"change\", (e) => {\n\t\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\n\t\t\t\t\t\tif(!blocked){\n\t\t\t\t\t\t\trow.toggleSelect();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tblocked = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trow.toggleSelect();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(this.table.options.selectableRangeMode === \"click\"){\n\t\t\t\t\tcheckbox.addEventListener(\"click\", (e) => {\n\t\t\t\t\t\tblocked = true;\n\t\t\t\t\t\tthis.table.modules.selectRow.handleComplexRowClick(row._row, e);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tcheckbox.checked = row.isSelected && row.isSelected();\n\t\t\t\tthis.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox);\n\t\t\t}else{\n\t\t\t\tcheckbox = \"\";\n\t\t\t}\n\t\t}else {\n\t\t\tcheckbox.addEventListener(\"change\", (e) => {\n\t\t\t\tif(this.table.modules.selectRow.selectedRows.length){\n\t\t\t\t\tthis.table.deselectRow();\n\t\t\t\t}else {\n\t\t\t\t\tthis.table.selectRow(formatterParams.rowRange);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);\n\t\t}\n\t}\n\n\treturn checkbox;\n}","import Module from '../../core/Module.js';\n\nimport defaultFormatters from './defaults/formatters.js';\n\nclass Format extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.registerColumnOption(\"formatter\");\n\t\tthis.registerColumnOption(\"formatterParams\");\n\t\t\n\t\tthis.registerColumnOption(\"formatterPrint\");\n\t\tthis.registerColumnOption(\"formatterPrintParams\");\n\t\tthis.registerColumnOption(\"formatterClipboard\");\n\t\tthis.registerColumnOption(\"formatterClipboardParams\");\n\t\tthis.registerColumnOption(\"formatterHtmlOutput\");\n\t\tthis.registerColumnOption(\"formatterHtmlOutputParams\");\n\t\tthis.registerColumnOption(\"titleFormatter\");\n\t\tthis.registerColumnOption(\"titleFormatterParams\");\n\t}\n\t\n\tinitialize(){\n\t\tthis.subscribe(\"cell-format\", this.formatValue.bind(this));\n\t\tthis.subscribe(\"cell-rendered\", this.cellRendered.bind(this));\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"column-format\", this.formatHeader.bind(this));\n\t}\n\t\n\t//initialize column formatter\n\tinitializeColumn(column){\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\n\t\t\n\t\tif(typeof column.definition.formatterPrint !== \"undefined\"){\n\t\t\tcolumn.modules.format.print = this.lookupFormatter(column, \"Print\");\n\t\t}\n\t\t\n\t\tif(typeof column.definition.formatterClipboard !== \"undefined\"){\n\t\t\tcolumn.modules.format.clipboard = this.lookupFormatter(column, \"Clipboard\");\n\t\t}\n\t\t\n\t\tif(typeof column.definition.formatterHtmlOutput !== \"undefined\"){\n\t\t\tcolumn.modules.format.htmlOutput = this.lookupFormatter(column, \"HtmlOutput\");\n\t\t}\n\t}\n\t\n\tlookupFormatter(column, type){\n\t\tvar config = {params:column.definition[\"formatter\" + type + \"Params\"] || {}},\n\t\tformatter = column.definition[\"formatter\" + type];\n\t\t\n\t\t//set column formatter\n\t\tswitch(typeof formatter){\n\t\t\tcase \"string\":\n\t\t\t\tif(Format.formatters[formatter]){\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"function\":\n\t\t\t\tconfig.formatter = formatter;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn config;\n\t}\n\t\n\tcellRendered(cell){\n\t\tif(cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered){\n\t\t\tcell.modules.format.renderedCallback();\n\t\t\tcell.modules.format.rendered = true;\n\t\t}\n\t}\n\t\n\t//return a formatted value for a column header\n\tformatHeader(column, title, el){\n\t\tvar formatter, params, onRendered, mockCell;\n\t\t\n\t\tif(column.definition.titleFormatter){\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\n\t\t\t\n\t\t\tonRendered = (callback) => {\n\t\t\t\tcolumn.titleFormatterRendered = callback;\n\t\t\t};\n\t\t\t\n\t\t\tmockCell = {\n\t\t\t\tgetValue:function(){\n\t\t\t\t\treturn title;\n\t\t\t\t},\n\t\t\t\tgetElement:function(){\n\t\t\t\t\treturn el;\n\t\t\t\t},\n\t\t\t\tgetColumn:function(){\n\t\t\t\t\treturn column.getComponent();\n\t\t\t\t},\n\t\t\t\tgetTable:() => {\n\t\t\t\t\treturn this.table;\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tparams = column.definition.titleFormatterParams || {};\n\t\t\t\n\t\t\tparams = typeof params === \"function\" ? params() : params;\n\t\t\t\n\t\t\treturn formatter.call(this, mockCell, params, onRendered);\n\t\t}else{\n\t\t\treturn title;\n\t\t}\n\t}\n\t\n\t\n\t//return a formatted value for a cell\n\tformatValue(cell){\n\t\tvar component = cell.getComponent(),\n\t\tparams = typeof cell.column.modules.format.params === \"function\" ? cell.column.modules.format.params(component) : cell.column.modules.format.params;\n\t\t\n\t\tfunction onRendered(callback){\n\t\t\tif(!cell.modules.format){\n\t\t\t\tcell.modules.format = {};\n\t\t\t}\n\t\t\t\n\t\t\tcell.modules.format.renderedCallback = callback;\n\t\t\tcell.modules.format.rendered = false;\n\t\t}\n\t\t\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\n\t}\n\t\n\tformatExportValue(cell, type){\n\t\tvar formatter = cell.column.modules.format[type],\n\t\tparams;\n\t\t\n\t\tif(formatter){\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\n\t\t\t\n\t\t\tfunction onRendered(callback){\n\t\t\t\tif(!cell.modules.format){\n\t\t\t\t\tcell.modules.format = {};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcell.modules.format.renderedCallback = callback;\n\t\t\t\tcell.modules.format.rendered = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\n\t\t\t\n\t\t}else{\n\t\t\treturn this.formatValue(cell);\n\t\t}\n\t}\n\t\n\tsanitizeHTML(value){\n\t\tif(value){\n\t\t\tvar entityMap = {\n\t\t\t\t'&': '&',\n\t\t\t\t'<': '<',\n\t\t\t\t'>': '>',\n\t\t\t\t'\"': '"',\n\t\t\t\t\"'\": ''',\n\t\t\t\t'/': '/',\n\t\t\t\t'`': '`',\n\t\t\t\t'=': '='\n\t\t\t};\n\t\t\t\n\t\t\treturn String(value).replace(/[&<>\"'`=/]/g, function (s) {\n\t\t\t\treturn entityMap[s];\n\t\t\t});\n\t\t}else{\n\t\t\treturn value;\n\t\t}\n\t}\n\t\n\temptyToSpace(value){\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\n\t}\n\t\n\t//get formatter for cell\n\tgetFormatter(formatter){\n\t\tswitch(typeof formatter){\n\t\t\tcase \"string\":\n\t\t\t\tif(Format.formatters[formatter]){\n\t\t\t\t\tformatter = Format.formatters[formatter];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\n\t\t\t\t\tformatter = Format.formatters.plaintext;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"function\":\n\t\t\t//Custom formatter Function, do nothing\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tformatter = Format.formatters.plaintext;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn formatter;\n\t}\n}\n\nFormat.moduleName = \"format\";\n\n//load defaults\nFormat.formatters = defaultFormatters;\n\nexport default Format;","import Module from '../../core/Module.js';\n\nclass FrozenColumns extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.leftColumns = [];\n\t\tthis.rightColumns = [];\n\t\tthis.initializationMode = \"left\";\n\t\tthis.active = false;\n\t\tthis.blocked = true;\n\t\t\n\t\tthis.registerColumnOption(\"frozen\");\n\t}\n\t\n\t//reset initial state\n\treset(){\n\t\tthis.initializationMode = \"left\";\n\t\tthis.leftColumns = [];\n\t\tthis.rightColumns = [];\n\t\tthis.active = false;\n\t}\n\t\n\tinitialize(){\n\t\tthis.subscribe(\"cell-layout\", this.layoutCell.bind(this));\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"column-width\", this.layout.bind(this));\n\t\tthis.subscribe(\"row-layout-after\", this.layoutRow.bind(this));\n\t\tthis.subscribe(\"table-layout\", this.layout.bind(this));\n\t\tthis.subscribe(\"columns-loading\", this.reset.bind(this));\n\t\t\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\n\t\t\n\t\tthis.subscribe(\"table-redraw\", this.layout.bind(this));\n\t\tthis.subscribe(\"layout-refreshing\", this.blockLayout.bind(this));\n\t\tthis.subscribe(\"layout-refreshed\", this.unblockLayout.bind(this));\n\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\n\t}\n\t\n\tblockLayout(){\n\t\tthis.blocked = true;\n\t}\n\t\n\tunblockLayout(){\n\t\tthis.blocked = false;\n\t}\n\t\n\tlayoutCell(cell){\n\t\tthis.layoutElement(cell.element, cell.column);\n\t}\n\t\n\treinitializeColumns(){\n\t\tthis.reset();\n\t\t\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\tthis.initializeColumn(column);\n\t\t});\n\t}\n\t\n\t//initialize specific column\n\tinitializeColumn(column){\n\t\tvar config = {margin:0, edge:false};\n\t\t\n\t\tif(!column.isGroup){\n\t\t\t\n\t\t\tif(this.frozenCheck(column)){\n\t\t\t\t\n\t\t\t\tconfig.position = this.initializationMode;\n\t\t\t\t\n\t\t\t\tif(this.initializationMode == \"left\"){\n\t\t\t\t\tthis.leftColumns.push(column);\n\t\t\t\t}else{\n\t\t\t\t\tthis.rightColumns.unshift(column);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.active = true;\n\t\t\t\t\n\t\t\t\tcolumn.modules.frozen = config;\n\t\t\t}else{\n\t\t\t\tthis.initializationMode = \"right\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfrozenCheck(column){\n\t\tif(column.parent.isGroup && column.definition.frozen){\n\t\t\tconsole.warn(\"Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups\");\n\t\t}\n\t\t\n\t\tif(column.parent.isGroup){\n\t\t\treturn this.frozenCheck(column.parent);\n\t\t}else{\n\t\t\treturn column.definition.frozen;\n\t\t}\n\t}\n\t\n\t//layout calculation rows\n\tlayoutCalcRows(){\n\t\tif(this.table.modExists(\"columnCalcs\")){\n\t\t\tif(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.topRow);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){\n\t\t\t\tthis.layoutRow(this.table.modules.columnCalcs.botRow);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.modExists(\"groupRows\")){\n\t\t\t\tthis.layoutGroupCalcs(this.table.modules.groupRows.getGroups());\n\t\t\t}\n\t\t}\n\t}\n\t\n\tlayoutGroupCalcs(groups){\n\t\tgroups.forEach((group) => {\n\t\t\tif(group.calcs.top){\n\t\t\t\tthis.layoutRow(group.calcs.top);\n\t\t\t}\n\t\t\t\n\t\t\tif(group.calcs.bottom){\n\t\t\t\tthis.layoutRow(group.calcs.bottom);\n\t\t\t}\n\t\t\t\n\t\t\tif(group.groupList && group.groupList.length){\n\t\t\t\tthis.layoutGroupCalcs(group.groupList);\n\t\t\t}\n\t\t});\n\t}\n\t\n\t//calculate column positions and layout headers\n\tlayoutColumnPosition(allCells){\n\t\tvar leftParents = [];\n\t\t\n\t\tvar leftMargin = 0;\n\t\tvar rightMargin = 0;\n\t\t\n\t\tthis.leftColumns.forEach((column, i) => {\t\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\n\t\t\t\n\t\t\tif(column.visible){\n\t\t\t\tleftMargin += column.getWidth();\n\t\t\t}\n\t\t\t\n\t\t\tif(i == this.leftColumns.length - 1){\n\t\t\t\tcolumn.modules.frozen.edge = true;\n\t\t\t}else{\n\t\t\t\tcolumn.modules.frozen.edge = false;\n\t\t\t}\n\t\t\t\n\t\t\tif(column.parent.isGroup){\n\t\t\t\tvar parentEl = this.getColGroupParentElement(column);\n\t\t\t\tif(!leftParents.includes(parentEl)){\n\t\t\t\t\tthis.layoutElement(parentEl, column);\n\t\t\t\t\tleftParents.push(parentEl);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(column.modules.frozen.edge){\n\t\t\t\t\tparentEl.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.layoutElement(column.getElement(), column);\n\t\t\t}\n\t\t\t\n\t\t\tif(allCells){\n\t\t\t\tcolumn.cells.forEach((cell) => {\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.rightColumns.forEach((column, i) => {\n\t\t\t\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\n\t\t\t\n\t\t\tif(column.visible){\n\t\t\t\trightMargin += column.getWidth();\n\t\t\t}\n\t\t\t\n\t\t\tif(i == this.rightColumns.length - 1){\n\t\t\t\tcolumn.modules.frozen.edge = true;\n\t\t\t}else{\n\t\t\t\tcolumn.modules.frozen.edge = false;\n\t\t\t}\n\t\t\t\n\t\t\tif(column.parent.isGroup){\n\t\t\t\tthis.layoutElement(this.getColGroupParentElement(column), column);\n\t\t\t}else{\n\t\t\t\tthis.layoutElement(column.getElement(), column);\n\t\t\t}\n\t\t\t\n\t\t\tif(allCells){\n\t\t\t\tcolumn.cells.forEach((cell) => {\n\t\t\t\t\tthis.layoutElement(cell.getElement(true), column);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\t\n\tgetColGroupParentElement(column){\n\t\treturn column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();\n\t}\n\t\n\t//layout columns appropriately\n\tlayout(){\t\n\t\tif(this.active && !this.blocked){\n\t\t\n\t\t\t//calculate left columns\n\t\t\tthis.layoutColumnPosition();\n\t\t\t\n\t\t\tthis.reinitializeRows();\n\t\t\t\n\t\t\tthis.layoutCalcRows();\n\t\t}\n\t}\n\t\n\treinitializeRows(){\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\n\t\t\n\t\totherRows.forEach((row) =>{\n\t\t\trow.deinitialize();\n\t\t});\n\t\t\n\t\tvisibleRows.forEach((row) =>{\n\t\t\tif(row.type === \"row\"){\n\t\t\t\tthis.layoutRow(row);\n\t\t\t}\n\t\t});\n\t}\n\t\n\tlayoutRow(row){\n\t\tif(this.table.options.layout === \"fitDataFill\" && this.rightColumns.length){\n\t\t\tthis.table.rowManager.getTableElement().style.minWidth = \"calc(100% - \" + this.rightMargin + \")\";\n\t\t}\n\t\t\n\t\tthis.leftColumns.forEach((column) => {\n\t\t\tvar cell = row.getCell(column);\n\t\t\t\n\t\t\tif(cell){\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.rightColumns.forEach((column) => {\n\t\t\tvar cell = row.getCell(column);\n\t\t\t\n\t\t\tif(cell){\n\t\t\t\tthis.layoutElement(cell.getElement(true), column);\n\t\t\t}\n\t\t});\n\t}\n\t\n\tlayoutElement(element, column){\n\t\tvar position;\n\t\t\n\t\tif(column.modules.frozen){\n\t\t\telement.style.position = \"sticky\";\n\n\t\t\tif(this.table.rtl){\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\n\t\t\t}else{\n\t\t\t\tposition = column.modules.frozen.position;\n\t\t\t}\n\t\t\n\t\t\telement.style[position] = column.modules.frozen.margin;\n\n\t\t\telement.classList.add(\"tabulator-frozen\");\n\t\t\t\n\t\t\tif(column.modules.frozen.edge){\n\t\t\t\telement.classList.add(\"tabulator-frozen-\" + column.modules.frozen.position);\n\t\t\t}\n\t\t}\n\t}\n\n\tadjustForScrollbar(width){\n\t\tif(this.rightColumns.length){\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\n\t\t}\n\t}\n\t\n\t_calcSpace(columns, index){\n\t\tvar width = 0;\n\t\t\n\t\tfor (let i = 0; i < index; i++){\n\t\t\tif(columns[i].visible){\n\t\t\t\twidth += columns[i].getWidth();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn width;\n\t}\n}\n\nFrozenColumns.moduleName = \"frozenColumns\";\n\nexport default FrozenColumns;","import Module from '../../core/Module.js';\n\nclass FrozenRows extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.topElement = document.createElement(\"div\");\n\t\tthis.rows = [];\n\n\t\t//register component functions\n\t\tthis.registerComponentFunction(\"row\", \"freeze\", this.freezeRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"unfreeze\", this.unfreezeRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"isFrozen\", this.isRowFrozen.bind(this));\n\n\t\t//register table options\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\n\t}\n\n\tinitialize(){\n\t\tthis.rows = [];\n\n\t\tthis.topElement.classList.add(\"tabulator-frozen-rows-holder\");\n\n\t\t// this.table.columnManager.element.append(this.topElement);\n\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\n\n\t\tthis.subscribe(\"row-deleting\", this.detachRow.bind(this));\n\t\tthis.subscribe(\"rows-visible\", this.visibleRows.bind(this));\n\n\t\tthis.registerDisplayHandler(this.getRows.bind(this), 10);\n\n\t\tif(this.table.options.frozenRows){\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\n\t\t\tthis.subscribe(\"table-redrawing\", this.resizeHolderWidth.bind(this));\n\t\t\tthis.subscribe(\"column-resized\", this.resizeHolderWidth.bind(this));\n\t\t\tthis.subscribe(\"column-show\", this.resizeHolderWidth.bind(this));\n\t\t\tthis.subscribe(\"column-hide\", this.resizeHolderWidth.bind(this));\n\t\t}\n\n\t\tthis.resizeHolderWidth();\n\t}\n\n\tresizeHolderWidth(){\n\t\tthis.topElement.style.minWidth = this.table.columnManager.headersElement.offsetWidth + \"px\";\n\t}\n\n\tinitializeRows(){\n\t\tthis.table.rowManager.getRows().forEach((row) => {\n\t\t\tthis.initializeRow(row);\n\t\t});\n\t}\n\n\tinitializeRow(row){\n\t\tvar frozenRows = this.table.options.frozenRows,\n\t\trowType = typeof frozenRows;\n\n\t\tif(rowType === \"number\"){\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\n\t\t\t\tthis.freezeRow(row);\n\t\t\t}\n\t\t}else if(rowType === \"function\"){\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\n\t\t\t\tthis.freezeRow(row);\n\t\t\t}\n\t\t}else if(Array.isArray(frozenRows)){\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\n\t\t\t\tthis.freezeRow(row);\n\t\t\t}\n\t\t}\n\t}\n\n\tisRowFrozen(row){\n\t\tvar index = this.rows.indexOf(row);\n\t\treturn index > -1;\n\t}\n\n\tisFrozen(){\n\t\treturn !!this.rows.length;\n\t}\n\n\tvisibleRows(viewable, rows){\n\t\tthis.rows.forEach((row) => {\n\t\t\trows.push(row);\n\t\t});\n\n\t\treturn rows;\n\t}\n\n\t//filter frozen rows out of display data\n\tgetRows(rows){\n\t\tvar output = rows.slice(0);\n\n\t\tthis.rows.forEach(function(row){\n\t\t\tvar index = output.indexOf(row);\n\n\t\t\tif(index > -1){\n\t\t\t\toutput.splice(index, 1);\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tfreezeRow(row){\n\t\tif(!row.modules.frozen){\n\t\t\trow.modules.frozen = true;\n\t\t\tthis.topElement.appendChild(row.getElement());\n\t\t\trow.initialize();\n\t\t\trow.normalizeHeight();\n\t\t\n\t\t\tthis.rows.push(row);\n\n\t\t\tthis.refreshData(false, \"display\");\n\n\t\t\tthis.table.rowManager.adjustTableSize();\n\n\t\t\tthis.styleRows();\n\n\t\t}else{\n\t\t\tconsole.warn(\"Freeze Error - Row is already frozen\");\n\t\t}\n\t}\n\n\tunfreezeRow(row){\n\t\tif(row.modules.frozen){\n\n\t\t\trow.modules.frozen = false;\n\n\t\t\tthis.detachRow(row);\n\n\t\t\tthis.table.rowManager.adjustTableSize();\n\n\t\t\tthis.refreshData(false, \"display\");\n\n\t\t\tif(this.rows.length){\n\t\t\t\tthis.styleRows();\n\t\t\t}\n\n\t\t}else{\n\t\t\tconsole.warn(\"Freeze Error - Row is already unfrozen\");\n\t\t}\n\t}\n\n\tdetachRow(row){\n\t\tvar index = this.rows.indexOf(row);\n\n\t\tif(index > -1){\n\t\t\tvar rowEl = row.getElement();\n\n\t\t\tif(rowEl.parentNode){\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\n\t\t\t}\n\n\t\t\tthis.rows.splice(index, 1);\n\t\t}\n\t}\n\n\tstyleRows(row){\n\t\tthis.rows.forEach((row, i) => {\n\t\t\tthis.table.rowManager.styleRow(row, i);\n\t\t});\n\t}\n}\n\nFrozenRows.moduleName = \"frozenRows\";\n\nexport default FrozenRows;","//public group object\nclass GroupComponent {\n\tconstructor (group){\n\t\tthis._group = group;\n\t\tthis.type = \"GroupComponent\";\n\n\t\treturn new Proxy(this, {\n\t\t\tget: function(target, name, receiver) {\n\t\t\t\tif (typeof target[name] !== \"undefined\") {\n\t\t\t\t\treturn target[name];\n\t\t\t\t}else{\n\t\t\t\t\treturn target._group.groupManager.table.componentFunctionBinder.handle(\"group\", target._group, name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tgetKey(){\n\t\treturn this._group.key;\n\t}\n\n\tgetField(){\n\t\treturn this._group.field;\n\t}\n\n\tgetElement(){\n\t\treturn this._group.element;\n\t}\n\n\tgetRows(){\n\t\treturn this._group.getRows(true);\n\t}\n\n\tgetSubGroups(){\n\t\treturn this._group.getSubGroups(true);\n\t}\n\n\tgetParentGroup(){\n\t\treturn this._group.parent ? this._group.parent.getComponent() : false;\n\t}\n\n\tisVisible(){\n\t\treturn this._group.visible;\n\t}\n\n\tshow(){\n\t\tthis._group.show();\n\t}\n\n\thide(){\n\t\tthis._group.hide();\n\t}\n\n\ttoggle(){\n\t\tthis._group.toggleVisibility();\n\t}\n\n\t_getSelf(){\n\t\treturn this._group;\n\t}\n\n\tgetTable(){\n\t\treturn this._group.groupManager.table;\n\t}\n}\n\nexport default GroupComponent;","import Helpers from '../../core/tools/Helpers.js';\nimport GroupComponent from './GroupComponent.js';\n\n//Group functions\nclass Group{\n\t\n\tconstructor(groupManager, parent, level, key, field, generator, oldGroup){\n\t\tthis.groupManager = groupManager;\n\t\tthis.parent = parent;\n\t\tthis.key = key;\n\t\tthis.level = level;\n\t\tthis.field = field;\n\t\tthis.hasSubGroups = level < (groupManager.groupIDLookups.length - 1);\n\t\tthis.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow;\n\t\tthis.type = \"group\"; //type of element\n\t\tthis.old = oldGroup;\n\t\tthis.rows = [];\n\t\tthis.groups = [];\n\t\tthis.groupList = [];\n\t\tthis.generator = generator;\n\t\tthis.element = false;\n\t\tthis.elementContents = false;\n\t\tthis.height = 0;\n\t\tthis.outerHeight = 0;\n\t\tthis.initialized = false;\n\t\tthis.calcs = {};\n\t\tthis.initialized = false;\n\t\tthis.modules = {};\n\t\tthis.arrowElement = false;\n\t\t\n\t\tthis.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== \"undefined\" ? groupManager.startOpen[level] : groupManager.startOpen[0]);\n\t\t\n\t\tthis.component = null;\n\t\t\n\t\tthis.createElements();\n\t\tthis.addBindings();\n\t\t\n\t\tthis.createValueGroups();\n\t}\n\t\n\twipe(elementsOnly){\n\t\tif(!elementsOnly){\n\t\t\tif(this.groupList.length){\n\t\t\t\tthis.groupList.forEach(function(group){\n\t\t\t\t\tgroup.wipe();\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tthis.rows.forEach((row) => {\n\t\t\t\t\tif(row.modules){\n\t\t\t\t\t\tdelete row.modules.group;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.element = false;\n\t\tthis.arrowElement = false;\n\t\tthis.elementContents = false;\n\t}\n\t\n\tcreateElements(){\n\t\tvar arrow = document.createElement(\"div\");\n\t\tarrow.classList.add(\"tabulator-arrow\");\n\t\t\n\t\tthis.element = document.createElement(\"div\");\n\t\tthis.element.classList.add(\"tabulator-row\");\n\t\tthis.element.classList.add(\"tabulator-group\");\n\t\tthis.element.classList.add(\"tabulator-group-level-\" + this.level);\n\t\tthis.element.setAttribute(\"role\", \"rowgroup\");\n\t\t\n\t\tthis.arrowElement = document.createElement(\"div\");\n\t\tthis.arrowElement.classList.add(\"tabulator-group-toggle\");\n\t\tthis.arrowElement.appendChild(arrow);\n\n\t\t//setup movable rows\n\t\tif(this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists(\"moveRow\")){\n\t\t\tthis.groupManager.table.modules.moveRow.initializeGroupHeader(this);\n\t\t}\n\t}\n\t\n\tcreateValueGroups(){\n\t\tvar level = this.level + 1;\n\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\n\t\t\tthis.groupManager.allowedValues[level].forEach((value) => {\n\t\t\t\tthis._createGroup(value, level);\n\t\t\t});\n\t\t}\n\t}\n\t\n\taddBindings(){\n\t\tvar toggleElement;\n\t\t\n\t\tif(this.groupManager.table.options.groupToggleElement){\n\t\t\ttoggleElement = this.groupManager.table.options.groupToggleElement == \"arrow\" ? this.arrowElement : this.element;\n\t\t\t\n\t\t\ttoggleElement.addEventListener(\"click\", (e) => {\n\t\t\t\te.stopPropagation();\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t\tthis.toggleVisibility();\n\t\t\t});\n\t\t}\n\t}\n\t\n\t_createGroup(groupID, level){\n\t\tvar groupKey = level + \"_\" + groupID;\n\t\tvar group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false);\n\t\t\n\t\tthis.groups[groupKey] = group;\n\t\tthis.groupList.push(group);\n\t}\n\t\n\t_addRowToGroup(row){\n\t\t\n\t\tvar level = this.level + 1;\n\t\t\n\t\tif(this.hasSubGroups){\n\t\t\tvar groupID = this.groupManager.groupIDLookups[level].func(row.getData()),\n\t\t\tgroupKey = level + \"_\" + groupID;\n\t\t\t\n\t\t\tif(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){\n\t\t\t\tif(this.groups[groupKey]){\n\t\t\t\t\tthis.groups[groupKey].addRow(row);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(!this.groups[groupKey]){\n\t\t\t\t\tthis._createGroup(groupID, level);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.groups[groupKey].addRow(row);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t_addRow(row){\n\t\tthis.rows.push(row);\n\t\trow.modules.group = this;\n\t}\n\t\n\tinsertRow(row, to, after){\n\t\tvar data = this.conformRowData({});\n\t\t\n\t\trow.updateData(data);\n\t\t\n\t\tvar toIndex = this.rows.indexOf(to);\n\t\t\n\t\tif(toIndex > -1){\n\t\t\tif(after){\n\t\t\t\tthis.rows.splice(toIndex+1, 0, row);\n\t\t\t}else{\n\t\t\t\tthis.rows.splice(toIndex, 0, row);\n\t\t\t}\n\t\t}else{\n\t\t\tif(after){\n\t\t\t\tthis.rows.push(row);\n\t\t\t}else{\n\t\t\t\tthis.rows.unshift(row);\n\t\t\t}\n\t\t}\n\t\t\n\t\trow.modules.group = this;\n\t\t\n\t\t// this.generateGroupHeaderContents();\n\t\t\n\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\n\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\n\t\t}\n\t\t\n\t\tthis.groupManager.updateGroupRows(true);\n\t}\n\t\n\tscrollHeader(left){\n\t\tif(this.arrowElement){\n\t\t\tthis.arrowElement.style.marginLeft = left;\n\t\t\t\n\t\t\tthis.groupList.forEach(function(child){\n\t\t\t\tchild.scrollHeader(left);\n\t\t\t});\n\t\t}\n\t}\n\t\n\tgetRowIndex(row){}\n\t\n\t//update row data to match grouping constraints\n\tconformRowData(data){\n\t\tif(this.field){\n\t\t\tdata[this.field] = this.key;\n\t\t}else{\n\t\t\tconsole.warn(\"Data Conforming Error - Cannot conform row data to match new group as groupBy is a function\");\n\t\t}\n\t\t\n\t\tif(this.parent){\n\t\t\tdata = this.parent.conformRowData(data);\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n\t\n\tremoveRow(row){\n\t\tvar index = this.rows.indexOf(row);\n\t\tvar el = row.getElement();\n\t\t\n\t\tif(index > -1){\n\t\t\tthis.rows.splice(index, 1);\n\t\t}\n\t\t\n\t\tif(!this.groupManager.table.options.groupValues && !this.rows.length){\n\t\t\tif(this.parent){\n\t\t\t\tthis.parent.removeGroup(this);\n\t\t\t}else{\n\t\t\t\tthis.groupManager.removeGroup(this);\n\t\t\t}\t\t\n\t\t\t\n\t\t\tthis.groupManager.updateGroupRows(true);\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tif(el.parentNode){\n\t\t\t\tel.parentNode.removeChild(el);\n\t\t\t}\n\n\t\t\tif(!this.groupManager.blockRedraw){\n\t\t\t\tthis.generateGroupHeaderContents();\n\t\t\t\t\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.options.columnCalcs != \"table\"){\n\t\t\t\t\tthis.groupManager.table.modules.columnCalcs.recalcGroup(this);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tremoveGroup(group){\n\t\tvar groupKey = group.level + \"_\" + group.key,\n\t\tindex;\n\t\t\n\t\tif(this.groups[groupKey]){\n\t\t\tdelete this.groups[groupKey];\n\t\t\t\n\t\t\tindex = this.groupList.indexOf(group);\n\t\t\t\n\t\t\tif(index > -1){\n\t\t\t\tthis.groupList.splice(index, 1);\n\t\t\t}\n\t\t\t\n\t\t\tif(!this.groupList.length){\n\t\t\t\tif(this.parent){\n\t\t\t\t\tthis.parent.removeGroup(this);\n\t\t\t\t}else{\n\t\t\t\t\tthis.groupManager.removeGroup(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tgetHeadersAndRows(){\n\t\tvar output = [];\n\t\t\n\t\toutput.push(this);\n\t\t\n\t\tthis._visSet();\n\t\t\n\t\t\n\t\tif(this.calcs.top){\n\t\t\tthis.calcs.top.detachElement();\n\t\t\tthis.calcs.top.deleteCells();\n\t\t}\n\t\t\n\t\tif(this.calcs.bottom){\n\t\t\tthis.calcs.bottom.detachElement();\n\t\t\tthis.calcs.bottom.deleteCells();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(this.visible){\n\t\t\tif(this.groupList.length){\n\t\t\t\tthis.groupList.forEach(function(group){\n\t\t\t\t\toutput = output.concat(group.getHeadersAndRows());\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\n\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\n\t\t\t\t\toutput.push(this.calcs.top);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput = output.concat(this.rows);\n\t\t\t\t\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\n\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\n\t\t\t\t\toutput.push(this.calcs.bottom);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(!this.groupList.length && this.groupManager.table.options.columnCalcs != \"table\"){\n\t\t\t\t\n\t\t\t\tif(this.groupManager.table.modExists(\"columnCalcs\")){\n\t\t\t\t\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\n\t\t\t\t\t\t\tthis.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows);\n\t\t\t\t\t\t\toutput.push(this.calcs.top);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\t\t\t\t\t\t\n\t\t\t\t\t\tif(this.groupManager.table.options.groupClosedShowCalcs){\n\t\t\t\t\t\t\tthis.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows);\n\t\t\t\t\t\t\toutput.push(this.calcs.bottom);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetData(visible, transform){\n\t\tvar output = [];\n\t\t\n\t\tthis._visSet();\n\t\t\n\t\tif(!visible || (visible && this.visible)){\n\t\t\tthis.rows.forEach((row) => {\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetRowCount(){\n\t\tvar count = 0;\n\t\t\n\t\tif(this.groupList.length){\n\t\t\tthis.groupList.forEach((group) => {\n\t\t\t\tcount += group.getRowCount();\n\t\t\t});\n\t\t}else{\n\t\t\tcount = this.rows.length;\n\t\t}\n\t\treturn count;\n\t}\n\t\n\ttoggleVisibility(){\n\t\tif(this.visible){\n\t\t\tthis.hide();\n\t\t}else{\n\t\t\tthis.show();\n\t\t}\n\t}\n\t\n\thide(){\n\t\tthis.visible = false;\n\t\t\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"basic\" && !this.groupManager.table.options.pagination){\n\t\t\t\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\n\t\t\t\n\t\t\tif(this.groupList.length){\n\t\t\t\tthis.groupList.forEach((group) => {\n\t\t\t\t\t\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\n\t\t\t\t\t\n\t\t\t\t\trows.forEach((row) => {\n\t\t\t\t\t\trow.detachElement();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tthis.rows.forEach((row) => {\n\t\t\t\t\tvar rowEl = row.getElement();\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tthis.groupManager.updateGroupRows(true);\n\t\t\t\n\t\t}else{\n\t\t\tthis.groupManager.updateGroupRows(true);\n\t\t}\n\t\t\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), false);\n\t}\n\t\n\tshow(){\n\t\tthis.visible = true;\n\t\t\n\t\tif(this.groupManager.table.rowManager.getRenderMode() == \"basic\" && !this.groupManager.table.options.pagination){\n\t\t\t\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\n\t\t\t\n\t\t\tvar prev = this.generateElement();\n\t\t\t\n\t\t\tif(this.groupList.length){\n\t\t\t\tthis.groupList.forEach((group) => {\n\t\t\t\t\tvar rows = group.getHeadersAndRows();\n\t\t\t\t\t\n\t\t\t\t\trows.forEach((row) => {\n\t\t\t\t\t\tvar rowEl = row.getElement();\n\t\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\n\t\t\t\t\t\trow.initialize();\n\t\t\t\t\t\tprev = rowEl;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tthis.rows.forEach((row) => {\n\t\t\t\t\tvar rowEl = row.getElement();\n\t\t\t\t\tprev.parentNode.insertBefore(rowEl, prev.nextSibling);\n\t\t\t\t\trow.initialize();\n\t\t\t\t\tprev = rowEl;\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tthis.groupManager.updateGroupRows(true);\n\t\t}else{\n\t\t\tthis.groupManager.updateGroupRows(true);\n\t\t}\n\t\t\n\t\tthis.groupManager.table.externalEvents.dispatch(\"groupVisibilityChanged\", this.getComponent(), true);\n\t}\n\t\n\t_visSet(){\n\t\tvar data = [];\n\t\t\n\t\tif(typeof this.visible == \"function\"){\n\t\t\t\n\t\t\tthis.rows.forEach(function(row){\n\t\t\t\tdata.push(row.getData());\n\t\t\t});\n\t\t\t\n\t\t\tthis.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent());\n\t\t}\n\t}\n\t\n\tgetRowGroup(row){\n\t\tvar match = false;\n\t\tif(this.groupList.length){\n\t\t\tthis.groupList.forEach(function(group){\n\t\t\t\tvar result = group.getRowGroup(row);\n\t\t\t\t\n\t\t\t\tif(result){\n\t\t\t\t\tmatch = result;\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tif(this.rows.find(function(item){\n\t\t\t\treturn item === row;\n\t\t\t})){\n\t\t\t\tmatch = this;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn match;\n\t}\n\t\n\tgetSubGroups(component){\n\t\tvar output = [];\n\t\t\n\t\tthis.groupList.forEach(function(child){\n\t\t\toutput.push(component ? child.getComponent() : child);\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetRows(component){\n\t\tvar output = [];\n\t\t\n\t\tthis.rows.forEach(function(row){\n\t\t\toutput.push(component ? row.getComponent() : row);\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgenerateGroupHeaderContents(){\n\t\tvar data = [];\n\t\t\n\t\tthis.rows.forEach(function(row){\n\t\t\tdata.push(row.getData());\n\t\t});\n\t\t\n\t\tthis.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent());\n\t\t\n\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\t\t\n\t\tif(typeof this.elementContents === \"string\"){\n\t\t\tthis.element.innerHTML = this.elementContents;\n\t\t}else{\n\t\t\tthis.element.appendChild(this.elementContents);\n\t\t}\n\t\t\n\t\tthis.element.insertBefore(this.arrowElement, this.element.firstChild);\n\t}\n\t\n\tgetPath(path = []) {\n\t\tpath.unshift(this.key);\n\t\tif(this.parent) {\n\t\t\tthis.parent.getPath(path);\n\t\t}\n\t\treturn path;\n\t}\n\t\n\t////////////// Standard Row Functions //////////////\n\t\n\tgetElement(){\n\t\treturn this.elementContents ? this.element : this.generateElement();\n\t}\n\t\n\tgenerateElement(){\n\t\tthis.addBindings = false;\n\t\t\n\t\tthis._visSet();\n\t\t\n\t\tif(this.visible){\n\t\t\tthis.element.classList.add(\"tabulator-group-visible\");\n\t\t}else{\n\t\t\tthis.element.classList.remove(\"tabulator-group-visible\");\n\t\t}\n\t\t\n\t\tfor(var i = 0; i < this.element.childNodes.length; ++i){\n\t\t\tthis.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]);\n\t\t}\n\t\t\n\t\tthis.generateGroupHeaderContents();\n\t\t\n\t\t// this.addBindings();\n\t\t\n\t\treturn this.element;\n\t}\n\t\n\tdetachElement(){\n\t\tif (this.element && this.element.parentNode){\n\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t}\n\t}\n\t\n\t//normalize the height of elements in the row\n\tnormalizeHeight(){\n\t\tthis.setHeight(this.element.clientHeight);\n\t}\n\t\n\tinitialize(force){\n\t\tif(!this.initialized || force){\n\t\t\tthis.normalizeHeight();\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\t\n\treinitialize(){\n\t\tthis.initialized = false;\n\t\tthis.height = 0;\n\t\t\n\t\tif(Helpers.elVisible(this.element)){\n\t\t\tthis.initialize(true);\n\t\t}\n\t}\n\t\n\tsetHeight(height){\n\t\tif(this.height != height){\n\t\t\tthis.height = height;\n\t\t\tthis.outerHeight = this.element.offsetHeight;\n\t\t}\n\t}\n\t\n\t//return rows outer height\n\tgetHeight(){\n\t\treturn this.outerHeight;\n\t}\n\t\n\tgetGroup(){\n\t\treturn this;\n\t}\n\t\n\treinitializeHeight(){}\n\t\n\tcalcHeight(){}\n\t\n\tsetCellHeight(){}\n\t\n\tclearCellHeight(){}\n\t\n\tdeinitializeHeight(){}\n\t\n\t//////////////// Object Generation /////////////////\n\tgetComponent(){\n\t\tif(!this.component){\n\t\t\tthis.component = new GroupComponent(this);\n\t\t}\n\t\t\n\t\treturn this.component;\n\t}\n}\n\nexport default Group;","import Module from '../../core/Module.js';\n\nimport Group from './Group.js';\n\nclass GroupRows extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.groupIDLookups = false; //enable table grouping and set field to group by\n\t\tthis.startOpen = [function(){return false;}]; //starting state of group\n\t\tthis.headerGenerator = [function(){return \"\";}];\n\t\tthis.groupList = []; //ordered list of groups\n\t\tthis.allowedValues = false;\n\t\tthis.groups = {}; //hold row groups\n\t\t\n\t\tthis.displayHandler = this.getRows.bind(this);\n\n\t\tthis.blockRedraw = false;\n\t\t\n\t\t//register table options\n\t\tthis.registerTableOption(\"groupBy\", false); //enable table grouping and set field to group by\n\t\tthis.registerTableOption(\"groupStartOpen\", true); //starting state of group\n\t\tthis.registerTableOption(\"groupValues\", false);\n\t\tthis.registerTableOption(\"groupUpdateOnCellEdit\", false);\n\t\tthis.registerTableOption(\"groupHeader\", false); //header generation function\n\t\tthis.registerTableOption(\"groupHeaderPrint\", null);\n\t\tthis.registerTableOption(\"groupHeaderClipboard\", null);\n\t\tthis.registerTableOption(\"groupHeaderHtmlOutput\", null);\n\t\tthis.registerTableOption(\"groupHeaderDownload\", null);\n\t\tthis.registerTableOption(\"groupToggleElement\", \"arrow\");\n\t\tthis.registerTableOption(\"groupClosedShowCalcs\", false);\n\t\t\n\t\t//register table functions\n\t\tthis.registerTableFunction(\"setGroupBy\", this.setGroupBy.bind(this));\n\t\tthis.registerTableFunction(\"setGroupValues\", this.setGroupValues.bind(this));\n\t\tthis.registerTableFunction(\"setGroupStartOpen\", this.setGroupStartOpen.bind(this));\n\t\tthis.registerTableFunction(\"setGroupHeader\", this.setGroupHeader.bind(this));\n\t\tthis.registerTableFunction(\"getGroups\", this.userGetGroups.bind(this));\n\t\tthis.registerTableFunction(\"getGroupedData\", this.userGetGroupedData.bind(this));\n\t\t\n\t\t//register component functions\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\n\t}\n\t\n\t//initialize group configuration\n\tinitialize(){\n\t\tthis.subscribe(\"table-destroy\", this._blockRedrawing.bind(this));\n\t\tthis.subscribe(\"rows-wipe\", this._blockRedrawing.bind(this));\n\t\tthis.subscribe(\"rows-wiped\", this._restore_redrawing.bind(this));\n\n\t\tif(this.table.options.groupBy){\n\t\t\tif(this.table.options.groupUpdateOnCellEdit){\n\t\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.reassignRowToGroup.bind(this), 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.subscribe(\"table-built\", this.configureGroupSetup.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleting.bind(this));\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\n\t\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHeaders.bind(this));\n\t\t\tthis.subscribe(\"rows-wipe\", this.wipe.bind(this));\n\t\t\tthis.subscribe(\"rows-added\", this.rowsUpdated.bind(this));\n\t\t\tthis.subscribe(\"row-moving\", this.rowMoving.bind(this));\n\t\t\tthis.subscribe(\"row-adding-index\", this.rowAddingIndex.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\n\t\t\t\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\n\t\t\t\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\t\n\t_blockRedrawing(){\n\t\tthis.blockRedraw = true;\n\t}\n\n\t_restore_redrawing(){\n\t\tthis.blockRedraw = false;\n\t}\n\n\tconfigureGroupSetup(){\n\t\tif(this.table.options.groupBy){\n\t\t\tvar groupBy = this.table.options.groupBy,\n\t\t\tstartOpen = this.table.options.groupStartOpen,\n\t\t\tgroupHeader = this.table.options.groupHeader;\n\t\t\t\n\t\t\tthis.allowedValues = this.table.options.groupValues;\n\t\t\t\n\t\t\tif(Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length){\n\t\t\t\tconsole.warn(\"Error creating group headers, groupHeader array is shorter than groupBy array\");\n\t\t\t}\n\t\t\t\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\n\t\t\t\n\t\t\tthis.langBind(\"groups|item\", (langValue, lang) => {\n\t\t\t\tthis.headerGenerator[0] = (value, count, data) => { //header layout function\n\t\t\t\t\treturn (typeof value === \"undefined\" ? \"\" : value) + \"(\" + count + \" \" + ((count === 1) ? langValue : lang.groups.items) + \")\";\n\t\t\t\t};\n\t\t\t});\n\t\t\t\n\t\t\tthis.groupIDLookups = [];\n\t\t\t\n\t\t\tif(groupBy){\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"table\" && this.table.options.columnCalcs != \"both\"){\n\t\t\t\t\tthis.table.modules.columnCalcs.removeCalcs();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs != \"group\"){\n\t\t\t\t\t\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\n\t\t\t\t\t\n\t\t\t\t\tcols.forEach((col) => {\n\t\t\t\t\t\tif(col.definition.topCalc){\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeTopRow();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(col.definition.bottomCalc){\n\t\t\t\t\t\t\tthis.table.modules.columnCalcs.initializeBottomRow();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!Array.isArray(groupBy)){\n\t\t\t\tgroupBy = [groupBy];\n\t\t\t}\n\t\t\t\n\t\t\tgroupBy.forEach((group, i) => {\n\t\t\t\tvar lookupFunc, column;\n\t\t\t\t\n\t\t\t\tif(typeof group == \"function\"){\n\t\t\t\t\tlookupFunc = group;\n\t\t\t\t}else{\n\t\t\t\t\tcolumn = this.table.columnManager.getColumnByField(group);\n\t\t\t\t\t\n\t\t\t\t\tif(column){\n\t\t\t\t\t\tlookupFunc = function(data){\n\t\t\t\t\t\t\treturn column.getFieldValue(data);\n\t\t\t\t\t\t};\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlookupFunc = function(data){\n\t\t\t\t\t\t\treturn data[group];\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.groupIDLookups.push({\n\t\t\t\t\tfield: typeof group === \"function\" ? false : group,\n\t\t\t\t\tfunc:lookupFunc,\n\t\t\t\t\tvalues:this.allowedValues ? this.allowedValues[i] : false,\n\t\t\t\t});\n\t\t\t});\n\t\t\t\n\t\t\tif(startOpen){\n\t\t\t\tif(!Array.isArray(startOpen)){\n\t\t\t\t\tstartOpen = [startOpen];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstartOpen.forEach((level) => {\n\t\t\t\t\tlevel = typeof level == \"function\" ? level : function(){return true;};\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.startOpen = startOpen;\n\t\t\t}\n\t\t\t\n\t\t\tif(groupHeader){\n\t\t\t\tthis.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];\n\t\t\t}\n\t\t}else{\n\t\t\tthis.groupList = [];\n\t\t\tthis.groups = {};\n\t\t}\n\t}\n\t\n\trowSample(rows, prevValue){\n\t\tif(this.table.options.groupBy){\n\t\t\tvar group = this.getGroups(false)[0];\n\t\t\t\n\t\t\tprevValue.push(group.getRows(false)[0]);\n\t\t}\n\t\t\n\t\treturn prevValue;\n\t}\n\t\n\tvirtualRenderFill(){\n\t\tvar el = this.table.rowManager.tableElement;\n\t\tvar rows = this.table.rowManager.getVisibleRows();\n\t\t\n\t\tif(this.table.options.groupBy){\n\t\t\trows = rows.filter((row) => {\n\t\t\t\treturn row.type !== \"group\";\n\t\t\t});\n\t\t\t\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\n\t\t}else{\n\t\t\treturn rows;\n\t\t}\n\t}\n\t\n\trowAddingIndex(row, index, top){\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.assignRowToGroup(row);\n\t\t\t\n\t\t\tvar groupRows = row.modules.group.rows;\n\t\t\t\n\t\t\tif(groupRows.length > 1){\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\n\t\t\t\t\tif(top){\n\t\t\t\t\t\tif(groupRows[0] !== row){\n\t\t\t\t\t\t\tindex = groupRows[0];\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn index;\n\t\t}\n\t}\n\t\n\ttrackChanges(){\n\t\tthis.dispatch(\"group-changed\");\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\t\n\tsetGroupBy(groups){\n\t\tthis.table.options.groupBy = groups;\n\t\t\n\t\tif(!this.initialized){\n\t\t\tthis.initialize();\n\t\t}\n\t\t\n\t\tthis.configureGroupSetup();\n\n\t\tif(!groups && this.table.modExists(\"columnCalcs\") && this.table.options.columnCalcs === true){\n\t\t\tthis.table.modules.columnCalcs.reinitializeCalcs();\n\t\t}\n\t\t\n\t\tthis.refreshData();\n\t\t\n\t\tthis.trackChanges();\n\t}\n\t\n\tsetGroupValues(groupValues){\n\t\tthis.table.options.groupValues = groupValues;\n\t\tthis.configureGroupSetup();\n\t\tthis.refreshData();\n\t\t\n\t\tthis.trackChanges();\n\t}\n\t\n\tsetGroupStartOpen(values){\n\t\tthis.table.options.groupStartOpen = values;\n\t\tthis.configureGroupSetup();\n\t\t\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.refreshData();\n\t\t\t\n\t\t\tthis.trackChanges();\n\t\t}else{\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\n\t\t}\n\t}\n\t\n\tsetGroupHeader(values){\n\t\tthis.table.options.groupHeader = values;\n\t\tthis.configureGroupSetup();\n\t\t\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.refreshData();\n\t\t\t\n\t\t\tthis.trackChanges();\n\t\t}else{\n\t\t\tconsole.warn(\"Grouping Update - cant refresh view, no groups have been set\");\n\t\t}\n\t}\n\t\n\tuserGetGroups(values){\n\t\treturn this.getGroups(true);\n\t}\n\t\n\t// get grouped table data in the same format as getData()\n\tuserGetGroupedData(){\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\n\t}\n\t\n\t\n\t///////////////////////////////////////\n\t///////// Component Functions /////////\n\t///////////////////////////////////////\n\t\n\trowGetGroup(row){\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\trowMoving(from, to, after){\n\t\tif(this.table.options.groupBy){\n\t\t\tif(!after && to instanceof Group){\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\n\t\t\t}\n\t\t\t\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\n\t\t\t\n\t\t\tif(toGroup === fromGroup){\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\n\t\t\t}else{\n\t\t\t\tif(fromGroup){\n\t\t\t\t\tfromGroup.removeRow(from);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttoGroup.insertRow(from, to, after);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\trowDeleting(row){\n\t\t//remove from group\n\t\tif(this.table.options.groupBy && row.modules.group){\n\t\t\trow.modules.group.removeRow(row);\n\t\t}\n\t}\n\t\n\trowsUpdated(row){\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.updateGroupRows(true);\n\t\t}\t\n\t}\n\t\n\tcellUpdated(cell){\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.reassignRowToGroup(cell.row);\n\t\t}\n\t}\n\t\n\t//return appropriate rows with group headers\n\tgetRows(rows){\n\t\tif(this.table.options.groupBy && this.groupIDLookups.length){\n\t\t\t\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\n\t\t\t\n\t\t\tthis.generateGroups(rows);\n\t\t\t\n\t\t\tif(this.subscribedExternal(\"dataGrouped\")){\n\t\t\t\tthis.dispatchExternal(\"dataGrouped\", this.getGroups(true));\n\t\t\t}\n\t\t\t\n\t\t\treturn this.updateGroupRows();\n\t\t\t\n\t\t}else{\n\t\t\treturn rows.slice(0);\n\t\t}\n\t}\n\t\n\tgetGroups(component){\n\t\tvar groupComponents = [];\n\t\t\n\t\tthis.groupList.forEach(function(group){\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\n\t\t});\n\t\t\n\t\treturn groupComponents;\n\t}\n\t\n\tgetChildGroups(group){\n\t\tvar groupComponents = [];\n\t\t\n\t\tif(!group){\n\t\t\tgroup = this;\n\t\t}\n\t\t\n\t\tgroup.groupList.forEach((child) => {\n\t\t\tif(child.groupList.length){\n\t\t\t\tgroupComponents = groupComponents.concat(this.getChildGroups(child));\n\t\t\t}else{\n\t\t\t\tgroupComponents.push(child);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn groupComponents;\n\t}\n\t\n\twipe(){\n\t\tif(this.table.options.groupBy){\n\t\t\tthis.groupList.forEach(function(group){\n\t\t\t\tgroup.wipe();\n\t\t\t});\n\t\t\t\n\t\t\tthis.groupList = [];\n\t\t\tthis.groups = {};\n\t\t}\n\t}\n\t\n\tpullGroupListData(groupList) {\n\t\tvar groupListData = [];\n\t\t\n\t\tgroupList.forEach((group) => {\n\t\t\tvar groupHeader = {};\n\t\t\tgroupHeader.level = 0;\n\t\t\tgroupHeader.rowCount = 0;\n\t\t\tgroupHeader.headerContent = \"\";\n\t\t\tvar childData = [];\n\t\t\t\n\t\t\tif (group.hasSubGroups) {\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\n\t\t\t\t\n\t\t\t\tgroupHeader.level = group.level;\n\t\t\t\tgroupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group);\n\t\t\t\t\n\t\t\t\tgroupListData.push(groupHeader);\n\t\t\t\tgroupListData = groupListData.concat(childData);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tgroupHeader.level = group.level;\n\t\t\t\tgroupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group);\n\t\t\t\tgroupHeader.rowCount = group.getRows().length;\n\t\t\t\t\n\t\t\t\tgroupListData.push(groupHeader);\n\t\t\t\t\n\t\t\t\tgroup.getRows().forEach((row) => {\n\t\t\t\t\tgroupListData.push(row.getData(\"data\"));\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn groupListData;\n\t}\n\t\n\tgetGroupedData(){\n\t\t\n\t\treturn this.pullGroupListData(this.groupList);\n\t}\n\t\n\tgetRowGroup(row){\n\t\tvar match = false;\n\t\t\n\t\tif(this.options(\"dataTree\")){\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\n\t\t}\n\t\t\n\t\tthis.groupList.forEach((group) => {\n\t\t\tvar result = group.getRowGroup(row);\n\t\t\t\n\t\t\tif(result){\n\t\t\t\tmatch = result;\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn match;\n\t}\n\t\n\tcountGroups(){\n\t\treturn this.groupList.length;\n\t}\n\t\n\tgenerateGroups(rows){\n\t\tvar oldGroups = this.groups;\n\t\t\n\t\tthis.groups = {};\n\t\tthis.groupList = [];\n\t\t\n\t\tif(this.allowedValues && this.allowedValues[0]){\n\t\t\tthis.allowedValues[0].forEach((value) => {\n\t\t\t\tthis.createGroup(value, 0, oldGroups);\n\t\t\t});\n\t\t\t\n\t\t\trows.forEach((row) => {\n\t\t\t\tthis.assignRowToExistingGroup(row, oldGroups);\n\t\t\t});\n\t\t}else{\n\t\t\trows.forEach((row) => {\n\t\t\t\tthis.assignRowToGroup(row, oldGroups);\n\t\t\t});\n\t\t}\n\t\t\n\t\tObject.values(oldGroups).forEach((group) => {\n\t\t\tgroup.wipe(true);\n\t\t});\t\n\t}\n\t\n\t\n\tcreateGroup(groupID, level, oldGroups){\n\t\tvar groupKey = level + \"_\" + groupID,\n\t\tgroup;\n\t\t\n\t\toldGroups = oldGroups || [];\n\t\t\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\n\t\t\n\t\tthis.groups[groupKey] = group;\n\t\tthis.groupList.push(group);\n\t}\n\t\n\tassignRowToExistingGroup(row, oldGroups){\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\n\t\tgroupKey = \"0_\" + groupID;\n\t\t\n\t\tif(this.groups[groupKey]){\n\t\t\tthis.groups[groupKey].addRow(row);\n\t\t}\n\t}\n\t\n\tassignRowToGroup(row, oldGroups){\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\n\t\tnewGroupNeeded = !this.groups[\"0_\" + groupID];\n\t\t\n\t\tif(newGroupNeeded){\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\n\t\t}\n\t\t\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\n\t\t\n\t\treturn !newGroupNeeded;\n\t}\n\t\n\treassignRowToGroup(row){\n\t\tif(row.type === \"row\"){\n\t\t\tvar oldRowGroup = row.modules.group,\n\t\t\toldGroupPath = oldRowGroup.getPath(),\n\t\t\tnewGroupPath = this.getExpectedPath(row),\n\t\t\tsamePath;\n\t\t\t\n\t\t\t// figure out if new group path is the same as old group path\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\n\t\t\t\treturn element === newGroupPath[index];\n\t\t\t});\n\t\t\t\n\t\t\t// refresh if they new path and old path aren't the same (aka the row's groupings have changed)\n\t\t\tif(!samePath) {\n\t\t\t\toldRowGroup.removeRow(row);\n\t\t\t\tthis.assignRowToGroup(row, this.groups);\n\t\t\t\tthis.refreshData(true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tgetExpectedPath(row) {\n\t\tvar groupPath = [], rowData = row.getData();\n\t\t\n\t\tthis.groupIDLookups.forEach((groupId) => {\n\t\t\tgroupPath.push(groupId.func(rowData));\n\t\t});\n\t\t\n\t\treturn groupPath;\n\t}\n\t\n\tupdateGroupRows(force){\n\t\tvar output = [];\n\n\t\tif(!this.blockRedraw){\n\t\t\tthis.groupList.forEach((group) => {\n\t\t\t\toutput = output.concat(group.getHeadersAndRows());\n\t\t\t});\n\t\t\t\n\t\t\tif(force){\n\t\t\t\tthis.refreshData(true);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn output;\n\t}\n\t\n\tscrollHeaders(left){\n\t\tif(this.table.options.groupBy){\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\n\t\t\t}\n\t\t\t\n\t\t\tleft = left + \"px\";\n\t\t\t\n\t\t\tthis.groupList.forEach((group) => {\n\t\t\t\tgroup.scrollHeader(left);\n\t\t\t});\n\t\t}\n\t}\n\t\n\tremoveGroup(group){\n\t\tvar groupKey = group.level + \"_\" + group.key,\n\t\tindex;\n\t\t\n\t\tif(this.groups[groupKey]){\n\t\t\tdelete this.groups[groupKey];\n\t\t\t\n\t\t\tindex = this.groupList.indexOf(group);\n\t\t\t\n\t\t\tif(index > -1){\n\t\t\t\tthis.groupList.splice(index, 1);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tcheckBasicModeGroupHeaderWidth(){\n\t\tvar element = this.table.rowManager.tableElement,\n\t\tonlyGroupHeaders = true;\n\t\t\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\n\t\t\tthis.table.rowManager.styleRow(row, index);\n\t\t\telement.appendChild(row.getElement());\n\t\t\trow.initialize(true);\n\t\t\t\n\t\t\tif(row.type !== \"group\"){\n\t\t\t\tonlyGroupHeaders = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(onlyGroupHeaders){\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\n\t\t}else{\n\t\t\telement.style.minWidth = \"\";\n\t\t}\n\t}\n\t\n}\n\nGroupRows.moduleName = \"groupRows\";\n\nexport default GroupRows;","import Module from '../../core/Module.js';\nimport Row from '../../core/row/Row.js';\nimport Cell from '../../core/cell/Cell.js';\n\nimport defaultUndoers from './defaults/undoers.js';\nimport defaultRedoers from './defaults/redoers.js';\n\nclass History extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.history = [];\n\t\tthis.index = -1;\n\n\t\tthis.registerTableOption(\"history\", false); //enable edit history\n\t}\n\n\tinitialize(){\n\t\tif(this.table.options.history){\n\t\t\tthis.subscribe(\"cell-value-updated\", this.cellUpdated.bind(this));\n\t\t\tthis.subscribe(\"cell-delete\", this.clearComponentHistory.bind(this));\n\t\t\tthis.subscribe(\"row-delete\", this.rowDeleted.bind(this));\n\t\t\tthis.subscribe(\"rows-wipe\", this.clear.bind(this));\n\t\t\tthis.subscribe(\"row-added\", this.rowAdded.bind(this));\n\t\t\tthis.subscribe(\"row-move\", this.rowMoved.bind(this));\n\t\t}\n\n\t\tthis.registerTableFunction(\"undo\", this.undo.bind(this));\n\t\tthis.registerTableFunction(\"redo\", this.redo.bind(this));\n\t\tthis.registerTableFunction(\"getHistoryUndoSize\", this.getHistoryUndoSize.bind(this));\n\t\tthis.registerTableFunction(\"getHistoryRedoSize\", this.getHistoryRedoSize.bind(this));\n\t\tthis.registerTableFunction(\"clearHistory\", this.clear.bind(this));\n\t}\n\n\trowMoved(from, to, after){\n\t\tthis.action(\"rowMove\", from, {posFrom:from.getPosition(), posTo:to.getPosition(), to:to, after:after});\n\t}\n\n\trowAdded(row, data, pos, index){\n\t\tthis.action(\"rowAdd\", row, {data:data, pos:pos, index:index});\n\t}\n\n\trowDeleted(row){\n\t\tvar index, rows;\n\n\t\tif(this.table.options.groupBy){\n\n\t\t\trows = row.getComponent().getGroup()._getSelf().rows;\n\t\t\tindex = rows.indexOf(row);\n\n\t\t\tif(index){\n\t\t\t\tindex = rows[index-1];\n\t\t\t}\n\t\t}else{\n\t\t\tindex = row.table.rowManager.getRowIndex(row);\n\n\t\t\tif(index){\n\t\t\t\tindex = row.table.rowManager.rows[index-1];\n\t\t\t}\n\t\t}\n\n\t\tthis.action(\"rowDelete\", row, {data:row.getData(), pos:!index, index:index});\n\t}\n\n\tcellUpdated(cell){\n\t\tthis.action(\"cellEdit\", cell, {oldValue:cell.oldValue, newValue:cell.value});\n\t}\n\n\tclear(){\n\t\tthis.history = [];\n\t\tthis.index = -1;\n\t}\n\n\taction(type, component, data){\n\t\tthis.history = this.history.slice(0, this.index + 1);\n\n\t\tthis.history.push({\n\t\t\ttype:type,\n\t\t\tcomponent:component,\n\t\t\tdata:data,\n\t\t});\n\n\t\tthis.index ++;\n\t}\n\n\tgetHistoryUndoSize(){\n\t\treturn this.index + 1;\n\t}\n\n\tgetHistoryRedoSize(){\n\t\treturn this.history.length - (this.index + 1);\n\t}\n\n\tclearComponentHistory(component){\n\t\tvar index = this.history.findIndex(function(item){\n\t\t\treturn item.component === component;\n\t\t});\n\n\t\tif(index > -1){\n\t\t\tthis.history.splice(index, 1);\n\t\t\tif(index <= this.index){\n\t\t\t\tthis.index--;\n\t\t\t}\n\n\t\t\tthis.clearComponentHistory(component);\n\t\t}\n\t}\n\n\tundo(){\n\t\tif(this.index > -1){\n\t\t\tlet action = this.history[this.index];\n\n\t\t\tHistory.undoers[action.type].call(this, action);\n\n\t\t\tthis.index--;\n\n\t\t\tthis.dispatchExternal(\"historyUndo\", action.type, action.component.getComponent(), action.data);\n\n\t\t\treturn true;\n\t\t}else{\n\t\t\tconsole.warn(\"History Undo Error - No more history to undo\");\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tredo(){\n\t\tif(this.history.length-1 > this.index){\n\n\t\t\tthis.index++;\n\n\t\t\tlet action = this.history[this.index];\n\n\t\t\tHistory.redoers[action.type].call(this, action);\n\n\t\t\tthis.dispatchExternal(\"historyRedo\", action.type, action.component.getComponent(), action.data);\n\n\t\t\treturn true;\n\t\t}else{\n\t\t\tconsole.warn(\"History Redo Error - No more history to redo\");\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t//rebind rows to new element after deletion\n\t_rebindRow(oldRow, newRow){\n\t\tthis.history.forEach(function(action){\n\t\t\tif(action.component instanceof Row){\n\t\t\t\tif(action.component === oldRow){\n\t\t\t\t\taction.component = newRow;\n\t\t\t\t}\n\t\t\t}else if(action.component instanceof Cell){\n\t\t\t\tif(action.component.row === oldRow){\n\t\t\t\t\tvar field = action.component.column.getField();\n\n\t\t\t\t\tif(field){\n\t\t\t\t\t\taction.component = newRow.getCell(field);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nHistory.moduleName = \"history\";\n\n//load defaults\nHistory.undoers = defaultUndoers;\nHistory.redoers = defaultRedoers;\n\nexport default History;","export default {\n\tcellEdit: function(action){\n\t\taction.component.setValueProcessData(action.data.oldValue);\n\t\taction.component.cellRendered();\n\t},\n\n\trowAdd: function(action){\n\t\taction.component.deleteActual();\n\t},\n\n\trowDelete: function(action){\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\n\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\n\t\t}\n\n\t\tthis._rebindRow(action.component, newRow);\n\t},\n\n\trowMove: function(action){\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after);\n\t\tthis.table.rowManager.redraw();\n\t},\n};","export default {\n\tcellEdit: function(action){\n\t\taction.component.setValueProcessData(action.data.newValue);\n\t\taction.component.cellRendered();\n\t},\n\n\trowAdd: function(action){\n\t\tvar newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index);\n\n\t\tif(this.table.options.groupBy && this.table.modExists(\"groupRows\")){\n\t\t\tthis.table.modules.groupRows.updateGroupRows(true);\n\t\t}\n\n\t\tthis._rebindRow(action.component, newRow);\n\t},\n\n\trowDelete:function(action){\n\t\taction.component.deleteActual();\n\t},\n\n\trowMove: function(action){\n\t\tthis.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after);\n\t\tthis.table.rowManager.redraw();\n\t},\n};","import Module from '../../core/Module.js';\n\nclass HtmlTableImport extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.fieldIndex = [];\n\t\tthis.hasIndex = false;\n\t}\n\n\tinitialize(){\n\t\tthis.tableElementCheck();\n\t}\n\n\ttableElementCheck(){\n\t\tif(this.table.originalElement && this.table.originalElement.tagName === \"TABLE\"){\n\t\t\tif(this.table.originalElement.childNodes.length){\n\t\t\t\tthis.parseTable();\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\n\t\t\t}\n\t\t}\n\t}\n\n\tparseTable(){\n\t\tvar element = this.table.originalElement,\n\t\toptions = this.table.options,\n\t\theaders = element.getElementsByTagName(\"th\"),\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\n\t\tdata = [];\n\n\t\tthis.hasIndex = false;\n\n\t\tthis.dispatchExternal(\"htmlImporting\");\n\n\t\trows = rows ? rows.getElementsByTagName(\"tr\") : [];\n\n\t\t//check for Tabulator inline options\n\t\tthis._extractOptions(element, options);\n\n\t\tif(headers.length){\n\t\t\tthis._extractHeaders(headers, rows);\n\t\t}else{\n\t\t\tthis._generateBlankHeaders(headers, rows);\n\t\t}\n\n\t\t//iterate through table rows and build data set\n\t\tfor(var index = 0; index < rows.length; index++){\n\t\t\tvar row = rows[index],\n\t\t\tcells = row.getElementsByTagName(\"td\"),\n\t\t\titem = {};\n\n\t\t\t//create index if the don't exist in table\n\t\t\tif(!this.hasIndex){\n\t\t\t\titem[options.index] = index;\n\t\t\t}\n\n\t\t\tfor(var i = 0; i < cells.length; i++){\n\t\t\t\tvar cell = cells[i];\n\t\t\t\tif(typeof this.fieldIndex[i] !== \"undefined\"){\n\t\t\t\t\titem[this.fieldIndex[i]] = cell.innerHTML;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//add row data to item\n\t\t\tdata.push(item);\n\t\t}\n\n\t\toptions.data = data;\n\n\t\tthis.dispatchExternal(\"htmlImported\");\n\t}\n\n\t//extract tabulator attribute options\n\t_extractOptions(element, options, defaultOptions){\n\t\tvar attributes = element.attributes;\n\t\tvar optionsArr = defaultOptions ? Object.keys(defaultOptions) : Object.keys(options);\n\t\tvar optionsList = {};\n\n\t\toptionsArr.forEach((item) => {\n\t\t\toptionsList[item.toLowerCase()] = item;\n\t\t});\n\n\t\tfor(var index in attributes){\n\t\t\tvar attrib = attributes[index];\n\t\t\tvar name;\n\n\t\t\tif(attrib && typeof attrib == \"object\" && attrib.name && attrib.name.indexOf(\"tabulator-\") === 0){\n\t\t\t\tname = attrib.name.replace(\"tabulator-\", \"\");\n\n\t\t\t\tif(typeof optionsList[name] !== \"undefined\"){\n\t\t\t\t\toptions[optionsList[name]] = this._attribValue(attrib.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//get value of attribute\n\t_attribValue(value){\n\t\tif(value === \"true\"){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(value === \"false\"){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t//find column if it has already been defined\n\t_findCol(title){\n\t\tvar match = this.table.options.columns.find((column) => {\n\t\t\treturn column.title === title;\n\t\t});\n\n\t\treturn match || false;\n\t}\n\n\t//extract column from headers\n\t_extractHeaders(headers, rows){\n\t\tfor(var index = 0; index < headers.length; index++){\n\t\t\tvar header = headers[index],\n\t\t\texists = false,\n\t\t\tcol = this._findCol(header.textContent),\n\t\t\twidth;\n\n\t\t\tif(col){\n\t\t\t\texists = true;\n\t\t\t}else{\n\t\t\t\tcol = {title:header.textContent.trim()};\n\t\t\t}\n\n\t\t\tif(!col.field) {\n\t\t\t\tcol.field = header.textContent.trim().toLowerCase().replace(\" \", \"_\");\n\t\t\t}\n\n\t\t\twidth = header.getAttribute(\"width\");\n\n\t\t\tif(width && !col.width)\t{\n\t\t\t\tcol.width = width;\n\t\t\t}\n\n\t\t\t//check for Tabulator inline options\n\t\t\tthis._extractOptions(header, col, this.table.columnManager.optionsList.registeredDefaults);\n\n\t\t\tthis.fieldIndex[index] = col.field;\n\n\t\t\tif(col.field == this.table.options.index){\n\t\t\t\tthis.hasIndex = true;\n\t\t\t}\n\n\t\t\tif(!exists){\n\t\t\t\tthis.table.options.columns.push(col);\n\t\t\t}\n\n\t\t}\n\t}\n\n\t//generate blank headers\n\t_generateBlankHeaders(headers, rows){\n\t\tfor(var index = 0; index < headers.length; index++){\n\t\t\tvar header = headers[index],\n\t\t\tcol = {title:\"\", field:\"col\" + index};\n\n\t\t\tthis.fieldIndex[index] = col.field;\n\n\t\t\tvar width = header.getAttribute(\"width\");\n\n\t\t\tif(width){\n\t\t\t\tcol.width = width;\n\t\t\t}\n\n\t\t\tthis.table.options.columns.push(col);\n\t\t}\n\t}\n}\n\nHtmlTableImport.moduleName = \"htmlTableImport\";\n\nexport default HtmlTableImport;","import csv from './importers/csv.js';\nimport json from './importers/json.js';\nimport array from './importers/array.js';\n\nexport default {\n\tcsv:csv,\n\tjson:json,\n\tarray:array,\n};","function csvImporter(input){\n\tvar data = [],\n\trow = 0, \n\tcol = 0,\n\tinQuote = false;\n \n\t//Iterate over each character\n\tfor (let index = 0; index < input.length; index++) {\n\t\tlet char = input[index], \n\t\tnextChar = input[index+1]; \n \n\t\t//Initialize empty row\n\t\tif(!data[row]){\n\t\t\tdata[row] = [];\n\t\t}\n\n\t\t//Initialize empty column\n\t\tif(!data[row][col]){\n\t\t\tdata[row][col] = \"\";\n\t\t}\n \n\t\t//Handle quotation mark inside string\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \n\t\t\tdata[row][col] += char; \n\t\t\tindex++;\n\t\t\tcontinue; \n\t\t}\n \n\t\t//Begin / End Quote\n\t\tif (char == '\"') { \n\t\t\tinQuote = !inQuote;\n\t\t\tcontinue;\n\t\t}\n \n\t\t//Next column (if not in quote)\n\t\tif (char == ',' && !inQuote) { \n\t\t\tcol++;\n\t\t\tcontinue; \n\t\t}\n \n\t\t//New row if new line and not in quote (CRLF) \n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \n\t\t\tcol = 0; \n\t\t\trow++; \n\t\t\tindex++; \n\t\t\tcontinue; \n\t\t}\n \n\t\t//New row if new line and not in quote (CR or LF) \n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \n\t\t\tcol = 0;\n\t\t\trow++;\n\t\t\tcontinue; \n\t\t}\n\n\t\t//Normal Character, append to column\n\t\tdata[row][col] += char;\n\t}\n\n\treturn data;\n}\n\nexport default csvImporter;","export default function(input){\n\ttry {\n\t\treturn JSON.parse(input);\n\t} catch(e) {\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\n\t\treturn Promise.reject();\n\t}\n}","function arrayImporter(input){\n\treturn input;\n}\n\nexport default arrayImporter;","import Module from '../../core/Module.js';\n\nimport defaultImporters from './defaults/importers.js';\n\nclass Import extends Module{\n \n\tconstructor(table){\n\t\tsuper(table);\n \n\t\tthis.registerTableOption(\"importFormat\");\n\t\tthis.registerTableOption(\"importReader\", \"text\");\n\t}\n \n\tinitialize(){\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\n\n\t\tif(this.table.options.importFormat){\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\n\t\t}\n\t}\n\n\tloadDataCheck(data){\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\n\t}\n\n\tloadData(data, params, config, silent, previousData){\n\t\treturn this.importData(this.lookupImporter(), data)\n\t\t\t.then(this.structureData.bind(this))\n\t\t\t.catch((err) => {\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\n\t\t\t\treturn Promise.reject(err);\n\t\t\t});\n\t}\n\n\tlookupImporter(importFormat){\n\t\tvar importer;\n \n\t\tif(!importFormat){\n\t\t\timportFormat = this.table.options.importFormat;\n\t\t}\n \n\t\tif(typeof importFormat === \"string\"){\n\t\t\timporter = Import.importers[importFormat];\n\t\t}else{\n\t\t\timporter = importFormat;\n\t\t}\n\n\t\tif(!importer){\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\n\t\t}\n \n\t\treturn importer;\n\t}\n \n\timportFromFile(importFormat, extension){\n\t\tvar importer = this.lookupImporter(importFormat);\n \n\t\tif(importer){\n\t\t\treturn this.pickFile(extension)\n\t\t\t\t.then(this.importData.bind(this, importer))\n\t\t\t\t.then(this.structureData.bind(this))\n\t\t\t\t.then(this.setData.bind(this))\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\n\t\t\t\t\treturn Promise.reject(err);\n\t\t\t\t});\n\t\t}\n\t}\n \n\tpickFile(extensions){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.type = \"file\";\n\t\t\tinput.accept = extensions;\n \n\t\t\tinput.addEventListener(\"change\", (e) => {\n\t\t\t\tvar file = input.files[0],\n\t\t\t\treader = new FileReader();\n \n\t\t\t\tswitch(this.table.options.importReader){\n\t\t\t\t\tcase \"buffer\":\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"binary\":\n\t\t\t\t\t\treader.readAsBinaryString(file);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"url\":\n\t\t\t\t\t\treader.readAsDataURL(file);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treader.readAsText(file);\n\t\t\t\t}\n \n\t\t\t\treader.onload = (e) => {\n\t\t\t\t\tresolve(reader.result);\n\t\t\t\t};\n \n\t\t\t\treader.onerror = (e) => {\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\n\t\t\t\t\treject();\n\t\t\t\t};\n\t\t\t});\n \n\t\t\tinput.click();\n\t\t});\n\t}\n \n\timportData(importer, fileContents){\n\t\tvar data = importer.call(this.table, fileContents);\n \n\t\tif(data instanceof Promise){\n\t\t\treturn data;\n\t\t}else{\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\n\t\t}\n\t}\n\n\tstructureData(parsedData){\n\t\tvar data = [];\n \n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\n\t\t\tif(this.table.options.autoColumns){\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\n\t\t\t}else{\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}else{\n\t\t\treturn parsedData;\n\t\t}\n\t}\n\n\tstructureArrayToObject(parsedData){\n\t\tvar columns = parsedData.shift();\n\n\t\tvar data = parsedData.map((values) => {\n\t\t\tvar row = {};\n\n\t\t\tcolumns.forEach((key, i) => {\n\t\t\t\trow[key] = values[i];\n\t\t\t});\n\n\t\t\treturn row;\n\t\t});\n\n\t\treturn data;\n\t}\n\n\tstructureArrayToColumns(parsedData){\n\t\tvar data = [],\n\t\tcolumns = this.table.getColumns();\n\n\t\t//remove first row if it is the column names\n\t\tif(columns[0] && parsedData[0][0]){\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\n\t\t\t\tparsedData.shift();\n\t\t\t}\n\t\t}\n \n\t\t//convert row arrays to objects\n\t\tparsedData.forEach((rowData) => {\n\t\t\tvar row = {};\n\n\t\t\trowData.forEach((value, index) => {\n\t\t\t\tvar column = columns[index];\n\n\t\t\t\tif(column){\n\t\t\t\t\trow[column.getField()] = value;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdata.push(row);\n\t\t});\n\n\t\treturn data;\n\t}\n \n\tsetData(data){\n\t\treturn this.table.setData(data);\n\t}\n}\n\nImport.moduleName = \"import\";\n\n//load defaults\nImport.importers = defaultImporters;\n\nexport default Import;","import Module from '../../core/Module.js';\n\nimport Cell from '../../core/cell/Cell.js';\nimport Column from '../../core/column/Column.js';\n\nclass Interaction extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.eventMap = {\n\t\t\t//row events\n\t\t\trowClick:\"row-click\",\n\t\t\trowDblClick:\"row-dblclick\",\n\t\t\trowContext:\"row-contextmenu\",\n\t\t\trowMouseEnter:\"row-mouseenter\",\n\t\t\trowMouseLeave:\"row-mouseleave\",\n\t\t\trowMouseOver:\"row-mouseover\",\n\t\t\trowMouseOut:\"row-mouseout\",\n\t\t\trowMouseMove:\"row-mousemove\",\n\t\t\trowMouseDown:\"row-mousedown\",\n\t\t\trowMouseUp:\"row-mouseup\",\n\t\t\trowTap:\"row\",\n\t\t\trowDblTap:\"row\",\n\t\t\trowTapHold:\"row\",\n\n\t\t\t//cell events\n\t\t\tcellClick:\"cell-click\",\n\t\t\tcellDblClick:\"cell-dblclick\",\n\t\t\tcellContext:\"cell-contextmenu\",\n\t\t\tcellMouseEnter:\"cell-mouseenter\",\n\t\t\tcellMouseLeave:\"cell-mouseleave\",\n\t\t\tcellMouseOver:\"cell-mouseover\",\n\t\t\tcellMouseOut:\"cell-mouseout\",\n\t\t\tcellMouseMove:\"cell-mousemove\",\n\t\t\tcellMouseDown:\"cell-mousedown\",\n\t\t\tcellMouseUp:\"cell-mouseup\",\n\t\t\tcellTap:\"cell\",\n\t\t\tcellDblTap:\"cell\",\n\t\t\tcellTapHold:\"cell\",\n\n\t\t\t//column header events\n\t\t\theaderClick:\"column-click\",\n\t\t\theaderDblClick:\"column-dblclick\",\n\t\t\theaderContext:\"column-contextmenu\",\n\t\t\theaderMouseEnter:\"column-mouseenter\",\n\t\t\theaderMouseLeave:\"column-mouseleave\",\n\t\t\theaderMouseOver:\"column-mouseover\",\n\t\t\theaderMouseOut:\"column-mouseout\",\n\t\t\theaderMouseMove:\"column-mousemove\",\n\t\t\theaderMouseDown:\"column-mousedown\",\n\t\t\theaderMouseUp:\"column-mouseup\",\n\t\t\theaderTap:\"column\",\n\t\t\theaderDblTap:\"column\",\n\t\t\theaderTapHold:\"column\",\n\n\t\t\t//group header\n\t\t\tgroupClick:\"group-click\",\n\t\t\tgroupDblClick:\"group-dblclick\",\n\t\t\tgroupContext:\"group-contextmenu\",\n\t\t\tgroupMouseEnter:\"group-mouseenter\",\n\t\t\tgroupMouseLeave:\"group-mouseleave\",\n\t\t\tgroupMouseOver:\"group-mouseover\",\n\t\t\tgroupMouseOut:\"group-mouseout\",\n\t\t\tgroupMouseMove:\"group-mousemove\",\n\t\t\tgroupMouseDown:\"group-mousedown\",\n\t\t\tgroupMouseUp:\"group-mouseup\",\n\t\t\tgroupTap:\"group\",\n\t\t\tgroupDblTap:\"group\",\n\t\t\tgroupTapHold:\"group\",\n\t\t};\n\n\t\tthis.subscribers = {};\n\n\t\tthis.touchSubscribers = {};\n\n\t\tthis.columnSubscribers = {};\n\n\t\tthis.touchWatchers = {\n\t\t\trow:{\n\t\t\t\ttap:null,\n\t\t\t\ttapDbl:null,\n\t\t\t\ttapHold:null,\n\t\t\t},\n\t\t\tcell:{\n\t\t\t\ttap:null,\n\t\t\t\ttapDbl:null,\n\t\t\t\ttapHold:null,\n\t\t\t},\n\t\t\tcolumn:{\n\t\t\t\ttap:null,\n\t\t\t\ttapDbl:null,\n\t\t\t\ttapHold:null,\n\t\t\t},\n\t\t\tgroup:{\n\t\t\t\ttap:null,\n\t\t\t\ttapDbl:null,\n\t\t\t\ttapHold:null,\n\t\t\t}\n\t\t};\n\n\t\tthis.registerColumnOption(\"headerClick\");\n\t\tthis.registerColumnOption(\"headerDblClick\");\n\t\tthis.registerColumnOption(\"headerContext\");\n\t\tthis.registerColumnOption(\"headerMouseEnter\");\n\t\tthis.registerColumnOption(\"headerMouseLeave\");\n\t\tthis.registerColumnOption(\"headerMouseOver\");\n\t\tthis.registerColumnOption(\"headerMouseOut\");\n\t\tthis.registerColumnOption(\"headerMouseMove\");\n\t\tthis.registerColumnOption(\"headerMouseDown\");\n\t\tthis.registerColumnOption(\"headerMouseUp\");\n\t\tthis.registerColumnOption(\"headerTap\");\n\t\tthis.registerColumnOption(\"headerDblTap\");\n\t\tthis.registerColumnOption(\"headerTapHold\");\n\n\t\tthis.registerColumnOption(\"cellClick\");\n\t\tthis.registerColumnOption(\"cellDblClick\");\n\t\tthis.registerColumnOption(\"cellContext\");\n\t\tthis.registerColumnOption(\"cellMouseEnter\");\n\t\tthis.registerColumnOption(\"cellMouseLeave\");\n\t\tthis.registerColumnOption(\"cellMouseOver\");\n\t\tthis.registerColumnOption(\"cellMouseOut\");\n\t\tthis.registerColumnOption(\"cellMouseMove\");\n\t\tthis.registerColumnOption(\"cellMouseDown\");\n\t\tthis.registerColumnOption(\"cellMouseUp\");\n\t\tthis.registerColumnOption(\"cellTap\");\n\t\tthis.registerColumnOption(\"cellDblTap\");\n\t\tthis.registerColumnOption(\"cellTapHold\");\n\n\t}\n\n\tinitialize(){\n\t\tthis.initializeExternalEvents();\n\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"cell-dblclick\", this.cellContentsSelectionFixer.bind(this));\n\t}\n\n\tcellContentsSelectionFixer(e, cell){\n\t\tvar range;\n\n\t\tif(this.table.modExists(\"edit\")){\n\t\t\tif (this.table.modules.edit.currentCell === cell){\n\t\t\t\treturn; //prevent instant selection of editor content\n\t\t\t}\n\t\t}\n\n\t\te.preventDefault();\n\n\t\ttry{\n\t\t\tif (document.selection) { // IE\n\t\t\t\trange = document.body.createTextRange();\n\t\t\t\trange.moveToElementText(cell.getElement());\n\t\t\t\trange.select();\n\t\t\t} else if (window.getSelection) {\n\t\t\t\trange = document.createRange();\n\t\t\t\trange.selectNode(cell.getElement());\n\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\twindow.getSelection().addRange(range);\n\t\t\t}\n\t\t}catch(e){}\n\t}\n\n\tinitializeExternalEvents(){\n\t\tfor(let key in this.eventMap){\n\t\t\tthis.subscriptionChangeExternal(key, this.subscriptionChanged.bind(this, key));\n\t\t}\n\t}\n\n\tsubscriptionChanged(key, added){\n\t\tif(added){\n\t\t\tif(!this.subscribers[key]){\n\t\t\t\tif(this.eventMap[key].includes(\"-\")){\n\t\t\t\t\tthis.subscribers[key] = this.handle.bind(this, key);\n\t\t\t\t\tthis.subscribe(this.eventMap[key], this.subscribers[key]);\n\t\t\t\t}else{\n\t\t\t\t\tthis.subscribeTouchEvents(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(this.eventMap[key].includes(\"-\")){\n\t\t\t\tif(this.subscribers[key] && !this.columnSubscribers[key] && !this.subscribedExternal(key)){\n\t\t\t\t\tthis.unsubscribe(this.eventMap[key], this.subscribers[key]);\n\t\t\t\t\tdelete this.subscribers[key];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.unsubscribeTouchEvents(key);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tsubscribeTouchEvents(key){\n\t\tvar type = this.eventMap[key];\n\n\t\tif(!this.touchSubscribers[type + \"-touchstart\"]){\n\t\t\tthis.touchSubscribers[type + \"-touchstart\"] = this.handleTouch.bind(this, type, \"start\");\n\t\t\tthis.touchSubscribers[type + \"-touchend\"] = this.handleTouch.bind(this, type, \"end\");\n\n\t\t\tthis.subscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\n\t\t\tthis.subscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\n\t\t}\n\n\t\tthis.subscribers[key] = true;\n\t}\n\n\tunsubscribeTouchEvents(key){\n\t\tvar noTouch = true,\n\t\ttype = this.eventMap[key];\n\n\t\tif(this.subscribers[key] && !this.subscribedExternal(key)){\n\t\t\tdelete this.subscribers[key];\n\n\t\t\tfor(let i in this.eventMap){\n\t\t\t\tif(this.eventMap[i] === type){\n\t\t\t\t\tif(this.subscribers[i]){\n\t\t\t\t\t\tnoTouch = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(noTouch){\n\t\t\t\tthis.unsubscribe(type + \"-touchstart\", this.touchSubscribers[type + \"-touchstart\"]);\n\t\t\t\tthis.unsubscribe(type + \"-touchend\", this.touchSubscribers[type + \"-touchend\"]);\n\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchstart\"];\n\t\t\t\tdelete this.touchSubscribers[type + \"-touchend\"];\n\t\t\t}\n\t\t}\n\t}\n\n\tinitializeColumn(column){\n\t\tvar def = column.definition;\n\n\t\tfor(let key in this.eventMap){\n\t\t\tif(def[key]){\n\t\t\t\tthis.subscriptionChanged(key, true);\n\n\t\t\t\tif(!this.columnSubscribers[key]){\n\t\t\t\t\tthis.columnSubscribers[key] = [];\n\t\t\t\t}\n\n\t\t\t\tthis.columnSubscribers[key].push(column);\n\t\t\t}\n\t\t}\n\t}\n\n\thandle(action, e, component){\n\t\tthis.dispatchEvent(action, e, component);\n\t}\n\n\thandleTouch(type, action, e, component){\n\t\tvar watchers = this.touchWatchers[type];\n\n\t\tif(type === \"column\"){\n\t\t\ttype = \"header\";\n\t\t}\n\n\t\tswitch(action){\n\t\t\tcase \"start\":\n\t\t\t\twatchers.tap = true;\n\n\t\t\t\tclearTimeout(watchers.tapHold);\n\n\t\t\t\twatchers.tapHold = setTimeout(() => {\n\t\t\t\t\tclearTimeout(watchers.tapHold);\n\t\t\t\t\twatchers.tapHold = null;\n\n\t\t\t\t\twatchers.tap = null;\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\n\t\t\t\t\twatchers.tapDbl = null;\n\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\n\t\t\t\t}, 1000);\n\t\t\t\tbreak;\n\n\t\t\tcase \"end\":\n\t\t\t\tif(watchers.tap){\n\n\t\t\t\t\twatchers.tap = null;\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\n\t\t\t\t}\n\n\t\t\t\tif(watchers.tapDbl){\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\n\t\t\t\t\twatchers.tapDbl = null;\n\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\n\t\t\t\t}else{\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\n\t\t\t\t\t\twatchers.tapDbl = null;\n\t\t\t\t\t}, 300);\n\t\t\t\t}\n\n\t\t\t\tclearTimeout(watchers.tapHold);\n\t\t\t\twatchers.tapHold = null;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tdispatchEvent(action, e, component){\n\t\tvar componentObj = component.getComponent(),\n\t\tcallback;\n\n\t\tif(this.columnSubscribers[action]){\n\n\t\t\tif(component instanceof Cell){\n\t\t\t\tcallback = component.column.definition[action];\n\t\t\t}else if(component instanceof Column){\n\t\t\t\tcallback = component.definition[action];\n\t\t\t}\n\n\t\t\tif(callback){\n\t\t\t\tcallback(e, componentObj);\n\t\t\t}\n\t\t}\n\n\t\tthis.dispatchExternal(action, e, componentObj);\n\t}\n}\n\nInteraction.moduleName = \"interaction\";\n\nexport default Interaction;\n","import Module from '../../core/Module.js';\n\nimport defaultBindings from './defaults/bindings.js';\nimport defaultActions from './defaults/actions.js';\n\nclass Keybindings extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.watchKeys = null;\n\t\tthis.pressedKeys = null;\n\t\tthis.keyupBinding = false;\n\t\tthis.keydownBinding = false;\n\n\t\tthis.registerTableOption(\"keybindings\", {}); //array for keybindings\n\t\tthis.registerTableOption(\"tabEndNewRow\", false); //create new row when tab to end of table\n\t}\n\n\tinitialize(){\n\t\tvar bindings = this.table.options.keybindings,\n\t\tmergedBindings = {};\n\n\t\tthis.watchKeys = {};\n\t\tthis.pressedKeys = [];\n\n\t\tif(bindings !== false){\n\t\t\tObject.assign(mergedBindings, Keybindings.bindings);\n\t\t\tObject.assign(mergedBindings, bindings);\n\n\t\t\tthis.mapBindings(mergedBindings);\n\t\t\tthis.bindEvents();\n\t\t}\n\n\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\n\t}\n\n\tmapBindings(bindings){\n\t\tfor(let key in bindings){\n\t\t\tif(Keybindings.actions[key]){\n\t\t\t\tif(bindings[key]){\n\t\t\t\t\tif(typeof bindings[key] !== \"object\"){\n\t\t\t\t\t\tbindings[key] = [bindings[key]];\n\t\t\t\t\t}\n\n\t\t\t\t\tbindings[key].forEach((binding) => {\n\t\t\t\t\t\tvar bindingList = Array.isArray(binding) ? binding : [binding];\n\t\t\t\t\t\t\n\t\t\t\t\t\tbindingList.forEach((item) => {\n\t\t\t\t\t\t\tthis.mapBinding(key, item);\n\t\t\t\t\t\t});\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Key Binding Error - no such action:\", key);\n\t\t\t}\n\t\t}\n\t}\n\n\tmapBinding(action, symbolsList){\n\t\tvar binding = {\n\t\t\taction: Keybindings.actions[action],\n\t\t\tkeys: [],\n\t\t\tctrl: false,\n\t\t\tshift: false,\n\t\t\tmeta: false,\n\t\t};\n\n\t\tvar symbols = symbolsList.toString().toLowerCase().split(\" \").join(\"\").split(\"+\");\n\n\t\tsymbols.forEach((symbol) => {\n\t\t\tswitch(symbol){\n\t\t\t\tcase \"ctrl\":\n\t\t\t\t\tbinding.ctrl = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"shift\":\n\t\t\t\t\tbinding.shift = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"meta\":\n\t\t\t\t\tbinding.meta = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\n\t\t\t\t\tbinding.keys.push(symbol);\n\n\t\t\t\t\tif(!this.watchKeys[symbol]){\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.watchKeys[symbol].push(binding);\n\t\t\t}\n\t\t});\n\t}\n\n\tbindEvents(){\n\t\tvar self = this;\n\n\t\tthis.keyupBinding = function(e){\n\t\t\tvar code = e.keyCode;\n\t\t\tvar bindings = self.watchKeys[code];\n\n\t\t\tif(bindings){\n\n\t\t\t\tself.pressedKeys.push(code);\n\n\t\t\t\tbindings.forEach(function(binding){\n\t\t\t\t\tself.checkBinding(e, binding);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.keydownBinding = function(e){\n\t\t\tvar code = e.keyCode;\n\t\t\tvar bindings = self.watchKeys[code];\n\n\t\t\tif(bindings){\n\n\t\t\t\tvar index = self.pressedKeys.indexOf(code);\n\n\t\t\t\tif(index > -1){\n\t\t\t\t\tself.pressedKeys.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.table.element.addEventListener(\"keydown\", this.keyupBinding);\n\n\t\tthis.table.element.addEventListener(\"keyup\", this.keydownBinding);\n\t}\n\n\tclearBindings(){\n\t\tif(this.keyupBinding){\n\t\t\tthis.table.element.removeEventListener(\"keydown\", this.keyupBinding);\n\t\t}\n\n\t\tif(this.keydownBinding){\n\t\t\tthis.table.element.removeEventListener(\"keyup\", this.keydownBinding);\n\t\t}\n\t}\n\n\tcheckBinding(e, binding){\n\t\tvar match = true;\n\n\t\tif(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta){\n\t\t\tbinding.keys.forEach((key) => {\n\t\t\t\tvar index = this.pressedKeys.indexOf(key);\n\n\t\t\t\tif(index == -1){\n\t\t\t\t\tmatch = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif(match){\n\t\t\t\tbinding.action.call(this, e);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n\nKeybindings.moduleName = \"keybindings\";\n\n//load defaults\nKeybindings.bindings = defaultBindings;\nKeybindings.actions = defaultActions;\n\nexport default Keybindings;","export default {\n\tnavPrev:\"shift + 9\",\n\tnavNext:9,\n\tnavUp:38,\n\tnavDown:40,\n\tscrollPageUp:33,\n\tscrollPageDown:34,\n\tscrollToStart:36,\n\tscrollToEnd:35,\n\tundo:[\"ctrl + 90\", \"meta + 90\"],\n\tredo:[\"ctrl + 89\", \"meta + 89\"],\n\tcopyToClipboard:[\"ctrl + 67\", \"meta + 89\"],\n};","export default {\n\tkeyBlock:function(e){\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t},\n\tscrollPageUp:function(e){\n\t\tvar rowManager = this.table.rowManager,\n\t\tnewPos = rowManager.scrollTop - rowManager.element.clientHeight;\n\n\t\te.preventDefault();\n\n\t\tif(rowManager.displayRowsCount){\n\t\t\tif(newPos >= 0){\n\t\t\t\trowManager.element.scrollTop = newPos;\n\t\t\t}else{\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\n\t\t\t}\n\t\t}\n\n\t\tthis.table.element.focus();\n\t},\n\tscrollPageDown:function(e){\n\t\tvar rowManager = this.table.rowManager,\n\t\tnewPos = rowManager.scrollTop + rowManager.element.clientHeight,\n\t\tscrollMax = rowManager.element.scrollHeight;\n\n\t\te.preventDefault();\n\n\t\tif(rowManager.displayRowsCount){\n\t\t\tif(newPos <= scrollMax){\n\t\t\t\trowManager.element.scrollTop = newPos;\n\t\t\t}else{\n\t\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\n\t\t\t}\n\t\t}\n\n\t\tthis.table.element.focus();\n\n\t},\n\tscrollToStart:function(e){\n\t\tvar rowManager = this.table.rowManager;\n\n\t\te.preventDefault();\n\n\t\tif(rowManager.displayRowsCount){\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[0]);\n\t\t}\n\n\t\tthis.table.element.focus();\n\t},\n\tscrollToEnd:function(e){\n\t\tvar rowManager = this.table.rowManager;\n\n\t\te.preventDefault();\n\n\t\tif(rowManager.displayRowsCount){\n\t\t\trowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]);\n\t\t}\n\n\t\tthis.table.element.focus();\n\t},\n\tnavPrev:function(e){\n\t\tthis.dispatch(\"keybinding-nav-prev\", e);\n\t},\n\n\tnavNext:function(e){\n\t\tthis.dispatch(\"keybinding-nav-next\", e);\n\t},\n\n\tnavLeft:function(e){\n\t\tthis.dispatch(\"keybinding-nav-left\", e);\n\t},\n\n\tnavRight:function(e){\n\t\tthis.dispatch(\"keybinding-nav-right\", e);\n\t},\n\n\tnavUp:function(e){\n\t\tthis.dispatch(\"keybinding-nav-up\", e);\n\t},\n\n\tnavDown:function(e){\n\t\tthis.dispatch(\"keybinding-nav-down\", e);\n\t},\n\n\tundo:function(e){\n\t\tvar cell = false;\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\n\n\t\t\tcell = this.table.modules.edit.currentCell;\n\n\t\t\tif(!cell){\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.table.modules.history.undo();\n\t\t\t}\n\t\t}\n\t},\n\n\tredo:function(e){\n\t\tvar cell = false;\n\t\tif(this.table.options.history && this.table.modExists(\"history\") && this.table.modExists(\"edit\")){\n\n\t\t\tcell = this.table.modules.edit.currentCell;\n\n\t\t\tif(!cell){\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.table.modules.history.redo();\n\t\t\t}\n\t\t}\n\t},\n\n\tcopyToClipboard:function(e){\n\t\tif(!this.table.modules.edit.currentCell){\n\t\t\tif(this.table.modExists(\"clipboard\", true)){\n\t\t\t\tthis.table.modules.clipboard.copy(false, true);\n\t\t\t}\n\t\t}\n\t},\n};","import Module from '../../core/Module.js';\n\nclass Menu extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.menuContainer = null;\n\t\tthis.nestedMenuBlock = false;\n\t\t\n\t\tthis.currentComponent = null;\n\t\tthis.rootPopup = null;\n\t\t\n\t\tthis.columnSubscribers = {};\n\t\t\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\n\t\t\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\n\t\t\n\t\tthis.registerColumnOption(\"headerContextMenu\");\n\t\tthis.registerColumnOption(\"headerClickMenu\");\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\n\t\tthis.registerColumnOption(\"headerMenu\");\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\n\t\tthis.registerColumnOption(\"contextMenu\");\n\t\tthis.registerColumnOption(\"clickMenu\");\n\t\tthis.registerColumnOption(\"dblClickMenu\");\n\t\t\n\t}\n\t\n\tinitialize(){\n\t\tthis.deprecatedOptionsCheck();\n\t\tthis.initializeRowWatchers();\n\t\tthis.initializeGroupWatchers();\n\t\t\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t}\n\t\n\tdeprecatedOptionsCheck(){\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\n\t\t}\n\t}\t\n\t\n\tinitializeRowWatchers(){\n\t\tif(this.table.options.rowContextMenu){\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\n\t\t\tthis.table.on(\"rowTapHold\", this.loadMenuEvent.bind(this, this.table.options.rowContextMenu));\n\t\t}\n\t\t\n\t\tif(this.table.options.rowClickMenu){\n\t\t\tthis.subscribe(\"row-click\", this.loadMenuEvent.bind(this, this.table.options.rowClickMenu));\n\t\t}\n\t\t\n\t\tif(this.table.options.rowDblClickMenu){\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\n\t\t}\n\t}\n\t\n\tinitializeGroupWatchers(){\n\t\tif(this.table.options.groupContextMenu){\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\n\t\t\tthis.table.on(\"groupTapHold\", this.loadMenuEvent.bind(this, this.table.options.groupContextMenu));\n\t\t}\n\t\t\n\t\tif(this.table.options.groupClickMenu){\n\t\t\tthis.subscribe(\"group-click\", this.loadMenuEvent.bind(this, this.table.options.groupClickMenu));\n\t\t}\n\t\t\n\t\tif(this.table.options.groupDblClickMenu){\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\n\t\t}\n\t}\n\t\n\tinitializeColumn(column){\n\t\tvar\tdef = column.definition;\n\t\t\n\t\t//handle column events\n\t\tif(def.headerContextMenu && !this.columnSubscribers.headerContextMenu){\n\t\t\tthis.columnSubscribers.headerContextMenu = this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\");\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextMenu);\n\t\t\tthis.table.on(\"headerTapHold\", this.loadMenuTableColumnEvent.bind(this, \"headerContextMenu\"));\n\t\t}\n\t\t\n\t\tif(def.headerClickMenu && !this.columnSubscribers.headerClickMenu){\n\t\t\tthis.columnSubscribers.headerClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerClickMenu\");\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickMenu);\n\t\t}\n\t\t\n\t\tif(def.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\n\t\t}\n\t\t\n\t\tif(def.headerMenu){\n\t\t\tthis.initializeColumnHeaderMenu(column);\n\t\t}\n\t\t\n\t\t//handle cell events\n\t\tif(def.contextMenu && !this.columnSubscribers.contextMenu){\n\t\t\tthis.columnSubscribers.contextMenu = this.loadMenuTableCellEvent.bind(this, \"contextMenu\");\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextMenu);\n\t\t\tthis.table.on(\"cellTapHold\", this.loadMenuTableCellEvent.bind(this, \"contextMenu\"));\n\t\t}\n\t\t\n\t\tif(def.clickMenu && !this.columnSubscribers.clickMenu){\n\t\t\tthis.columnSubscribers.clickMenu = this.loadMenuTableCellEvent.bind(this, \"clickMenu\");\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickMenu);\n\t\t}\n\t\t\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\n\t\t}\n\t}\n\t\n\tinitializeColumnHeaderMenu(column){\n\t\tvar icon = column.definition.headerMenuIcon,\n\t\theaderMenuEl;\n\t\t\n\t\theaderMenuEl = document.createElement(\"span\");\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\n\t\t\n\t\tif(icon){\n\t\t\tif(typeof icon === \"function\"){\n\t\t\t\ticon = icon(column.getComponent());\n\t\t\t}\n\t\t\t\n\t\t\tif(icon instanceof HTMLElement){\n\t\t\t\theaderMenuEl.appendChild(icon);\n\t\t\t}else{\n\t\t\t\theaderMenuEl.innerHTML = icon;\n\t\t\t}\n\t\t}else{\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\n\t\t}\n\t\t\n\t\theaderMenuEl.addEventListener(\"click\", (e) => {\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tthis.loadMenuEvent(column.definition.headerMenu, e, column);\n\t\t});\n\t\t\n\t\tcolumn.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);\n\t}\n\t\n\tloadMenuTableCellEvent(option, e, cell){\n\t\tif(cell._cell){\n\t\t\tcell = cell._cell;\n\t\t}\n\t\t\n\t\tif(cell.column.definition[option]){\n\t\t\tthis.loadMenuEvent(cell.column.definition[option], e, cell);\n\t\t}\n\t}\n\t\n\tloadMenuTableColumnEvent(option, e, column){\n\t\tif(column._column){\n\t\t\tcolumn = column._column;\n\t\t}\n\t\t\n\t\tif(column.definition[option]){\n\t\t\tthis.loadMenuEvent(column.definition[option], e, column);\n\t\t}\n\t}\n\t\n\tloadMenuEvent(menu, e, component){\n\t\tif(component._group){\n\t\t\tcomponent = component._group;\n\t\t}else if(component._row){\n\t\t\tcomponent = component._row;\n\t\t}\n\t\t\n\t\tmenu = typeof menu == \"function\" ? menu.call(this.table, e, component.getComponent()) : menu;\n\t\t\n\t\tthis.loadMenu(e, component, menu);\n\t}\n\t\n\tloadMenu(e, component, menu, parentEl, parentPopup){\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\n\t\tmenuEl = document.createElement(\"div\"),\n\t\tpopup;\n\t\t\n\t\tmenuEl.classList.add(\"tabulator-menu\");\n\t\t\n\t\tif(!touch){\n\t\t\te.preventDefault();\n\t\t}\n\t\t\n\t\t//abort if no menu set\n\t\tif(!menu || !menu.length){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!parentEl){\n\t\t\tif(this.nestedMenuBlock){\n\t\t\t\t//abort if child menu already open\n\t\t\t\tif(this.rootPopup){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.nestedMenuBlock = setTimeout(() => {\n\t\t\t\t\tthis.nestedMenuBlock = false;\n\t\t\t\t}, 100);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.rootPopup){\n\t\t\t\tthis.rootPopup.hide();\t\n\t\t\t}\n\t\t\t\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\n\t\t\t\n\t\t}else{\n\t\t\tpopup = parentPopup.child(menuEl);\n\t\t}\n\t\t\n\t\tmenu.forEach((item) => {\n\t\t\tvar itemEl = document.createElement(\"div\"),\n\t\t\tlabel = item.label,\n\t\t\tdisabled = item.disabled;\n\t\t\t\n\t\t\tif(item.separator){\n\t\t\t\titemEl.classList.add(\"tabulator-menu-separator\");\n\t\t\t}else{\n\t\t\t\titemEl.classList.add(\"tabulator-menu-item\");\n\t\t\t\t\n\t\t\t\tif(typeof label == \"function\"){\n\t\t\t\t\tlabel = label.call(this.table, component.getComponent());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(label instanceof Node){\n\t\t\t\t\titemEl.appendChild(label);\n\t\t\t\t}else{\n\t\t\t\t\titemEl.innerHTML = label;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(typeof disabled == \"function\"){\n\t\t\t\t\tdisabled = disabled.call(this.table, component.getComponent());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(disabled){\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-disabled\");\n\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\tif(item.menu && item.menu.length){\n\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\tthis.loadMenu(e, component, item.menu, itemEl, popup);\n\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(item.action){\n\t\t\t\t\t\t\titemEl.addEventListener(\"click\", (e) => {\n\t\t\t\t\t\t\t\titem.action(e, component.getComponent());\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(item.menu && item.menu.length){\n\t\t\t\t\titemEl.classList.add(\"tabulator-menu-item-submenu\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmenuEl.appendChild(itemEl);\n\t\t});\n\t\t\n\t\tmenuEl.addEventListener(\"click\", (e) => {\n\t\t\tif(this.rootPopup){\n\t\t\t\tthis.rootPopup.hide();\n\t\t\t}\n\t\t});\n\t\t\n\t\tpopup.show(parentEl || e);\n\t\t\n\t\tif(popup === this.rootPopup){\n\t\t\tthis.rootPopup.hideOnBlur(() => {\n\t\t\t\tthis.rootPopup = null;\n\t\t\t\t\n\t\t\t\tif(this.currentComponent){\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\n\t\t\t\t\tthis.currentComponent = null;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthis.currentComponent = component;\n\t\t\t\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\n\t\t}\n\t}\n}\n\nMenu.moduleName = \"menu\";\n\nexport default Menu;\n","import Module from '../../core/Module.js';\nimport Helpers from '../../core/tools/Helpers.js';\n\nclass MoveColumns extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.placeholderElement = this.createPlaceholderElement();\n\t\tthis.hoverElement = false; //floating column header element\n\t\tthis.checkTimeout = false; //click check timeout holder\n\t\tthis.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click\n\t\tthis.moving = false; //currently moving column\n\t\tthis.toCol = false; //destination column\n\t\tthis.toColAfter = false; //position of moving column relative to the destination column\n\t\tthis.startX = 0; //starting position within header element\n\t\tthis.autoScrollMargin = 40; //auto scroll on edge when within margin\n\t\tthis.autoScrollStep = 5; //auto scroll distance in pixels\n\t\tthis.autoScrollTimeout = false; //auto scroll timeout\n\t\tthis.touchMove = false;\n\t\t\n\t\tthis.moveHover = this.moveHover.bind(this);\n\t\tthis.endMove = this.endMove.bind(this);\n\t\t\n\t\tthis.registerTableOption(\"movableColumns\", false); //enable movable columns\n\t}\n\t\n\tcreatePlaceholderElement(){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-col\");\n\t\tel.classList.add(\"tabulator-col-placeholder\");\n\t\t\n\t\treturn el;\n\t}\n\t\n\tinitialize(){\n\t\tif(this.table.options.movableColumns){\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t\t}\n\t}\n\t\n\tinitializeColumn(column){\n\t\tvar self = this,\n\t\tconfig = {},\n\t\tcolEl;\n\t\t\n\t\tif(!column.modules.frozen && !column.isGroup){\n\t\t\tcolEl = column.getElement();\n\t\t\t\n\t\t\tconfig.mousemove = function(e){\n\t\t\t\tif(column.parent === self.moving.parent){\n\t\t\t\t\tif((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.contentsElement.scrollLeft) > (column.getWidth() / 2)){\n\t\t\t\t\t\tif(self.toCol !== column || !self.toColAfter){\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);\n\t\t\t\t\t\t\tself.moveColumn(column, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(self.toCol !== column || self.toColAfter){\n\t\t\t\t\t\t\tcolEl.parentNode.insertBefore(self.placeholderElement, colEl);\n\t\t\t\t\t\t\tself.moveColumn(column, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.bind(self);\n\t\t\t\n\t\t\tcolEl.addEventListener(\"mousedown\", function(e){\n\t\t\t\tself.touchMove = false;\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\n\t\t\t\t\t\tself.startMove(e, column);\n\t\t\t\t\t}, self.checkPeriod);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tcolEl.addEventListener(\"mouseup\", function(e){\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tif(self.checkTimeout){\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tself.bindTouchEvents(column);\n\t\t}\n\t\t\n\t\tcolumn.modules.moveColumn = config;\n\t}\n\t\n\tbindTouchEvents(column){\n\t\tvar colEl = column.getElement(),\n\t\tstartXMove = false, //shifting center position of the cell\n\t\tnextCol, prevCol, nextColWidth, prevColWidth, nextColWidthLast, prevColWidthLast;\n\t\t\n\t\tcolEl.addEventListener(\"touchstart\", (e) => {\n\t\t\tthis.checkTimeout = setTimeout(() => {\n\t\t\t\tthis.touchMove = true;\n\t\t\t\tnextCol = column.nextColumn();\n\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth()/2 : 0;\n\t\t\t\tprevCol = column.prevColumn();\n\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth()/2 : 0;\n\t\t\t\tnextColWidthLast = 0;\n\t\t\t\tprevColWidthLast = 0;\n\t\t\t\tstartXMove = false;\n\t\t\t\t\n\t\t\t\tthis.startMove(e, column);\n\t\t\t}, this.checkPeriod);\n\t\t}, {passive: true});\n\t\t\n\t\tcolEl.addEventListener(\"touchmove\", (e) => {\n\t\t\tvar diff, moveToCol;\n\t\t\t\n\t\t\tif(this.moving){\n\t\t\t\tthis.moveHover(e);\n\t\t\t\t\n\t\t\t\tif(!startXMove){\n\t\t\t\t\tstartXMove = e.touches[0].pageX;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdiff = e.touches[0].pageX - startXMove;\n\t\t\t\t\n\t\t\t\tif(diff > 0){\n\t\t\t\t\tif(nextCol && diff - nextColWidthLast > nextColWidth){\n\t\t\t\t\t\tmoveToCol = nextCol;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(moveToCol !== column){\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement().nextSibling);\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(prevCol && -diff - prevColWidthLast > prevColWidth){\n\t\t\t\t\t\tmoveToCol = prevCol;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(moveToCol !== column){\n\t\t\t\t\t\t\tstartXMove = e.touches[0].pageX;\n\t\t\t\t\t\t\tmoveToCol.getElement().parentNode.insertBefore(this.placeholderElement, moveToCol.getElement());\n\t\t\t\t\t\t\tthis.moveColumn(moveToCol, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(moveToCol){\n\t\t\t\t\tnextCol = moveToCol.nextColumn();\n\t\t\t\t\tnextColWidthLast = nextColWidth;\n\t\t\t\t\tnextColWidth = nextCol ? nextCol.getWidth() / 2 : 0;\n\t\t\t\t\tprevCol = moveToCol.prevColumn();\n\t\t\t\t\tprevColWidthLast = prevColWidth;\n\t\t\t\t\tprevColWidth = prevCol ? prevCol.getWidth() / 2 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}, {passive: true});\n\t\t\n\t\tcolEl.addEventListener(\"touchend\", (e) => {\n\t\t\tif(this.checkTimeout){\n\t\t\t\tclearTimeout(this.checkTimeout);\n\t\t\t}\n\t\t\tif(this.moving){\n\t\t\t\tthis.endMove(e);\n\t\t\t}\n\t\t});\n\t}\n\t\n\tstartMove(e, column){\n\t\tvar element = column.getElement(),\n\t\theaderElement = this.table.columnManager.getContentsElement(),\n\t\theadersElement = this.table.columnManager.getHeadersElement();\n\t\t\n\t\tthis.moving = column;\n\t\tthis.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(element).left;\n\t\t\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\n\t\t\n\t\t//create placeholder\n\t\tthis.placeholderElement.style.width = column.getWidth() + \"px\";\n\t\tthis.placeholderElement.style.height = column.getHeight() + \"px\";\n\t\t\n\t\telement.parentNode.insertBefore(this.placeholderElement, element);\n\t\telement.parentNode.removeChild(element);\n\t\t\n\t\t//create hover element\n\t\tthis.hoverElement = element.cloneNode(true);\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\n\t\t\n\t\theaderElement.appendChild(this.hoverElement);\n\t\t\n\t\tthis.hoverElement.style.left = \"0\";\n\t\tthis.hoverElement.style.bottom = (headerElement.clientHeight - headersElement.offsetHeight) + \"px\";\n\t\t\n\t\tif(!this.touchMove){\n\t\t\tthis._bindMouseMove();\n\t\t\t\n\t\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\n\t\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\n\t\t}\n\t\t\n\t\tthis.moveHover(e);\n\t}\n\t\n\t_bindMouseMove(){\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\n\t\t\tif(column.modules.moveColumn.mousemove){\n\t\t\t\tcolumn.getElement().addEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\n\t\t\t}\n\t\t});\n\t}\n\t\n\t_unbindMouseMove(){\n\t\tthis.table.columnManager.columnsByIndex.forEach(function(column){\n\t\t\tif(column.modules.moveColumn.mousemove){\n\t\t\t\tcolumn.getElement().removeEventListener(\"mousemove\", column.modules.moveColumn.mousemove);\n\t\t\t}\n\t\t});\n\t}\n\t\n\tmoveColumn(column, after){\n\t\tvar movingCells = this.moving.getCells();\n\t\t\n\t\tthis.toCol = column;\n\t\tthis.toColAfter = after;\n\t\t\n\t\tif(after){\n\t\t\tcolumn.getCells().forEach(function(cell, i){\n\t\t\t\tvar cellEl = cell.getElement(true);\n\t\t\t\t\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tcolumn.getCells().forEach(function(cell, i){\n\t\t\t\tvar cellEl = cell.getElement(true);\n\t\t\t\t\n\t\t\t\tif(cellEl.parentNode && movingCells[i]){\n\t\t\t\t\tcellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t\n\tendMove(e){\n\t\tif(e.which === 1 || this.touchMove){\n\t\t\tthis._unbindMouseMove();\n\t\t\t\n\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\n\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\n\t\t\t\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\n\t\t\t\n\t\t\tif(this.toCol){\n\t\t\t\tthis.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter);\n\t\t\t}\n\t\t\t\n\t\t\tthis.moving = false;\n\t\t\tthis.toCol = false;\n\t\t\tthis.toColAfter = false;\n\t\t\t\n\t\t\tif(!this.touchMove){\n\t\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\n\t\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tmoveHover(e){\n\t\tvar columnHolder = this.table.columnManager.getContentsElement(),\n\t\tscrollLeft = columnHolder.scrollLeft,\n\t\txPos = ((this.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(columnHolder).left) + scrollLeft,\n\t\tscrollPos;\n\t\t\n\t\tthis.hoverElement.style.left = (xPos - this.startX) + \"px\";\n\t\t\n\t\tif(xPos - scrollLeft < this.autoScrollMargin){\n\t\t\tif(!this.autoScrollTimeout){\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\n\t\t\t\t\tscrollPos = Math.max(0,scrollLeft-5);\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\n\t\t\t\t\tthis.autoScrollTimeout = false;\n\t\t\t\t}, 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(scrollLeft + columnHolder.clientWidth - xPos < this.autoScrollMargin){\n\t\t\tif(!this.autoScrollTimeout){\n\t\t\t\tthis.autoScrollTimeout = setTimeout(() => {\n\t\t\t\t\tscrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5);\n\t\t\t\t\tthis.table.rowManager.getElement().scrollLeft = scrollPos;\n\t\t\t\t\tthis.autoScrollTimeout = false;\n\t\t\t\t}, 1);\n\t\t\t}\n\t\t}\n\t}\n}\n\nMoveColumns.moduleName = \"moveColumn\";\n\nexport default MoveColumns;\n","import Module from '../../core/Module.js';\nimport Helpers from '../../core/tools/Helpers.js';\n\nclass MoveRows extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.placeholderElement = this.createPlaceholderElement();\n\t\tthis.hoverElement = false; //floating row header element\n\t\tthis.checkTimeout = false; //click check timeout holder\n\t\tthis.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click\n\t\tthis.moving = false; //currently moving row\n\t\tthis.toRow = false; //destination row\n\t\tthis.toRowAfter = false; //position of moving row relative to the destination row\n\t\tthis.hasHandle = false; //row has handle instead of fully movable row\n\t\tthis.startY = 0; //starting Y position within header element\n\t\tthis.startX = 0; //starting X position within header element\n\n\t\tthis.moveHover = this.moveHover.bind(this);\n\t\tthis.endMove = this.endMove.bind(this);\n\t\tthis.tableRowDropEvent = false;\n\n\t\tthis.touchMove = false;\n\n\t\tthis.connection = false;\n\t\tthis.connectionSelectorsTables = false;\n\t\tthis.connectionSelectorsElements = false;\n\t\tthis.connectionElements = [];\n\t\tthis.connections = [];\n\n\t\tthis.connectedTable = false;\n\t\tthis.connectedRow = false;\n\n\t\tthis.registerTableOption(\"movableRows\", false); //enable movable rows\n\t\tthis.registerTableOption(\"movableRowsConnectedTables\", false); //tables for movable rows to be connected to\n\t\tthis.registerTableOption(\"movableRowsConnectedElements\", false); //other elements for movable rows to be connected to\n\t\tthis.registerTableOption(\"movableRowsSender\", false);\n\t\tthis.registerTableOption(\"movableRowsReceiver\", \"insert\");\n\n\t\tthis.registerColumnOption(\"rowHandle\");\n\t}\n\n\tcreatePlaceholderElement(){\n\t\tvar el = document.createElement(\"div\");\n\n\t\tel.classList.add(\"tabulator-row\");\n\t\tel.classList.add(\"tabulator-row-placeholder\");\n\n\t\treturn el;\n\t}\n\n\tinitialize(){\n\t\tif(this.table.options.movableRows){\n\t\t\tthis.connectionSelectorsTables = this.table.options.movableRowsConnectedTables;\n\t\t\tthis.connectionSelectorsElements = this.table.options.movableRowsConnectedElements;\n\n\t\t\tthis.connection = this.connectionSelectorsTables || this.connectionSelectorsElements;\n\n\t\t\tthis.subscribe(\"cell-init\", this.initializeCell.bind(this));\n\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\n\t\t}\n\t}\n\n\tinitializeGroupHeader(group){\n\t\tvar self = this,\n\t\tconfig = {};\n\n\t\t//inter table drag drop\n\t\tconfig.mouseup = function(e){\n\t\t\tself.tableRowDrop(e, group);\n\t\t}.bind(self);\n\n\t\t//same table drag drop\n\t\tconfig.mousemove = function(e){\n\t\t\tvar rowEl;\n\n\t\t\tif(((e.pageY - Helpers.elOffset(group.element).top) + self.table.rowManager.element.scrollTop) > (group.getHeight() / 2)){\n\t\t\t\tif(self.toRow !== group || !self.toRowAfter){\n\t\t\t\t\trowEl = group.getElement();\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\n\t\t\t\t\tself.moveRow(group, true);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(self.toRow !== group || self.toRowAfter){\n\t\t\t\t\trowEl = group.getElement();\n\t\t\t\t\tif(rowEl.previousSibling){\n\t\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\n\t\t\t\t\t\tself.moveRow(group, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}.bind(self);\n\n\t\tgroup.modules.moveRow = config;\n\t}\n\n\tinitializeRow(row){\n\t\tvar self = this,\n\t\tconfig = {},\n\t\trowEl;\n\n\t\t//inter table drag drop\n\t\tconfig.mouseup = function(e){\n\t\t\tself.tableRowDrop(e, row);\n\t\t}.bind(self);\n\n\t\t//same table drag drop\n\t\tconfig.mousemove = function(e){\n\t\t\tvar rowEl = row.getElement();\n\n\t\t\tif(((e.pageY - Helpers.elOffset(rowEl).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){\n\t\t\t\tif(self.toRow !== row || !self.toRowAfter){\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);\n\t\t\t\t\tself.moveRow(row, true);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(self.toRow !== row || self.toRowAfter){\n\t\t\t\t\trowEl.parentNode.insertBefore(self.placeholderElement, rowEl);\n\t\t\t\t\tself.moveRow(row, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}.bind(self);\n\n\n\t\tif(!this.hasHandle){\n\n\t\t\trowEl = row.getElement();\n\n\t\t\trowEl.addEventListener(\"mousedown\", function(e){\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\n\t\t\t\t\t\tself.startMove(e, row);\n\t\t\t\t\t}, self.checkPeriod);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\trowEl.addEventListener(\"mouseup\", function(e){\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tif(self.checkTimeout){\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.bindTouchEvents(row, row.getElement());\n\t\t}\n\n\t\trow.modules.moveRow = config;\n\t}\n\n\tinitializeColumn(column){\n\t\tif(column.definition.rowHandle && this.table.options.movableRows !== false){\n\t\t\tthis.hasHandle = true;\n\t\t}\n\t}\n\n\tinitializeCell(cell){\n\t\tif(cell.column.definition.rowHandle && this.table.options.movableRows !== false){\n\t\t\tvar self = this,\n\t\t\tcellEl = cell.getElement(true);\n\n\t\t\tcellEl.addEventListener(\"mousedown\", function(e){\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tself.checkTimeout = setTimeout(function(){\n\t\t\t\t\t\tself.startMove(e, cell.row);\n\t\t\t\t\t}, self.checkPeriod);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tcellEl.addEventListener(\"mouseup\", function(e){\n\t\t\t\tif(e.which === 1){\n\t\t\t\t\tif(self.checkTimeout){\n\t\t\t\t\t\tclearTimeout(self.checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.bindTouchEvents(cell.row, cellEl);\n\t\t}\n\t}\n\n\tbindTouchEvents(row, element){\n\t\tvar startYMove = false, //shifting center position of the cell\n\t\tnextRow, prevRow, nextRowHeight, prevRowHeight, nextRowHeightLast, prevRowHeightLast;\n\n\t\telement.addEventListener(\"touchstart\", (e) => {\n\t\t\tthis.checkTimeout = setTimeout(() => {\n\t\t\t\tthis.touchMove = true;\n\t\t\t\tnextRow = row.nextRow();\n\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight()/2 : 0;\n\t\t\t\tprevRow = row.prevRow();\n\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight()/2 : 0;\n\t\t\t\tnextRowHeightLast = 0;\n\t\t\t\tprevRowHeightLast = 0;\n\t\t\t\tstartYMove = false;\n\n\t\t\t\tthis.startMove(e, row);\n\t\t\t}, this.checkPeriod);\n\t\t}, {passive: true});\n\t\tthis.moving, this.toRow, this.toRowAfter;\n\t\telement.addEventListener(\"touchmove\", (e) => {\n\n\t\t\tvar diff, moveToRow;\n\n\t\t\tif(this.moving){\n\t\t\t\te.preventDefault();\n\n\t\t\t\tthis.moveHover(e);\n\n\t\t\t\tif(!startYMove){\n\t\t\t\t\tstartYMove = e.touches[0].pageY;\n\t\t\t\t}\n\n\t\t\t\tdiff = e.touches[0].pageY - startYMove;\n\n\t\t\t\tif(diff > 0){\n\t\t\t\t\tif(nextRow && diff - nextRowHeightLast > nextRowHeight){\n\t\t\t\t\t\tmoveToRow = nextRow;\n\n\t\t\t\t\t\tif(moveToRow !== row){\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement().nextSibling);\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(prevRow && -diff - prevRowHeightLast > prevRowHeight){\n\t\t\t\t\t\tmoveToRow = prevRow;\n\n\t\t\t\t\t\tif(moveToRow !== row){\n\t\t\t\t\t\t\tstartYMove = e.touches[0].pageY;\n\t\t\t\t\t\t\tmoveToRow.getElement().parentNode.insertBefore(this.placeholderElement, moveToRow.getElement());\n\t\t\t\t\t\t\tthis.moveRow(moveToRow, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(moveToRow){\n\t\t\t\t\tnextRow = moveToRow.nextRow();\n\t\t\t\t\tnextRowHeightLast = nextRowHeight;\n\t\t\t\t\tnextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0;\n\t\t\t\t\tprevRow = moveToRow.prevRow();\n\t\t\t\t\tprevRowHeightLast = prevRowHeight;\n\t\t\t\t\tprevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\telement.addEventListener(\"touchend\", (e) => {\n\t\t\tif(this.checkTimeout){\n\t\t\t\tclearTimeout(this.checkTimeout);\n\t\t\t}\n\t\t\tif(this.moving){\n\t\t\t\tthis.endMove(e);\n\t\t\t\tthis.touchMove = false;\n\t\t\t}\n\t\t});\n\t}\n\n\t_bindMouseMove(){\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\n\t\t\t\trow.getElement().addEventListener(\"mousemove\", row.modules.moveRow.mousemove);\n\t\t\t}\n\t\t});\n\t}\n\n\t_unbindMouseMove(){\n\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\n\t\t\tif((row.type === \"row\" || row.type === \"group\") && row.modules.moveRow && row.modules.moveRow.mousemove){\n\t\t\t\trow.getElement().removeEventListener(\"mousemove\", row.modules.moveRow.mousemove);\n\t\t\t}\n\t\t});\n\t}\n\n\tstartMove(e, row){\n\t\tvar element = row.getElement();\n\n\t\tthis.setStartPosition(e, row);\n\n\t\tthis.moving = row;\n\n\t\tthis.table.element.classList.add(\"tabulator-block-select\");\n\n\t\t//create placeholder\n\t\tthis.placeholderElement.style.width = row.getWidth() + \"px\";\n\t\tthis.placeholderElement.style.height = row.getHeight() + \"px\";\n\n\t\tif(!this.connection){\n\t\t\telement.parentNode.insertBefore(this.placeholderElement, element);\n\t\t\telement.parentNode.removeChild(element);\n\t\t}else{\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-sending\");\n\t\t\tthis.connectToTables(row);\n\t\t}\n\n\t\t//create hover element\n\t\tthis.hoverElement = element.cloneNode(true);\n\t\tthis.hoverElement.classList.add(\"tabulator-moving\");\n\n\t\tif(this.connection){\n\t\t\tdocument.body.appendChild(this.hoverElement);\n\t\t\tthis.hoverElement.style.left = \"0\";\n\t\t\tthis.hoverElement.style.top = \"0\";\n\t\t\tthis.hoverElement.style.width = this.table.element.clientWidth + \"px\";\n\t\t\tthis.hoverElement.style.whiteSpace = \"nowrap\";\n\t\t\tthis.hoverElement.style.overflow = \"hidden\";\n\t\t\tthis.hoverElement.style.pointerEvents = \"none\";\n\t\t}else{\n\t\t\tthis.table.rowManager.getTableElement().appendChild(this.hoverElement);\n\n\t\t\tthis.hoverElement.style.left = \"0\";\n\t\t\tthis.hoverElement.style.top = \"0\";\n\n\t\t\tthis._bindMouseMove();\n\t\t}\n\n\t\tdocument.body.addEventListener(\"mousemove\", this.moveHover);\n\t\tdocument.body.addEventListener(\"mouseup\", this.endMove);\n\n\t\tthis.dispatchExternal(\"rowMoving\", row.getComponent());\n\n\t\tthis.moveHover(e);\n\t}\n\n\tsetStartPosition(e, row){\n\t\tvar pageX = this.touchMove ? e.touches[0].pageX : e.pageX,\n\t\tpageY = this.touchMove ? e.touches[0].pageY : e.pageY,\n\t\telement, position;\n\n\t\telement = row.getElement();\n\t\tif(this.connection){\n\t\t\tposition = element.getBoundingClientRect();\n\n\t\t\tthis.startX = position.left - pageX + window.pageXOffset;\n\t\t\tthis.startY = position.top - pageY + window.pageYOffset;\n\t\t}else{\n\t\t\tthis.startY = (pageY - element.getBoundingClientRect().top);\n\t\t}\n\t}\n\n\tendMove(e){\n\t\tif(!e || e.which === 1 || this.touchMove){\n\t\t\tthis._unbindMouseMove();\n\n\t\t\tif(!this.connection){\n\t\t\t\tthis.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling);\n\t\t\t\tthis.placeholderElement.parentNode.removeChild(this.placeholderElement);\n\t\t\t}\n\n\t\t\tthis.hoverElement.parentNode.removeChild(this.hoverElement);\n\n\t\t\tthis.table.element.classList.remove(\"tabulator-block-select\");\n\n\t\t\tif(this.toRow){\n\t\t\t\tthis.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter);\n\t\t\t}else{\n\t\t\t\tthis.dispatchExternal(\"rowMoveCancelled\", this.moving.getComponent());\n\t\t\t}\n\n\t\t\tthis.moving = false;\n\t\t\tthis.toRow = false;\n\t\t\tthis.toRowAfter = false;\n\n\t\t\tdocument.body.removeEventListener(\"mousemove\", this.moveHover);\n\t\t\tdocument.body.removeEventListener(\"mouseup\", this.endMove);\n\n\t\t\tif(this.connection){\n\t\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-sending\");\n\t\t\t\tthis.disconnectFromTables();\n\t\t\t}\n\t\t}\n\t}\n\n\tmoveRow(row, after){\n\t\tthis.toRow = row;\n\t\tthis.toRowAfter = after;\n\t}\n\n\tmoveHover(e){\n\t\tif(this.connection){\n\t\t\tthis.moveHoverConnections.call(this, e);\n\t\t}else{\n\t\t\tthis.moveHoverTable.call(this, e);\n\t\t}\n\t}\n\n\tmoveHoverTable(e){\n\t\tvar rowHolder = this.table.rowManager.getElement(),\n\t\tscrollTop = rowHolder.scrollTop,\n\t\tyPos = ((this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top) + scrollTop;\n\t\t\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"px\";\n\t}\n\n\tmoveHoverConnections(e){\n\t\tthis.hoverElement.style.left = (this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX)) + \"px\";\n\t\tthis.hoverElement.style.top = (this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY)) + \"px\";\n\t}\n\n\telementRowDrop(e, element, row){\n\t\tthis.dispatchExternal(\"movableRowsElementDrop\", e, element, row ? row.getComponent() : false);\n\t}\n\n\t//establish connection with other tables\n\tconnectToTables(row){\n\t\tvar connectionTables;\n\n\t\tif(this.connectionSelectorsTables){\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\n\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStart\", connectionTables);\n\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"connect\", {\n\t\t\t\trow:row,\n\t\t\t});\n\t\t}\n\n\t\tif(this.connectionSelectorsElements){\n\n\t\t\tthis.connectionElements = [];\n\n\t\t\tif(!Array.isArray(this.connectionSelectorsElements)){\n\t\t\t\tthis.connectionSelectorsElements = [this.connectionSelectorsElements];\n\t\t\t}\n\n\t\t\tthis.connectionSelectorsElements.forEach((query) => {\n\t\t\t\tif(typeof query === \"string\"){\n\t\t\t\t\tthis.connectionElements = this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));\n\t\t\t\t}else{\n\t\t\t\t\tthis.connectionElements.push(query);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.connectionElements.forEach((element) => {\n\t\t\t\tvar dropEvent = (e) => {\n\t\t\t\t\tthis.elementRowDrop(e, element, this.moving);\n\t\t\t\t};\n\n\t\t\t\telement.addEventListener(\"mouseup\", dropEvent);\n\t\t\t\telement.tabulatorElementDropEvent = dropEvent;\n\n\t\t\t\telement.classList.add(\"tabulator-movingrow-receiving\");\n\t\t\t});\n\t\t}\n\t}\n\n\t//disconnect from other tables\n\tdisconnectFromTables(){\n\t\tvar connectionTables;\n\n\t\tif(this.connectionSelectorsTables){\n\t\t\tconnectionTables = this.commsConnections(this.connectionSelectorsTables);\n\n\t\t\tthis.dispatchExternal(\"movableRowsSendingStop\", connectionTables);\n\n\t\t\tthis.commsSend(this.connectionSelectorsTables, \"moveRow\", \"disconnect\");\n\t\t}\n\n\t\tthis.connectionElements.forEach((element) => {\n\t\t\telement.classList.remove(\"tabulator-movingrow-receiving\");\n\t\t\telement.removeEventListener(\"mouseup\", element.tabulatorElementDropEvent);\n\t\t\tdelete element.tabulatorElementDropEvent;\n\t\t});\n\t}\n\n\t//accept incomming connection\n\tconnect(table, row){\n\t\tif(!this.connectedTable){\n\t\t\tthis.connectedTable = table;\n\t\t\tthis.connectedRow = row;\n\n\t\t\tthis.table.element.classList.add(\"tabulator-movingrow-receiving\");\n\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) => {\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\n\t\t\t\t\trow.getElement().addEventListener(\"mouseup\", row.modules.moveRow.mouseup);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.tableRowDropEvent = this.tableRowDrop.bind(this);\n\n\t\t\tthis.table.element.addEventListener(\"mouseup\", this.tableRowDropEvent);\n\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStart\", row, table);\n\n\t\t\treturn true;\n\t\t}else{\n\t\t\tconsole.warn(\"Move Row Error - Table cannot accept connection, already connected to table:\", this.connectedTable);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t//close incoming connection\n\tdisconnect(table){\n\t\tif(table === this.connectedTable){\n\t\t\tthis.connectedTable = false;\n\t\t\tthis.connectedRow = false;\n\n\t\t\tthis.table.element.classList.remove(\"tabulator-movingrow-receiving\");\n\n\t\t\tthis.table.rowManager.getDisplayRows().forEach((row) =>{\n\t\t\t\tif(row.type === \"row\" && row.modules.moveRow && row.modules.moveRow.mouseup){\n\t\t\t\t\trow.getElement().removeEventListener(\"mouseup\", row.modules.moveRow.mouseup);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.table.element.removeEventListener(\"mouseup\", this.tableRowDropEvent);\n\n\t\t\tthis.dispatchExternal(\"movableRowsReceivingStop\", table);\n\t\t}else{\n\t\t\tconsole.warn(\"Move Row Error - trying to disconnect from non connected table\");\n\t\t}\n\t}\n\n\tdropComplete(table, row, success){\n\t\tvar sender = false;\n\n\t\tif(success){\n\n\t\t\tswitch(typeof this.table.options.movableRowsSender){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tsender = this.senders[this.table.options.movableRowsSender];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"function\":\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(sender){\n\t\t\t\tsender.call(this, this.moving ? this.moving.getComponent() : undefined, row ? row.getComponent() : undefined, table);\n\t\t\t}else{\n\t\t\t\tif(this.table.options.movableRowsSender){\n\t\t\t\t\tconsole.warn(\"Mover Row Error - no matching sender found:\", this.table.options.movableRowsSender);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.dispatchExternal(\"movableRowsSent\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\n\t\t}else{\n\t\t\tthis.dispatchExternal(\"movableRowsSentFailed\", this.moving.getComponent(), row ? row.getComponent() : undefined, table);\n\t\t}\n\n\t\tthis.endMove();\n\t}\n\n\ttableRowDrop(e, row){\n\t\tvar receiver = false,\n\t\tsuccess = false;\n\n\t\te.stopImmediatePropagation();\n\n\t\tswitch(typeof this.table.options.movableRowsReceiver){\n\t\t\tcase \"string\":\n\t\t\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(receiver){\n\t\t\tsuccess = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\n\t\t}else{\n\t\t\tconsole.warn(\"Mover Row Error - no matching receiver found:\", this.table.options.movableRowsReceiver);\n\t\t}\n\n\t\tif(success){\n\t\t\tthis.dispatchExternal(\"movableRowsReceived\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\n\t\t}else{\n\t\t\tthis.dispatchExternal(\"movableRowsReceivedFailed\", this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable);\n\t\t}\n\n\t\tthis.commsSend(this.connectedTable, \"moveRow\", \"dropcomplete\", {\n\t\t\trow:row,\n\t\t\tsuccess:success,\n\t\t});\n\t}\n\n\tcommsReceived(table, action, data){\n\t\tswitch(action){\n\t\t\tcase \"connect\":\n\t\t\t\treturn this.connect(table, data.row);\n\n\t\t\tcase \"disconnect\":\n\t\t\t\treturn this.disconnect(table);\n\n\t\t\tcase \"dropcomplete\":\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\n\t\t}\n\t}\n}\n\nMoveRows.prototype.receivers = {\n\tinsert:function(fromRow, toRow, fromTable){\n\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\n\t\treturn true;\n\t},\n\n\tadd:function(fromRow, toRow, fromTable){\n\t\tthis.table.addRow(fromRow.getData());\n\t\treturn true;\n\t},\n\n\tupdate:function(fromRow, toRow, fromTable){\n\t\tif(toRow){\n\t\t\ttoRow.update(fromRow.getData());\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\treplace:function(fromRow, toRow, fromTable){\n\t\tif(toRow){\n\t\t\tthis.table.addRow(fromRow.getData(), undefined, toRow);\n\t\t\ttoRow.delete();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n};\n\nMoveRows.prototype.senders = {\n\tdelete:function(fromRow, toRow, toTable){\n\t\tfromRow.delete();\n\t}\n};\n\nMoveRows.moduleName = \"moveRow\";\n\nexport default MoveRows;","import Module from '../../core/Module.js';\n\nimport defaultMutators from './defaults/mutators.js';\n\nclass Mutator extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.allowedTypes = [\"\", \"data\", \"edit\", \"clipboard\"]; //list of mutation types\n\t\tthis.enabled = true;\n\n\t\tthis.registerColumnOption(\"mutator\");\n\t\tthis.registerColumnOption(\"mutatorParams\");\n\t\tthis.registerColumnOption(\"mutatorData\");\n\t\tthis.registerColumnOption(\"mutatorDataParams\");\n\t\tthis.registerColumnOption(\"mutatorEdit\");\n\t\tthis.registerColumnOption(\"mutatorEditParams\");\n\t\tthis.registerColumnOption(\"mutatorClipboard\");\n\t\tthis.registerColumnOption(\"mutatorClipboardParams\");\n\t\tthis.registerColumnOption(\"mutateLink\");\n\t}\n\n\tinitialize(){\n\t\tthis.subscribe(\"cell-value-changing\", this.transformCell.bind(this));\n\t\tthis.subscribe(\"cell-value-changed\", this.mutateLink.bind(this));\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"row-data-init-before\", this.rowDataChanged.bind(this));\n\t\tthis.subscribe(\"row-data-changing\", this.rowDataChanged.bind(this));\n\t}\n\n\trowDataChanged(row, tempData, updatedData){\n\t\treturn this.transformRow(tempData, \"data\", updatedData);\n\t}\n\n\t//initialize column mutator\n\tinitializeColumn(column){\n\t\tvar match = false,\n\t\tconfig = {};\n\n\t\tthis.allowedTypes.forEach((type) => {\n\t\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\n\t\t\tmutator;\n\n\t\t\tif(column.definition[key]){\n\t\t\t\tmutator = this.lookupMutator(column.definition[key]);\n\n\t\t\t\tif(mutator){\n\t\t\t\t\tmatch = true;\n\n\t\t\t\t\tconfig[key] = {\n\t\t\t\t\t\tmutator:mutator,\n\t\t\t\t\t\tparams: column.definition[key + \"Params\"] || {},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif(match){\n\t\t\tcolumn.modules.mutate = config;\n\t\t}\n\t}\n\n\tlookupMutator(value){\n\t\tvar mutator = false;\n\n\t\t//set column mutator\n\t\tswitch(typeof value){\n\t\t\tcase \"string\":\n\t\t\t\tif(Mutator.mutators[value]){\n\t\t\t\t\tmutator = Mutator.mutators[value];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\tmutator = value;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn mutator;\n\t}\n\n\t//apply mutator to row\n\ttransformRow(data, type, updatedData){\n\t\tvar key = \"mutator\" + (type.charAt(0).toUpperCase() + type.slice(1)),\n\t\tvalue;\n\n\t\tif(this.enabled){\n\n\t\t\tthis.table.columnManager.traverse((column) => {\n\t\t\t\tvar mutator, params, component;\n\n\t\t\t\tif(column.modules.mutate){\n\t\t\t\t\tmutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;\n\n\t\t\t\t\tif(mutator){\n\t\t\t\t\t\tvalue = column.getFieldValue(typeof updatedData !== \"undefined\" ? updatedData : data);\n\n\t\t\t\t\t\tif((type == \"data\" && !updatedData)|| typeof value !== \"undefined\"){\n\t\t\t\t\t\t\tcomponent = column.getComponent();\n\t\t\t\t\t\t\tparams = typeof mutator.params === \"function\" ? mutator.params(value, data, type, component) : mutator.params;\n\t\t\t\t\t\t\tcolumn.setFieldValue(data, mutator.mutator(value, data, type, params, component));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t//apply mutator to new cell value\n\ttransformCell(cell, value){\n\t\tif(cell.column.modules.mutate){\n\t\t\tvar mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false,\n\t\t\ttempData = {};\n\n\t\t\tif(mutator){\n\t\t\t\ttempData = Object.assign(tempData, cell.row.getData());\n\t\t\t\tcell.column.setFieldValue(tempData, value);\n\t\t\t\treturn mutator.mutator(value, tempData, \"edit\", mutator.params, cell.getComponent());\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tmutateLink(cell){\n\t\tvar links = cell.column.definition.mutateLink;\n\n\t\tif(links){\n\t\t\tif(!Array.isArray(links)){\n\t\t\t\tlinks = [links];\n\t\t\t}\n\n\t\t\tlinks.forEach((link) => {\n\t\t\t\tvar linkCell = cell.row.getCell(link);\n\n\t\t\t\tif(linkCell){\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tenable(){\n\t\tthis.enabled = true;\n\t}\n\n\tdisable(){\n\t\tthis.enabled = false;\n\t}\n}\n\nMutator.moduleName = \"mutator\";\n\n//load defaults\nMutator.mutators = defaultMutators;\n\nexport default Mutator;","export default {};","import rows from './pageCounters/rows.js';\nimport pages from './pageCounters/pages.js';\n\n\nexport default {\n\trows:rows,\n\tpages:pages,\n};","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\n\tvar el = document.createElement(\"span\"),\n\tshowingEl = document.createElement(\"span\"),\n\tvalueEl = document.createElement(\"span\"),\n\tofEl = document.createElement(\"span\"),\n\ttotalEl = document.createElement(\"span\"),\n\trowsEl = document.createElement(\"span\");\n\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\n\t\tshowingEl.innerHTML = value;\n\t});\n\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\n\t\tofEl.innerHTML = value;\n\t});\n\n\tthis.table.modules.localize.langBind(\"pagination|counter|rows\", (value) => {\n\t\trowsEl.innerHTML = value;\n\t});\n\n\tif(totalRows){\n\t\tvalueEl.innerHTML = \" \" + currentRow + \"-\" + Math.min((currentRow + pageSize - 1), totalRows) + \" \";\n\t\t\n\t\ttotalEl.innerHTML = \" \" + totalRows + \" \";\n\t\t\n\t\tel.appendChild(showingEl);\n\t\tel.appendChild(valueEl);\n\t\tel.appendChild(ofEl);\n\t\tel.appendChild(totalEl);\n\t\tel.appendChild(rowsEl);\n\t}else{\n\t\tvalueEl.innerHTML = \" 0 \";\n\n\t\tel.appendChild(showingEl);\n\t\tel.appendChild(valueEl);\n\t\tel.appendChild(rowsEl);\n\t}\n\t\n\treturn el;\n}","export default function(pageSize, currentRow, currentPage, totalRows, totalPages){\n\n\tvar el = document.createElement(\"span\"),\n\tshowingEl = document.createElement(\"span\"),\n\tvalueEl = document.createElement(\"span\"),\n\tofEl = document.createElement(\"span\"),\n\ttotalEl = document.createElement(\"span\"),\n\trowsEl = document.createElement(\"span\");\n\t\n\tthis.table.modules.localize.langBind(\"pagination|counter|showing\", (value) => {\n\t\tshowingEl.innerHTML = value;\n\t});\n\t\n\tvalueEl.innerHTML = \" \" + currentPage + \" \";\n\t\n\tthis.table.modules.localize.langBind(\"pagination|counter|of\", (value) => {\n\t\tofEl.innerHTML = value;\n\t});\n\t\n\ttotalEl.innerHTML = \" \" + totalPages + \" \";\n\t\n\tthis.table.modules.localize.langBind(\"pagination|counter|pages\", (value) => {\n\t\trowsEl.innerHTML = value;\n\t});\n\t\n\tel.appendChild(showingEl);\n\tel.appendChild(valueEl);\n\tel.appendChild(ofEl);\n\tel.appendChild(totalEl);\n\tel.appendChild(rowsEl);\n\t\n\treturn el;\n}","import Module from '../../core/Module.js';\n\nimport defaultPageCounters from './defaults/pageCounters.js';\n\nclass Page extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.mode = \"local\";\n\t\tthis.progressiveLoad = false;\n\t\t\n\t\tthis.element = null;\n\t\tthis.pageCounterElement = null;\n\t\tthis.pageCounter = null;\n\t\t\n\t\tthis.size = 0;\n\t\tthis.page = 1;\n\t\tthis.count = 5;\n\t\tthis.max = 1;\n\n\t\tthis.remoteRowCountEstimate = null;\n\t\t\n\t\tthis.initialLoad = true;\n\t\tthis.dataChanging = false; //flag to check if data is being changed by this module\n\t\t\n\t\tthis.pageSizes = [];\n\t\t\n\t\tthis.registerTableOption(\"pagination\", false); //set pagination type\n\t\tthis.registerTableOption(\"paginationMode\", \"local\"); //local or remote pagination\n\t\tthis.registerTableOption(\"paginationSize\", false); //set number of rows to a page\n\t\tthis.registerTableOption(\"paginationInitialPage\", 1); //initial page to show on load\n\t\tthis.registerTableOption(\"paginationCounter\", false); // set pagination counter\n\t\tthis.registerTableOption(\"paginationCounterElement\", false); // set pagination counter\n\t\tthis.registerTableOption(\"paginationButtonCount\", 5); // set count of page button\n\t\tthis.registerTableOption(\"paginationSizeSelector\", false); //add pagination size selector element\n\t\tthis.registerTableOption(\"paginationElement\", false); //element to hold pagination numbers\n\t\t// this.registerTableOption(\"paginationDataSent\", {}); //pagination data sent to the server\n\t\t// this.registerTableOption(\"paginationDataReceived\", {}); //pagination data received from the server\n\t\tthis.registerTableOption(\"paginationAddRow\", \"page\"); //add rows on table or page\n\t\t\n\t\tthis.registerTableOption(\"progressiveLoad\", false); //progressive loading\n\t\tthis.registerTableOption(\"progressiveLoadDelay\", 0); //delay between requests\n\t\tthis.registerTableOption(\"progressiveLoadScrollMargin\", 0); //margin before scroll begins\n\t\t\n\t\tthis.registerTableFunction(\"setMaxPage\", this.setMaxPage.bind(this));\n\t\tthis.registerTableFunction(\"setPage\", this.setPage.bind(this));\n\t\tthis.registerTableFunction(\"setPageToRow\", this.userSetPageToRow.bind(this));\n\t\tthis.registerTableFunction(\"setPageSize\", this.userSetPageSize.bind(this));\n\t\tthis.registerTableFunction(\"getPageSize\", this.getPageSize.bind(this));\n\t\tthis.registerTableFunction(\"previousPage\", this.previousPage.bind(this));\n\t\tthis.registerTableFunction(\"nextPage\", this.nextPage.bind(this));\n\t\tthis.registerTableFunction(\"getPage\", this.getPage.bind(this));\n\t\tthis.registerTableFunction(\"getPageMax\", this.getPageMax.bind(this));\n\t\t\n\t\t//register component functions\n\t\tthis.registerComponentFunction(\"row\", \"pageTo\", this.setPageToRow.bind(this));\n\t}\n\t\n\tinitialize(){\n\t\tif(this.table.options.pagination){\n\t\t\tthis.subscribe(\"row-deleted\", this.rowsUpdated.bind(this));\n\t\t\tthis.subscribe(\"row-added\", this.rowsUpdated.bind(this));\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\n\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.bind(this));\n\n\t\t\tif(this.table.options.paginationAddRow == \"page\"){\n\t\t\t\tthis.subscribe(\"row-adding-position\", this.rowAddingPosition.bind(this));\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.options.paginationMode === \"remote\"){\n\t\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\n\t\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\n\t\t\t}\n\t\t\t\n\t\t\tif(this.table.options.progressiveLoad){\n\t\t\t\tconsole.error(\"Progressive Load Error - Pagination and progressive load cannot be used at the same time\");\n\t\t\t}\n\t\t\t\n\t\t\tthis.registerDisplayHandler(this.restOnRenderBefore.bind(this), 40);\n\t\t\tthis.registerDisplayHandler(this.getRows.bind(this), 50);\n\t\t\t\n\t\t\tthis.createElements();\n\t\t\tthis.initializePageCounter();\n\t\t\tthis.initializePaginator();\n\t\t}else if(this.table.options.progressiveLoad){\n\t\t\tthis.subscribe(\"data-params\", this.remotePageParams.bind(this));\n\t\t\tthis.subscribe(\"data-loaded\", this._parseRemoteData.bind(this));\n\t\t\tthis.subscribe(\"table-built\", this.calculatePageSizes.bind(this));\n\t\t\tthis.subscribe(\"data-processed\", this.initialLoadComplete.bind(this));\n\t\t\t\n\t\t\tthis.initializeProgressive(this.table.options.progressiveLoad);\n\t\t\t\n\t\t\tif(this.table.options.progressiveLoad === \"scroll\"){\n\t\t\t\tthis.subscribe(\"scroll-vertical\", this.scrollVertical.bind(this));\n\t\t\t}\n\t\t}\n\t}\n\t\n\trowAddingPosition(row, top){\n\t\tvar rowManager = this.table.rowManager,\n\t\tdisplayRows = rowManager.getDisplayRows(),\n\t\tindex;\n\t\t\n\t\tif(top){\n\t\t\tif(displayRows.length){\n\t\t\t\tindex = displayRows[0];\n\t\t\t}else{\n\t\t\t\tif(rowManager.activeRows.length){\n\t\t\t\t\tindex = rowManager.activeRows[rowManager.activeRows.length-1];\n\t\t\t\t\ttop = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(displayRows.length){\n\t\t\t\tindex = displayRows[displayRows.length - 1];\n\t\t\t\ttop = displayRows.length < this.size ? false : true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn {index, top};\n\t}\n\t\n\tcalculatePageSizes(){\n\t\tvar testElRow, testElCell;\n\t\t\n\t\tif(this.table.options.paginationSize){\n\t\t\tthis.size = this.table.options.paginationSize;\n\t\t}else{\n\t\t\ttestElRow = document.createElement(\"div\");\n\t\t\ttestElRow.classList.add(\"tabulator-row\");\n\t\t\ttestElRow.style.visibility = \"hidden\";\n\t\t\t\n\t\t\ttestElCell = document.createElement(\"div\");\n\t\t\ttestElCell.classList.add(\"tabulator-cell\");\n\t\t\ttestElCell.innerHTML = \"Page Row Test\";\n\t\t\t\n\t\t\ttestElRow.appendChild(testElCell);\n\t\t\t\n\t\t\tthis.table.rowManager.getTableElement().appendChild(testElRow);\n\t\t\t\n\t\t\tthis.size = Math.floor(this.table.rowManager.getElement().clientHeight / testElRow.offsetHeight);\n\t\t\t\n\t\t\tthis.table.rowManager.getTableElement().removeChild(testElRow);\n\t\t}\n\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\n\t\t\n\t\tthis.generatePageSizeSelectList();\n\t}\n\t\n\tinitialLoadComplete(){\n\t\tthis.initialLoad = false;\n\t}\n\t\n\tremotePageParams(data, config, silent, params){\n\t\tif(!this.initialLoad){\n\t\t\tif((this.progressiveLoad && !silent) || (!this.progressiveLoad && !this.dataChanging)){\n\t\t\t\tthis.reset(true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//configure request params\n\t\tparams.page = this.page;\n\t\t\n\t\t//set page size if defined\n\t\tif(this.size){\n\t\t\tparams.size = this.size;\n\t\t}\n\t\t\n\t\treturn params;\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\t\n\tuserSetPageToRow(row){\n\t\tif(this.table.options.pagination){\n\t\t\trow = this.rowManager.findRow(row);\n\t\t\t\n\t\t\tif(row){\n\t\t\t\treturn this.setPageToRow(row);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Promise.reject();\n\t}\n\t\n\tuserSetPageSize(size){\n\t\tif(this.table.options.pagination){\n\t\t\tthis.setPageSize(size);\n\t\t\treturn this.setPage(1);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\tscrollVertical(top, dir){\n\t\tvar element, diff, margin;\n\t\tif(!dir && !this.table.dataLoader.loading){\n\t\t\telement = this.table.rowManager.getElement();\n\t\t\tdiff = element.scrollHeight - element.clientHeight - top;\n\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (element.clientHeight * 2);\n\t\t\t\n\t\t\tif(diff < margin){\n\t\t\t\tthis.nextPage()\n\t\t\t\t\t.catch(() => {}); //consume the exception thrown when on the last page\n\t\t\t}\n\t\t}\n\t}\n\t\n\trestOnRenderBefore(rows, renderInPosition){\n\t\tif(!renderInPosition){\n\t\t\tif(this.mode === \"local\"){\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn rows;\n\t}\n\t\n\trowsUpdated(){\n\t\tthis.refreshData(true, \"all\");\n\t}\n\t\n\tcreateElements(){\n\t\tvar button;\n\t\t\n\t\tthis.element = document.createElement(\"span\");\n\t\tthis.element.classList.add(\"tabulator-paginator\");\n\t\t\n\t\tthis.pagesElement = document.createElement(\"span\");\n\t\tthis.pagesElement.classList.add(\"tabulator-pages\");\n\t\t\n\t\tbutton = document.createElement(\"button\");\n\t\tbutton.classList.add(\"tabulator-page\");\n\t\tbutton.setAttribute(\"type\", \"button\");\n\t\tbutton.setAttribute(\"role\", \"button\");\n\t\tbutton.setAttribute(\"aria-label\", \"\");\n\t\tbutton.setAttribute(\"title\", \"\");\n\t\t\n\t\tthis.firstBut = button.cloneNode(true);\n\t\tthis.firstBut.setAttribute(\"data-page\", \"first\");\n\t\t\n\t\tthis.prevBut = button.cloneNode(true);\n\t\tthis.prevBut.setAttribute(\"data-page\", \"prev\");\n\t\t\n\t\tthis.nextBut = button.cloneNode(true);\n\t\tthis.nextBut.setAttribute(\"data-page\", \"next\");\n\t\t\n\t\tthis.lastBut = button.cloneNode(true);\n\t\tthis.lastBut.setAttribute(\"data-page\", \"last\");\n\t\t\n\t\tif(this.table.options.paginationSizeSelector){\n\t\t\tthis.pageSizeSelect = document.createElement(\"select\");\n\t\t\tthis.pageSizeSelect.classList.add(\"tabulator-page-size\");\n\t\t}\n\t}\n\t\n\tgeneratePageSizeSelectList(){\n\t\tvar pageSizes = [];\n\t\t\n\t\tif(this.pageSizeSelect){\n\t\t\t\n\t\t\tif(Array.isArray(this.table.options.paginationSizeSelector)){\n\t\t\t\tpageSizes = this.table.options.paginationSizeSelector;\n\t\t\t\tthis.pageSizes = pageSizes;\n\t\t\t\t\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\n\t\t\t\t\tpageSizes.unshift(this.size);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(this.pageSizes.indexOf(this.size) == -1){\n\t\t\t\t\tpageSizes = [];\n\t\t\t\t\t\n\t\t\t\t\tfor (let i = 1; i < 5; i++){\n\t\t\t\t\t\tpageSizes.push(this.size * i);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.pageSizes = pageSizes;\n\t\t\t\t}else{\n\t\t\t\t\tpageSizes = this.pageSizes;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile(this.pageSizeSelect.firstChild) this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);\n\t\t\t\n\t\t\tpageSizes.forEach((item) => {\n\t\t\t\tvar itemEl = document.createElement(\"option\");\n\t\t\t\titemEl.value = item;\n\t\t\t\t\n\t\t\t\tif(item === true){\n\t\t\t\t\tthis.langBind(\"pagination|all\", function(value){\n\t\t\t\t\t\titemEl.innerHTML = value;\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\titemEl.innerHTML = item;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthis.pageSizeSelect.appendChild(itemEl);\n\t\t\t});\n\t\t\t\n\t\t\tthis.pageSizeSelect.value = this.size;\n\t\t}\n\t}\n\t\n\tinitializePageCounter(){\n\t\tvar counter = this.table.options.paginationCounter,\n\t\tpageCounter = null;\n\t\t\n\t\tif(counter){\n\t\t\tif(typeof counter === \"function\"){\n\t\t\t\tpageCounter = counter;\n\t\t\t}else{\n\t\t\t\tpageCounter = Page.pageCounters[counter];\n\t\t\t}\n\t\t\t\n\t\t\tif(pageCounter){\n\t\t\t\tthis.pageCounter = pageCounter;\n\t\t\t\t\n\t\t\t\tthis.pageCounterElement = document.createElement(\"span\");\n\t\t\t\tthis.pageCounterElement.classList.add(\"tabulator-page-counter\");\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Pagination Error - No such page counter found: \", counter);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//setup pagination\n\tinitializePaginator(hidden){\n\t\tvar pageSelectLabel, paginationCounterHolder;\n\t\t\n\t\tif(!hidden){\n\t\t\t//build pagination element\n\t\t\t\n\t\t\t//bind localizations\n\t\t\tthis.langBind(\"pagination|first\", (value) => {\n\t\t\t\tthis.firstBut.innerHTML = value;\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|first_title\", (value) => {\n\t\t\t\tthis.firstBut.setAttribute(\"aria-label\", value);\n\t\t\t\tthis.firstBut.setAttribute(\"title\", value);\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|prev\", (value) => {\n\t\t\t\tthis.prevBut.innerHTML = value;\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|prev_title\", (value) => {\n\t\t\t\tthis.prevBut.setAttribute(\"aria-label\", value);\n\t\t\t\tthis.prevBut.setAttribute(\"title\", value);\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|next\", (value) => {\n\t\t\t\tthis.nextBut.innerHTML = value;\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|next_title\", (value) => {\n\t\t\t\tthis.nextBut.setAttribute(\"aria-label\", value);\n\t\t\t\tthis.nextBut.setAttribute(\"title\", value);\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|last\", (value) => {\n\t\t\t\tthis.lastBut.innerHTML = value;\n\t\t\t});\n\t\t\t\n\t\t\tthis.langBind(\"pagination|last_title\", (value) => {\n\t\t\t\tthis.lastBut.setAttribute(\"aria-label\", value);\n\t\t\t\tthis.lastBut.setAttribute(\"title\", value);\n\t\t\t});\n\t\t\t\n\t\t\t//click bindings\n\t\t\tthis.firstBut.addEventListener(\"click\", () => {\n\t\t\t\tthis.setPage(1);\n\t\t\t});\n\t\t\t\n\t\t\tthis.prevBut.addEventListener(\"click\", () => {\n\t\t\t\tthis.previousPage();\n\t\t\t});\n\t\t\t\n\t\t\tthis.nextBut.addEventListener(\"click\", () => {\n\t\t\t\tthis.nextPage();\n\t\t\t});\n\t\t\t\n\t\t\tthis.lastBut.addEventListener(\"click\", () => {\n\t\t\t\tthis.setPage(this.max);\n\t\t\t});\n\t\t\t\n\t\t\tif(this.table.options.paginationElement){\n\t\t\t\tthis.element = this.table.options.paginationElement;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.pageSizeSelect){\n\t\t\t\tpageSelectLabel = document.createElement(\"label\");\n\t\t\t\t\n\t\t\t\tthis.langBind(\"pagination|page_size\", (value) => {\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"aria-label\", value);\n\t\t\t\t\tthis.pageSizeSelect.setAttribute(\"title\", value);\n\t\t\t\t\tpageSelectLabel.innerHTML = value;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.element.appendChild(pageSelectLabel);\n\t\t\t\tthis.element.appendChild(this.pageSizeSelect);\n\t\t\t\t\n\t\t\t\tthis.pageSizeSelect.addEventListener(\"change\", (e) => {\n\t\t\t\t\tthis.setPageSize(this.pageSizeSelect.value == \"true\" ? true : this.pageSizeSelect.value);\n\t\t\t\t\tthis.setPage(1);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t//append to DOM\n\t\t\tthis.element.appendChild(this.firstBut);\n\t\t\tthis.element.appendChild(this.prevBut);\n\t\t\tthis.element.appendChild(this.pagesElement);\n\t\t\tthis.element.appendChild(this.nextBut);\n\t\t\tthis.element.appendChild(this.lastBut);\n\t\t\t\n\t\t\tif(!this.table.options.paginationElement){\n\t\t\t\tif(this.table.options.paginationCounter){\n\n\t\t\t\t\tpaginationCounterHolder; \n\n\t\t\t\t\tif(this.table.options.paginationCounterElement){\n\t\t\t\t\t\tif(this.table.options.paginationCounterElement instanceof HTMLElement){\n\t\t\t\t\t\t\tthis.table.options.paginationCounterElement.appendChild(this.pageCounterElement);\n\t\t\t\t\t\t}else if(typeof this.table.options.paginationCounterElement === \"string\"){\n\t\t\t\t\t\t\tpaginationCounterHolder = document.querySelector(this.table.options.paginationCounterElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(paginationCounterHolder){\n\t\t\t\t\t\t\t\tpaginationCounterHolder.appendChild(this.pageCounterElement);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tconsole.warn(\"Pagination Error - Unable to find element matching paginationCounterElement selector:\", this.table.options.paginationCounterElement);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.footerAppend(this.pageCounterElement);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.footerAppend(this.element);\n\t\t\t}\n\t\t\t\n\t\t\tthis.page = this.table.options.paginationInitialPage;\n\t\t\tthis.count = this.table.options.paginationButtonCount;\n\t\t}\n\t\t\n\t\t//set default values\n\t\tthis.mode = this.table.options.paginationMode;\n\t}\n\t\n\tinitializeProgressive(mode){\n\t\tthis.initializePaginator(true);\n\t\tthis.mode = \"progressive_\" + mode;\n\t\tthis.progressiveLoad = true;\n\t}\n\t\n\ttrackChanges(){\n\t\tthis.dispatch(\"page-changed\");\n\t}\n\t\n\t//calculate maximum page from number of rows\n\tsetMaxRows(rowCount){\n\t\tif(!rowCount){\n\t\t\tthis.max = 1;\n\t\t}else{\n\t\t\tthis.max = this.size === true ? 1 : Math.ceil(rowCount/this.size);\n\t\t}\n\t\t\n\t\tif(this.page > this.max){\n\t\t\tthis.page = this.max;\n\t\t}\n\t}\n\t\n\t//reset to first page without triggering action\n\treset(force){\n\t\tif(!this.initialLoad){\n\t\t\tif(this.mode == \"local\" || force){\n\t\t\t\tthis.page = 1;\n\t\t\t\tthis.trackChanges();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//set the maximum page\n\tsetMaxPage(max){\n\t\t\n\t\tmax = parseInt(max);\n\t\t\n\t\tthis.max = max || 1;\n\t\t\n\t\tif(this.page > this.max){\n\t\t\tthis.page = this.max;\n\t\t\tthis.trigger();\n\t\t}\n\t}\n\t\n\t//set current page number\n\tsetPage(page){\n\t\tswitch(page){\n\t\t\tcase \"first\":\n\t\t\t\treturn this.setPage(1);\n\t\n\t\t\tcase \"prev\":\n\t\t\t\treturn this.previousPage();\n\t\t\t\n\t\t\tcase \"next\":\n\t\t\t\treturn this.nextPage();\n\t\t\t\n\t\t\tcase \"last\":\n\t\t\t\treturn this.setPage(this.max);\n\t\t}\n\t\t\n\t\tpage = parseInt(page);\n\t\t\n\t\tif((page > 0 && page <= this.max) || this.mode !== \"local\"){\n\t\t\tthis.page = page;\n\t\t\t\n\t\t\tthis.trackChanges();\n\t\t\t\n\t\t\treturn this.trigger();\n\t\t}else{\n\t\t\tconsole.warn(\"Pagination Error - Requested page is out of range of 1 - \" + this.max + \":\", page);\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\tsetPageToRow(row){\n\t\tvar rows = this.displayRows(-1);\n\t\tvar index = rows.indexOf(row);\n\t\n\t\tif(index > -1){\n\t\t\tvar page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);\n\t\t\t\n\t\t\treturn this.setPage(page);\n\t\t}else{\n\t\t\tconsole.warn(\"Pagination Error - Requested row is not visible\");\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\tsetPageSize(size){\n\t\tif(size !== true){\n\t\t\tsize = parseInt(size);\n\t\t}\n\n\t\tif(size > 0){\n\t\t\tthis.size = size;\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", size);\n\t\t}\n\t\t\n\t\tif(this.pageSizeSelect){\n\t\t\t// this.pageSizeSelect.value = size;\n\t\t\tthis.generatePageSizeSelectList();\n\t\t}\n\t\t\n\t\tthis.trackChanges();\n\t}\n\t\n\t_setPageCounter(totalRows, size, currentRow){\n\t\tvar content;\n\t\t\n\t\tif(this.pageCounter){\n\n\t\t\tif(this.mode === \"remote\"){\n\t\t\t\tsize = this.size;\n\t\t\t\tcurrentRow = ((this.page - 1) * this.size) + 1;\n\t\t\t\ttotalRows = this.remoteRowCountEstimate;\n\t\t\t}\n\n\t\t\tcontent = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);\n\t\t\t\n\t\t\tswitch(typeof content){\n\t\t\t\tcase \"object\":\n\t\t\t\t\tif(content instanceof Node){\n\t\t\t\t\t\n\t\t\t\t\t\t//clear previous cell contents\n\t\t\t\t\t\twhile(this.pageCounterElement.firstChild) this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);\n\t\t\t\t\t\n\t\t\t\t\t\tthis.pageCounterElement.appendChild(content);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\n\t\t\t\t\t\n\t\t\t\t\t\tif(content != null){\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"undefined\":\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.pageCounterElement.innerHTML = content;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//setup the pagination buttons\n\t_setPageButtons(){\n\t\tlet leftSize = Math.floor((this.count-1) / 2);\n\t\tlet rightSize = Math.ceil((this.count-1) / 2);\n\t\tlet min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1);\n\t\tlet max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max);\n\t\t\n\t\twhile(this.pagesElement.firstChild) this.pagesElement.removeChild(this.pagesElement.firstChild);\n\t\t\n\t\tif(this.page == 1){\n\t\t\tthis.firstBut.disabled = true;\n\t\t\tthis.prevBut.disabled = true;\n\t\t}else{\n\t\t\tthis.firstBut.disabled = false;\n\t\t\tthis.prevBut.disabled = false;\n\t\t}\n\t\t\n\t\tif(this.page == this.max){\n\t\t\tthis.lastBut.disabled = true;\n\t\t\tthis.nextBut.disabled = true;\n\t\t}else{\n\t\t\tthis.lastBut.disabled = false;\n\t\t\tthis.nextBut.disabled = false;\n\t\t}\n\t\t\n\t\tfor(let i = min; i <= max; i++){\n\t\t\tif(i>0 && i <= this.max){\n\t\t\t\tthis.pagesElement.appendChild(this._generatePageButton(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.footerRedraw();\n\t}\n\t\n\t_generatePageButton(page){\n\t\tvar button = document.createElement(\"button\");\n\t\t\n\t\tbutton.classList.add(\"tabulator-page\");\n\t\tif(page == this.page){\n\t\t\tbutton.classList.add(\"active\");\n\t\t}\n\t\t\n\t\tbutton.setAttribute(\"type\", \"button\");\n\t\tbutton.setAttribute(\"role\", \"button\");\n\t\t\n\t\tthis.langBind(\"pagination|page_title\", (value) => {\n\t\t\tbutton.setAttribute(\"aria-label\", value + \" \" + page);\n\t\t\tbutton.setAttribute(\"title\", value + \" \" + page);\n\t\t});\n\t\t\n\t\tbutton.setAttribute(\"data-page\", page);\n\t\tbutton.textContent = page;\n\t\t\n\t\tbutton.addEventListener(\"click\", (e) => {\n\t\t\tthis.setPage(page);\n\t\t});\n\t\t\n\t\treturn button;\n\t}\n\t\n\t//previous page\n\tpreviousPage(){\n\t\tif(this.page > 1){\n\t\t\tthis.page--;\n\t\t\t\n\t\t\tthis.trackChanges();\n\t\t\t\n\t\t\treturn this.trigger();\n\t\t\t\n\t\t}else{\n\t\t\tconsole.warn(\"Pagination Error - Previous page would be less than page 1:\", 0);\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\t//next page\n\tnextPage(){\n\t\tif(this.page < this.max){\n\t\t\tthis.page++;\n\t\t\t\n\t\t\tthis.trackChanges();\n\t\t\t\n\t\t\treturn this.trigger();\n\t\t\t\n\t\t}else{\n\t\t\tif(!this.progressiveLoad){\n\t\t\t\tconsole.warn(\"Pagination Error - Next page would be greater than maximum page of \" + this.max + \":\", this.max + 1);\n\t\t\t}\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\t//return current page number\n\tgetPage(){\n\t\treturn this.page;\n\t}\n\t\n\t//return max page number\n\tgetPageMax(){\n\t\treturn this.max;\n\t}\n\t\n\tgetPageSize(size){\n\t\treturn this.size;\n\t}\n\t\n\tgetMode(){\n\t\treturn this.mode;\n\t}\n\t\n\t//return appropriate rows for current page\n\tgetRows(data){\n\t\tvar actualRowPageSize = 0,\n\t\toutput, start, end, actualStartRow;\n\n\t\tvar actualRows = data.filter((row) => {\n\t\t\treturn row.type === \"row\";\n\t\t});\n\t\t\n\t\tif(this.mode == \"local\"){\n\t\t\toutput = [];\n\t\t\t\n\t\t\tthis.setMaxRows(data.length);\n\t\t\t\n\t\t\tif(this.size === true){\n\t\t\t\tstart = 0;\n\t\t\t\tend = data.length;\n\t\t\t}else{\n\t\t\t\tstart = this.size * (this.page - 1);\n\t\t\t\tend = start + parseInt(this.size);\n\t\t\t}\n\t\t\t\n\t\t\tthis._setPageButtons();\n\t\t\t\n\t\t\tfor(let i = start; i < end; i++){\n\t\t\t\tlet row = data[i];\n\n\t\t\t\tif(row){\n\t\t\t\t\toutput.push(row);\n\n\t\t\t\t\tif(row.type === \"row\"){\n\t\t\t\t\t\tif(!actualStartRow){\n\t\t\t\t\t\t\tactualStartRow = row;\n\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\tactualRowPageSize++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);\n\t\t\t\n\t\t\treturn output;\n\t\t}else{\n\t\t\tthis._setPageButtons();\n\t\t\tthis._setPageCounter(actualRows.length);\n\t\t\t\n\t\t\treturn data.slice(0);\n\t\t}\n\t}\n\t\n\ttrigger(){\n\t\tvar left;\n\t\t\n\t\tswitch(this.mode){\n\t\t\tcase \"local\":\n\t\t\t\tleft = this.table.rowManager.scrollLeft;\n\t\t\t\n\t\t\t\tthis.refreshData();\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\n\t\t\t\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\n\t\t\t\n\t\t\t\treturn Promise.resolve();\n\t\t\t\n\t\t\tcase \"remote\":\n\t\t\t\tthis.dataChanging = true;\n\t\t\t\treturn this.reloadData(null)\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tthis.dataChanging = false;\n\t\t\t\t\t});\n\t\t\t\n\t\t\tcase \"progressive_load\":\n\t\t\tcase \"progressive_scroll\":\n\t\t\t\treturn this.reloadData(null, true);\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\n\t\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\t_parseRemoteData(data){\n\t\tvar margin;\n\t\t\n\t\tif(typeof data.last_page === \"undefined\"){\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").last_page || \"last_page\") + \"' property\");\n\t\t}\n\t\t\n\t\tif(data.data){\n\t\t\tthis.max = parseInt(data.last_page) || 1;\n\n\t\t\tthis.remoteRowCountEstimate = typeof data.last_row !== \"undefined\" ? data.last_row : (data.last_page * this.size - (this.page == data.last_page ? (this.size - data.data.length) : 0));\n\t\t\t\n\t\t\tif(this.progressiveLoad){\n\t\t\t\tswitch(this.mode){\n\t\t\t\t\tcase \"progressive_load\":\n\t\t\t\t\t\n\t\t\t\t\t\tif(this.page == 1){\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tif(this.page < this.max){\n\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\tthis.nextPage();\n\t\t\t\t\t\t\t}, this.table.options.progressiveLoadDelay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"progressive_scroll\":\n\t\t\t\t\t\tdata = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);\n\t\t\t\t\t\n\t\t\t\t\t\tthis.table.rowManager.setData(data, this.page !== 1, this.page == 1);\n\t\t\t\t\t\n\t\t\t\t\t\tmargin = this.table.options.progressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2);\n\t\t\t\t\t\n\t\t\t\t\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\n\t\t\t\t\t\t\tif(this.page < this.max){\n\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\tthis.nextPage();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\t// left = this.table.rowManager.scrollLeft;\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\n\t\t\t\t// this.table.rowManager.scrollHorizontal(left);\n\t\t\t\t// this.table.columnManager.scrollHorizontal(left);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\tconsole.warn(\"Remote Pagination Error - Server response missing '\" + (this.options(\"dataReceiveParams\").data || \"data\") + \"' property\");\n\t\t}\n\t\t\n\t\treturn data.data;\n\t}\n\t\n\t//handle the footer element being redrawn\n\tfooterRedraw(){\n\t\tvar footer = this.table.footerManager.containerElement;\n\n\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\n\t\t\tthis.pagesElement.style.display = 'none';\n\t\t}else{\n\t\t\tthis.pagesElement.style.display = '';\n\t\t\t\n\t\t\tif((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){\n\t\t\t\tthis.pagesElement.style.display = 'none';\n\t\t\t}\n\t\t}\n\t}\n}\n\nPage.moduleName = \"page\";\n\n//load defaults\nPage.pageCounters = defaultPageCounters;\n\nexport default Page;\n","// read persistance information from storage\nexport default {\n\tlocal:function(id, type){\n\t\tvar data = localStorage.getItem(id + \"-\" + type);\n\n\t\treturn data ? JSON.parse(data) : false;\n\t},\n\tcookie:function(id, type){\n\t\tvar cookie = document.cookie,\n\t\tkey = id + \"-\" + type,\n\t\tcookiePos = cookie.indexOf(key + \"=\"),\n\t\tend, data;\n\n\t\t//if cookie exists, decode and load column data into tabulator\n\t\tif(cookiePos > -1){\n\t\t\tcookie = cookie.slice(cookiePos);\n\n\t\t\tend = cookie.indexOf(\";\");\n\n\t\t\tif(end > -1){\n\t\t\t\tcookie = cookie.slice(0, end);\n\t\t\t}\n\n\t\t\tdata = cookie.replace(key + \"=\", \"\");\n\t\t}\n\n\t\treturn data ? JSON.parse(data) : false;\n\t}\n};\n","//write persistence information to storage\nexport default {\n\tlocal:function(id, type, data){\n\t\tlocalStorage.setItem(id + \"-\" + type, JSON.stringify(data));\n\t},\n\tcookie:function(id, type, data){\n\t\tvar expireDate = new Date();\n\n\t\texpireDate.setDate(expireDate.getDate() + 10000);\n\n\t\tdocument.cookie = id + \"-\" + type + \"=\" + JSON.stringify(data) + \"; expires=\" + expireDate.toUTCString();\n\t}\n};","import Module from '../../core/Module.js';\n\nimport defaultReaders from './defaults/readers.js';\nimport defaultWriters from './defaults/writers.js';\n\nclass Persistence extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.mode = \"\";\n\t\tthis.id = \"\";\n\t\t// this.persistProps = [\"field\", \"width\", \"visible\"];\n\t\tthis.defWatcherBlock = false;\n\t\tthis.config = {};\n\t\tthis.readFunc = false;\n\t\tthis.writeFunc = false;\n\n\t\tthis.registerTableOption(\"persistence\", false);\n\t\tthis.registerTableOption(\"persistenceID\", \"\"); //key for persistent storage\n\t\tthis.registerTableOption(\"persistenceMode\", true); //mode for storing persistence information\n\t\tthis.registerTableOption(\"persistenceReaderFunc\", false); //function for handling persistence data reading\n\t\tthis.registerTableOption(\"persistenceWriterFunc\", false); //function for handling persistence data writing\n\t}\n\n\t// Test for whether localStorage is available for use.\n\tlocalStorageTest() {\n\t\tvar testKey = \"_tabulator_test\";\n\n\t\ttry {\n\t\t\twindow.localStorage.setItem( testKey, testKey);\n\t\t\twindow.localStorage.removeItem( testKey );\n\t\t\treturn true;\n\t\t} catch(e) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t//setup parameters\n\tinitialize(){\n\t\tif(this.table.options.persistence){\n\t\t\t//determine persistent layout storage type\n\t\t\tvar mode = this.table.options.persistenceMode,\n\t\t\tid = this.table.options.persistenceID,\n\t\t\tretrievedData;\n\n\t\t\tthis.mode = mode !== true ? mode : (this.localStorageTest() ? \"local\" : \"cookie\");\n\n\t\t\tif(this.table.options.persistenceReaderFunc){\n\t\t\t\tif(typeof this.table.options.persistenceReaderFunc === \"function\"){\n\t\t\t\t\tthis.readFunc = this.table.options.persistenceReaderFunc;\n\t\t\t\t}else{\n\t\t\t\t\tif(Persistence.readers[this.table.options.persistenceReaderFunc]){\n\t\t\t\t\t\tthis.readFunc = Persistence.readers[this.table.options.persistenceReaderFunc];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.table.options.persistenceReaderFunc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(Persistence.readers[this.mode]){\n\t\t\t\t\tthis.readFunc = Persistence.readers[this.mode];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Persistence Read Error - invalid reader set\", this.mode);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(this.table.options.persistenceWriterFunc){\n\t\t\t\tif(typeof this.table.options.persistenceWriterFunc === \"function\"){\n\t\t\t\t\tthis.writeFunc = this.table.options.persistenceWriterFunc;\n\t\t\t\t}else{\n\t\t\t\t\tif(Persistence.writers[this.table.options.persistenceWriterFunc]){\n\t\t\t\t\t\tthis.writeFunc = Persistence.writers[this.table.options.persistenceWriterFunc];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid reader set\", this.table.options.persistenceWriterFunc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(Persistence.writers[this.mode]){\n\t\t\t\t\tthis.writeFunc = Persistence.writers[this.mode];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Persistence Write Error - invalid writer set\", this.mode);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//set storage tag\n\t\t\tthis.id = \"tabulator-\" + (id || (this.table.element.getAttribute(\"id\") || \"\"));\n\n\t\t\tthis.config = {\n\t\t\t\tsort:this.table.options.persistence === true || this.table.options.persistence.sort,\n\t\t\t\tfilter:this.table.options.persistence === true || this.table.options.persistence.filter,\n\t\t\t\tgroup:this.table.options.persistence === true || this.table.options.persistence.group,\n\t\t\t\tpage:this.table.options.persistence === true || this.table.options.persistence.page,\n\t\t\t\tcolumns:this.table.options.persistence === true ? [\"title\", \"width\", \"visible\"] : this.table.options.persistence.columns,\n\t\t\t};\n\n\t\t\t//load pagination data if needed\n\t\t\tif(this.config.page){\n\t\t\t\tretrievedData = this.retrieveData(\"page\");\n\n\t\t\t\tif(retrievedData){\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.paginationInitialPage;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//load group data if needed\n\t\t\tif(this.config.group){\n\t\t\t\tretrievedData = this.retrieveData(\"group\");\n\n\t\t\t\tif(retrievedData){\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\n\t\t\t\t\t}\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\n\t\t\t\t\t}\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.groupHeader;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(this.config.columns){\n\t\t\t\tthis.table.options.columns = this.load(\"columns\", this.table.options.columns);\n\t\t\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t\t\t\tthis.subscribe(\"column-show\", this.save.bind(this, \"columns\"));\n\t\t\t\tthis.subscribe(\"column-hide\", this.save.bind(this, \"columns\"));\n\t\t\t\tthis.subscribe(\"column-moved\", this.save.bind(this, \"columns\"));\n\t\t\t}\n\n\t\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this), 0);\n\n\t\t\tthis.subscribe(\"table-redraw\", this.tableRedraw.bind(this));\n\n\t\t\tthis.subscribe(\"filter-changed\", this.eventSave.bind(this, \"filter\"));\n\t\t\tthis.subscribe(\"sort-changed\", this.eventSave.bind(this, \"sort\"));\n\t\t\tthis.subscribe(\"group-changed\", this.eventSave.bind(this, \"group\"));\n\t\t\tthis.subscribe(\"page-changed\", this.eventSave.bind(this, \"page\"));\n\t\t\tthis.subscribe(\"column-resized\", this.eventSave.bind(this, \"columns\"));\n\t\t\tthis.subscribe(\"column-width\", this.eventSave.bind(this, \"columns\"));\n\t\t\tthis.subscribe(\"layout-refreshed\", this.eventSave.bind(this, \"columns\"));\n\t\t}\n\n\t\tthis.registerTableFunction(\"getColumnLayout\", this.getColumnLayout.bind(this));\n\t\tthis.registerTableFunction(\"setColumnLayout\", this.setColumnLayout.bind(this));\n\t}\n\n\teventSave(type){\n\t\tif(this.config[type]){\n\t\t\tthis.save(type);\n\t\t}\n\t}\n\n\ttableBuilt(){\n\t\tvar sorters, filters;\n\n\t\tif(this.config.sort){\n\t\t\tsorters = this.load(\"sort\");\n\n\t\t\tif(!sorters === false){\n\t\t\t\tthis.table.options.initialSort = sorters;\n\t\t\t}\n\t\t}\n\n\t\tif(this.config.filter){\n\t\t\tfilters = this.load(\"filter\");\n\n\t\t\tif(!filters === false){\n\t\t\t\tthis.table.options.initialFilter = filters;\n\t\t\t}\n\t\t}\n\t}\n\n\ttableRedraw(force){\n\t\tif(force && this.config.columns){\n\t\t\tthis.save(\"columns\");\n\t\t}\n\t}\n\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\n\tgetColumnLayout(){\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\n\t}\n\n\tsetColumnLayout(layout){\n\t\tthis.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout));\n\t\treturn true;\n\t}\n\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\n\tinitializeColumn(column){\n\t\tvar def, keys;\n\n\t\tif(this.config.columns){\n\t\t\tthis.defWatcherBlock = true;\n\n\t\t\tdef = column.getDefinition();\n\n\t\t\tkeys = this.config.columns === true ? Object.keys(def) : this.config.columns;\n\n\t\t\tkeys.forEach((key)=>{\n\t\t\t\tvar props = Object.getOwnPropertyDescriptor(def, key);\n\t\t\t\tvar value = def[key];\n\n\t\t\t\tif(props){\n\t\t\t\t\tObject.defineProperty(def, key, {\n\t\t\t\t\t\tset: (newValue) => {\n\t\t\t\t\t\t\tvalue = newValue;\n\n\t\t\t\t\t\t\tif(!this.defWatcherBlock){\n\t\t\t\t\t\t\t\tthis.save(\"columns\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(props.set){\n\t\t\t\t\t\t\t\tprops.set(newValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tget:() => {\n\t\t\t\t\t\t\tif(props.get){\n\t\t\t\t\t\t\t\tprops.get();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.defWatcherBlock = false;\n\t\t}\n\t}\n\n\t//load saved definitions\n\tload(type, current){\n\t\tvar data = this.retrieveData(type);\n\n\t\tif(current){\n\t\t\tdata = data ? this.mergeDefinition(current, data) : current;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t//retrieve data from memory\n\tretrieveData(type){\n\t\treturn this.readFunc ? this.readFunc(this.id, type) : false;\n\t}\n\n\t//merge old and new column definitions\n\tmergeDefinition(oldCols, newCols){\n\t\tvar output = [];\n\n\t\tnewCols = newCols || [];\n\n\t\tnewCols.forEach((column, to) => {\n\t\t\tvar from = this._findColumn(oldCols, column),\n\t\t\tkeys;\n\n\t\t\tif(from){\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\n\t\t\t\t\tkeys = Object.keys(from);\n\t\t\t\t\tkeys.push(\"width\");\n\t\t\t\t}else{\n\t\t\t\t\tkeys = this.config.columns;\n\t\t\t\t}\n\n\t\t\t\tkeys.forEach((key)=>{\n\t\t\t\t\tif(key !== \"columns\" && typeof column[key] !== \"undefined\"){\n\t\t\t\t\t\tfrom[key] = column[key];\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(from.columns){\n\t\t\t\t\tfrom.columns = this.mergeDefinition(from.columns, column.columns);\n\t\t\t\t}\n\n\t\t\t\toutput.push(from);\n\t\t\t}\n\t\t});\n\n\t\toldCols.forEach((column, i) => {\n\t\t\tvar from = this._findColumn(newCols, column);\n\n\t\t\tif (!from) {\n\t\t\t\tif(output.length>i){\n\t\t\t\t\toutput.splice(i, 0, column);\n\t\t\t\t}else{\n\t\t\t\t\toutput.push(column);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n\n\t//find matching columns\n\t_findColumn(columns, subject){\n\t\tvar type = subject.columns ? \"group\" : (subject.field ? \"field\" : \"object\");\n\n\t\treturn columns.find(function(col){\n\t\t\tswitch(type){\n\t\t\t\tcase \"group\":\n\t\t\t\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\n\n\t\t\t\tcase \"field\":\n\t\t\t\t\treturn col.field === subject.field;\n\n\t\t\t\tcase \"object\":\n\t\t\t\t\treturn col === subject;\n\t\t\t}\n\t\t});\n\t}\n\n\t//save data\n\tsave(type){\n\t\tvar data = {};\n\n\t\tswitch(type){\n\t\t\tcase \"columns\":\n\t\t\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\n\t\t\t\tbreak;\n\n\t\t\tcase \"filter\":\n\t\t\t\tdata = this.table.modules.filter.getFilters();\n\t\t\t\tbreak;\n\n\t\t\tcase \"sort\":\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\n\t\t\t\tbreak;\n\n\t\t\tcase \"group\":\n\t\t\t\tdata = this.getGroupConfig();\n\t\t\t\tbreak;\n\n\t\t\tcase \"page\":\n\t\t\t\tdata = this.getPageConfig();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(this.writeFunc){\n\t\t\tthis.writeFunc(this.id, type, data);\n\t\t}\n\n\t}\n\n\t//ensure sorters contain no function data\n\tvalidateSorters(data){\n\t\tdata.forEach(function(item){\n\t\t\titem.column = item.field;\n\t\t\tdelete item.field;\n\t\t});\n\n\t\treturn data;\n\t}\n\n\tgetGroupConfig(){\n\t\tvar data = {};\n\n\t\tif(this.config.group){\n\t\t\tif(this.config.group === true || this.config.group.groupBy){\n\t\t\t\tdata.groupBy = this.table.options.groupBy;\n\t\t\t}\n\n\t\t\tif(this.config.group === true || this.config.group.groupStartOpen){\n\t\t\t\tdata.groupStartOpen = this.table.options.groupStartOpen;\n\t\t\t}\n\n\t\t\tif(this.config.group === true || this.config.group.groupHeader){\n\t\t\t\tdata.groupHeader = this.table.options.groupHeader;\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tgetPageConfig(){\n\t\tvar data = {};\n\n\t\tif(this.config.page){\n\t\t\tif(this.config.page === true || this.config.page.size){\n\t\t\t\tdata.paginationSize = this.table.modules.page.getPageSize();\n\t\t\t}\n\n\t\t\tif(this.config.page === true || this.config.page.page){\n\t\t\t\tdata.paginationInitialPage = this.table.modules.page.getPage();\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\n\t//parse columns for data to store\n\tparseColumns(columns){\n\t\tvar definitions = [],\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\n\n\t\tcolumns.forEach((column) => {\n\t\t\tvar defStore = {},\n\t\t\tcolDef = column.getDefinition(),\n\t\t\tkeys;\n\n\t\t\tif(column.isGroup){\n\t\t\t\tdefStore.title = colDef.title;\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\n\t\t\t}else{\n\t\t\t\tdefStore.field = column.getField();\n\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\n\t\t\t\t\tkeys = Object.keys(colDef);\n\t\t\t\t\tkeys.push(\"width\");\n\t\t\t\t\tkeys.push(\"visible\");\n\t\t\t\t}else{\n\t\t\t\t\tkeys = this.config.columns;\n\t\t\t\t}\n\n\t\t\t\tkeys.forEach((key)=>{\n\t\t\t\t\tswitch(key){\n\t\t\t\t\t\tcase \"width\":\n\t\t\t\t\t\t\tdefStore.width = column.getWidth();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"visible\":\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdefinitions.push(defStore);\n\t\t});\n\n\t\treturn definitions;\n\t}\n}\n\nPersistence.moduleName = \"persistence\";\n\nPersistence.moduleInitOrder = -10;\n\n//load defaults\nPersistence.readers = defaultReaders;\nPersistence.writers = defaultWriters;\n\nexport default Persistence;","import Module from '../../core/Module.js';\n\nclass Popup extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.columnSubscribers = {};\n\t\t\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\n\t\t\n\t\tthis.registerColumnOption(\"headerContextPopup\");\n\t\tthis.registerColumnOption(\"headerClickPopup\");\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\n\t\tthis.registerColumnOption(\"headerPopup\");\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\n\t\tthis.registerColumnOption(\"contextPopup\");\n\t\tthis.registerColumnOption(\"clickPopup\");\n\t\tthis.registerColumnOption(\"dblClickPopup\");\n\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\n\t\t\n\t}\n\t\n\tinitialize(){\n\t\tthis.initializeRowWatchers();\n\t\tthis.initializeGroupWatchers();\n\t\t\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t}\n\n\t_componentPopupCall(component, contents, position){\n\t\tthis.loadPopupEvent(contents, null, component, position);\n\t}\n\t\n\tinitializeRowWatchers(){\n\t\tif(this.table.options.rowContextPopup){\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\n\t\t}\n\t\t\n\t\tif(this.table.options.rowClickPopup){\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\n\t\t}\n\n\t\tif(this.table.options.rowDblClickPopup){\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\n\t\t}\n\t}\n\t\n\tinitializeGroupWatchers(){\n\t\tif(this.table.options.groupContextPopup){\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\n\t\t}\n\t\t\n\t\tif(this.table.options.groupClickPopup){\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\n\t\t}\n\n\t\tif(this.table.options.groupDblClickPopup){\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\n\t\t}\n\t}\n\t\n\tinitializeColumn(column){\n\t\tvar def = column.definition;\n\t\t\n\t\t//handle column events\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\n\t\t}\n\t\t\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\n\t\t\n\t\t\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\n\t\t}\n\t\t\n\t\tif(def.headerPopup){\n\t\t\tthis.initializeColumnHeaderPopup(column);\n\t\t}\n\t\t\n\t\t//handle cell events\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\n\t\t}\n\t\t\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\n\t\t}\n\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\n\t\t}\n\t}\n\t\n\tinitializeColumnHeaderPopup(column){\n\t\tvar icon = column.definition.headerPopupIcon,\n\t\theaderPopupEl;\n\t\t\n\t\theaderPopupEl = document.createElement(\"span\");\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\n\n\t\tif(icon){\n\t\t\tif(typeof icon === \"function\"){\n\t\t\t\ticon = icon(column.getComponent());\n\t\t\t}\n\n\t\t\tif(icon instanceof HTMLElement){\n\t\t\t\theaderPopupEl.appendChild(icon);\n\t\t\t}else{\n\t\t\t\theaderPopupEl.innerHTML = icon;\n\t\t\t}\n\t\t}else{\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\n\t\t}\n\t\t\n\t\theaderPopupEl.addEventListener(\"click\", (e) => {\n\t\t\te.stopPropagation();\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tthis.loadPopupEvent(column.definition.headerPopup, e, column);\n\t\t});\n\t\t\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\n\t}\n\t\n\tloadPopupTableCellEvent(option, e, cell){\n\t\tif(cell._cell){\n\t\t\tcell = cell._cell;\n\t\t}\n\t\t\n\t\tif(cell.column.definition[option]){\n\t\t\tthis.loadPopupEvent(cell.column.definition[option], e, cell);\n\t\t}\n\t}\n\t\n\tloadPopupTableColumnEvent(option, e, column){\n\t\tif(column._column){\n\t\t\tcolumn = column._column;\n\t\t}\n\t\t\n\t\tif(column.definition[option]){\n\t\t\tthis.loadPopupEvent(column.definition[option], e, column);\n\t\t}\n\t}\n\t\n\tloadPopupEvent(contents, e, component, position){\n\t\tvar renderedCallback;\n\n\t\tfunction onRendered(callback){\n\t\t\trenderedCallback = callback;\n\t\t}\n\t\t\n\t\tif(component._group){\n\t\t\tcomponent = component._group;\n\t\t}else if(component._row){\n\t\t\tcomponent = component._row;\n\t\t}\n\t\t\n\t\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\n\t\t\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\n\t}\n\t\n\tloadPopup(e, component, contents, renderedCallback, position){\n\t\tvar touch = !(e instanceof MouseEvent),\n\t\tcontentsEl, popup;\n\t\t\n\t\tif(contents instanceof HTMLElement){\n\t\t\tcontentsEl = contents;\n\t\t}else{\n\t\t\tcontentsEl = document.createElement(\"div\");\n\t\t\tcontentsEl.innerHTML = contents;\n\t\t}\n\t\t\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\n\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tif(!touch){\n\t\t\te.preventDefault();\n\t\t}\n\t\t\n\t\tpopup = this.popup(contentsEl);\n\n\t\tif(typeof renderedCallback === \"function\"){\n\t\t\tpopup.renderCallback(renderedCallback);\n\t\t}\n\n\t\tif(e){\n\t\t\tpopup.show(e);\n\t\t}else{\n\t\t\tpopup.show(component.getElement(), position || \"center\");\n\t\t}\n\n\t\t\n\t\tpopup.hideOnBlur(() => {\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\n\t\t});\n\n\n\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\n\t}\n}\n\nPopup.moduleName = \"popup\";\n\nexport default Popup;\n","import Module from '../../core/Module.js';\n\nclass Print extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.element = false;\n\t\tthis.manualBlock = false;\n\t\tthis.beforeprintEventHandler = null;\n\t\tthis.afterprintEventHandler = null;\n\n\t\tthis.registerTableOption(\"printAsHtml\", false); //enable print as html\n\t\tthis.registerTableOption(\"printFormatter\", false); //printing page formatter\n\t\tthis.registerTableOption(\"printHeader\", false); //page header contents\n\t\tthis.registerTableOption(\"printFooter\", false); //page footer contents\n\t\tthis.registerTableOption(\"printStyled\", true); //enable print as html styling\n\t\tthis.registerTableOption(\"printRowRange\", \"visible\"); //restrict print to visible rows only\n\t\tthis.registerTableOption(\"printConfig\", {}); //print config options\n\n\t\tthis.registerColumnOption(\"print\");\n\t\tthis.registerColumnOption(\"titlePrint\");\n\t}\n\n\tinitialize(){\n\t\tif(this.table.options.printAsHtml){\n\t\t\tthis.beforeprintEventHandler = this.replaceTable.bind(this);\n\t\t\tthis.afterprintEventHandler = this.cleanup.bind(this);\n\n\t\t\twindow.addEventListener(\"beforeprint\", this.beforeprintEventHandler );\n\t\t\twindow.addEventListener(\"afterprint\", this.afterprintEventHandler);\n\t\t\tthis.subscribe(\"table-destroy\", this.destroy.bind(this));\n\t\t}\n\n\t\tthis.registerTableFunction(\"print\", this.printFullscreen.bind(this));\n\t}\n\n\tdestroy(){\n\t\tif(this.table.options.printAsHtml){\n\t\t\twindow.removeEventListener( \"beforeprint\", this.beforeprintEventHandler );\n\t\t\twindow.removeEventListener( \"afterprint\", this.afterprintEventHandler );\n\t\t}\n\t}\n\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\n\treplaceTable(){\n\t\tif(!this.manualBlock){\n\t\t\tthis.element = document.createElement(\"div\");\n\t\t\tthis.element.classList.add(\"tabulator-print-table\");\n\n\t\t\tthis.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, \"print\"));\n\n\t\t\tthis.table.element.style.display = \"none\";\n\n\t\t\tthis.table.element.parentNode.insertBefore(this.element, this.table.element);\n\t\t}\n\t}\n\n\tcleanup(){\n\t\tdocument.body.classList.remove(\"tabulator-print-fullscreen-hide\");\n\n\t\tif(this.element && this.element.parentNode){\n\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t\tthis.table.element.style.display = \"\";\n\t\t}\n\t}\n\n\tprintFullscreen(visible, style, config){\n\t\tvar scrollX = window.scrollX,\n\t\tscrollY = window.scrollY,\n\t\theaderEl = document.createElement(\"div\"),\n\t\tfooterEl = document.createElement(\"div\"),\n\t\ttableEl = this.table.modules.export.generateTable(typeof config != \"undefined\" ? config : this.table.options.printConfig, typeof style != \"undefined\" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, \"print\"),\n\t\theaderContent, footerContent;\n\n\t\tthis.manualBlock = true;\n\n\t\tthis.element = document.createElement(\"div\");\n\t\tthis.element.classList.add(\"tabulator-print-fullscreen\");\n\n\t\tif(this.table.options.printHeader){\n\t\t\theaderEl.classList.add(\"tabulator-print-header\");\n\n\t\t\theaderContent = typeof this.table.options.printHeader == \"function\" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader;\n\n\t\t\tif(typeof headerContent == \"string\"){\n\t\t\t\theaderEl.innerHTML = headerContent;\n\t\t\t}else{\n\t\t\t\theaderEl.appendChild(headerContent);\n\t\t\t}\n\n\t\t\tthis.element.appendChild(headerEl);\n\t\t}\n\n\t\tthis.element.appendChild(tableEl);\n\n\t\tif(this.table.options.printFooter){\n\t\t\tfooterEl.classList.add(\"tabulator-print-footer\");\n\n\t\t\tfooterContent = typeof this.table.options.printFooter == \"function\" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter;\n\n\n\t\t\tif(typeof footerContent == \"string\"){\n\t\t\t\tfooterEl.innerHTML = footerContent;\n\t\t\t}else{\n\t\t\t\tfooterEl.appendChild(footerContent);\n\t\t\t}\n\n\t\t\tthis.element.appendChild(footerEl);\n\t\t}\n\n\t\tdocument.body.classList.add(\"tabulator-print-fullscreen-hide\");\n\t\tdocument.body.appendChild(this.element);\n\n\t\tif(this.table.options.printFormatter){\n\t\t\tthis.table.options.printFormatter(this.element, tableEl);\n\t\t}\n\n\t\twindow.print();\n\n\t\tthis.cleanup();\n\n\t\twindow.scrollTo(scrollX, scrollY);\n\n\t\tthis.manualBlock = false;\n\t}\n}\n\nPrint.moduleName = \"print\";\n\nexport default Print;","import Module from '../../core/Module.js';\n\nclass ReactiveData extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.data = false;\n\t\tthis.blocked = false; //block reactivity while performing update\n\t\tthis.origFuncs = {}; // hold original data array functions to allow replacement after data is done with\n\t\tthis.currentVersion = 0;\n\t\t\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\n\t}\n\t\n\tinitialize(){\n\t\tif(this.table.options.reactiveData){\n\t\t\tthis.subscribe(\"cell-value-save-before\", this.block.bind(this, \"cellsave\"));\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\n\t\t\tthis.subscribe(\"row-data-init-after\", this.watchRow.bind(this));\n\t\t\tthis.subscribe(\"data-processing\", this.watchData.bind(this));\n\t\t\tthis.subscribe(\"table-destroy\", this.unwatchData.bind(this));\n\t\t}\n\t}\n\t\n\twatchData(data){\n\t\tvar self = this,\n\t\tversion;\n\t\t\n\t\tthis.currentVersion ++;\n\t\t\n\t\tversion = this.currentVersion;\n\t\t\n\t\tthis.unwatchData();\n\t\t\n\t\tthis.data = data;\n\t\t\n\t\t//override array push function\n\t\tthis.origFuncs.push = data.push;\n\t\t\n\t\tObject.defineProperty(this.data, \"push\", {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\tvalue: function(){\n\t\t\t\tvar args = Array.from(arguments),\n\t\t\t\tresult;\n\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\n\t\t\t\t\tself.block(\"data-push\");\n\n\t\t\t\t\targs.forEach((arg) => {\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, false);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\n\t\t\t\t\t\n\t\t\t\t\tself.unblock(\"data-push\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t\n\t\t//override array unshift function\n\t\tthis.origFuncs.unshift = data.unshift;\n\t\t\n\t\tObject.defineProperty(this.data, \"unshift\", {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\tvalue: function(){\n\t\t\t\tvar args = Array.from(arguments),\n\t\t\t\tresult;\n\t\t\t\t\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\n\t\t\t\t\tself.block(\"data-unshift\");\n\t\t\t\t\t\n\t\t\t\t\targs.forEach((arg) => {\n\t\t\t\t\t\tself.table.rowManager.addRowActual(arg, true);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\n\t\t\t\t\t\n\t\t\t\t\tself.unblock(\"data-unshift\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//override array shift function\n\t\tthis.origFuncs.shift = data.shift;\n\t\t\n\t\tObject.defineProperty(this.data, \"shift\", {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\tvalue: function(){\n\t\t\t\tvar row, result;\n\t\t\t\t\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\n\t\t\t\t\tself.block(\"data-shift\");\n\t\t\t\t\t\n\t\t\t\t\tif(self.data.length){\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[0]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(row){\n\t\t\t\t\t\t\trow.deleteActual();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\n\n\t\t\t\t\tself.unblock(\"data-shift\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t\n\t\t//override array pop function\n\t\tthis.origFuncs.pop = data.pop;\n\t\t\n\t\tObject.defineProperty(this.data, \"pop\", {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\tvalue: function(){\n\t\t\t\tvar row, result;\n\t\t\t\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\n\t\t\t\t\tself.block(\"data-pop\");\n\t\t\t\t\t\n\t\t\t\t\tif(self.data.length){\n\t\t\t\t\t\trow = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(row){\n\t\t\t\t\t\t\trow.deleteActual();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\n\t\t\t\t\t\n\t\t\t\t\tself.unblock(\"data-pop\");\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//override array splice function\n\t\tthis.origFuncs.splice = data.splice;\n\t\t\n\t\tObject.defineProperty(this.data, \"splice\", {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\tvalue: function(){\n\t\t\t\tvar args = Array.from(arguments),\n\t\t\t\tstart = args[0] < 0 ? data.length + args[0] : args[0],\n\t\t\t\tend = args[1],\n\t\t\t\tnewRows = args[2] ? args.slice(2) : false,\n\t\t\t\tstartRow, result;\n\t\t\t\t\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\n\t\t\t\t\tself.block(\"data-splice\");\n\t\t\t\t\t//add new rows\n\t\t\t\t\tif(newRows){\n\t\t\t\t\t\tstartRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(startRow){\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, startRow, true);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tnewRows = newRows.slice().reverse();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewRows.forEach((rowData) => {\n\t\t\t\t\t\t\t\tself.table.rowManager.addRowActual(rowData, true, false, true);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//delete removed rows\n\t\t\t\t\tif(end !== 0){\n\t\t\t\t\t\tvar oldRows = data.slice(start, typeof args[1] === \"undefined\" ? args[1] : start + end);\n\t\t\t\t\t\t\n\t\t\t\t\t\toldRows.forEach((rowData, i) => {\n\t\t\t\t\t\t\tvar row = self.table.rowManager.getRowFromDataObject(rowData);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(row){\n\t\t\t\t\t\t\t\trow.deleteActual(i !== oldRows.length - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(newRows || end !== 0){\n\t\t\t\t\t\tself.table.rowManager.reRenderInPosition();\n\t\t\t\t\t}\n\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\n\t\t\t\t\t\n\t\t\t\t\tself.unblock(\"data-splice\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result ;\n\t\t\t}\n\t\t});\n\t}\n\t\n\tunwatchData(){\n\t\tif(this.data !== false){\n\t\t\tfor(var key in this.origFuncs){\n\t\t\t\tObject.defineProperty(this.data, key, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable:true,\n\t\t\t\t\twritable:true,\n\t\t\t\t\tvalue: this.origFuncs.key,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\t\n\twatchRow(row){\n\t\tvar data = row.getData();\n\t\t\n\t\tfor(var key in data){\n\t\t\tthis.watchKey(row, data, key);\n\t\t}\n\t\t\n\t\tif(this.table.options.dataTree){\n\t\t\tthis.watchTreeChildren(row);\n\t\t}\n\t}\n\t\n\twatchTreeChildren (row){\n\t\tvar self = this,\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\n\t\torigFuncs = {};\n\t\t\n\t\tif(childField){\n\t\t\t\n\t\t\torigFuncs.push = childField.push;\n\t\t\t\n\t\t\tObject.defineProperty(childField, \"push\", {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: () => {\n\t\t\t\t\tif(!self.blocked){\n\t\t\t\t\t\tself.block(\"tree-push\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\n\t\t\t\t\t\tthis.rebuildTree(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.unblock(\"tree-push\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\torigFuncs.unshift = childField.unshift;\n\t\t\t\n\t\t\tObject.defineProperty(childField, \"unshift\", {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: () => {\n\t\t\t\t\tif(!self.blocked){\n\t\t\t\t\t\tself.block(\"tree-unshift\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\n\t\t\t\t\t\tthis.rebuildTree(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\torigFuncs.shift = childField.shift;\n\t\t\t\n\t\t\tObject.defineProperty(childField, \"shift\", {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: () => {\n\t\t\t\t\tif(!self.blocked){\n\t\t\t\t\t\tself.block(\"tree-shift\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\n\t\t\t\t\t\tthis.rebuildTree(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\torigFuncs.pop = childField.pop;\n\t\t\t\n\t\t\tObject.defineProperty(childField, \"pop\", {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: () => {\n\t\t\t\t\tif(!self.blocked){\n\t\t\t\t\t\tself.block(\"tree-pop\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\n\t\t\t\t\t\tthis.rebuildTree(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\torigFuncs.splice = childField.splice;\n\t\t\t\n\t\t\tObject.defineProperty(childField, \"splice\", {\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: () => {\n\t\t\t\t\tif(!self.blocked){\n\t\t\t\t\t\tself.block(\"tree-splice\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\n\t\t\t\t\t\tthis.rebuildTree(row);\n\t\t\t\t\t\t\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t\n\trebuildTree(row){\n\t\tthis.table.modules.dataTree.initializeRow(row);\n\t\tthis.table.modules.dataTree.layoutRow(row);\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\n\t}\n\t\n\twatchKey(row, data, key){\n\t\tvar self = this,\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\n\t\tvalue = data[key],\n\t\tversion = this.currentVersion;\n\t\t\n\t\tObject.defineProperty(data, key, {\n\t\t\tset: (newValue) => {\n\t\t\t\tvalue = newValue;\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\n\t\t\t\t\tself.block(\"key\");\n\t\t\t\t\t\n\t\t\t\t\tvar update = {};\n\t\t\t\t\tupdate[key] = newValue;\n\t\t\t\t\trow.updateData(update);\n\t\t\t\t\t\n\t\t\t\t\tself.unblock(\"key\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(props.set){\n\t\t\t\t\tprops.set(newValue);\n\t\t\t\t}\n\t\t\t},\n\t\t\tget:() => {\n\t\t\t\t\n\t\t\t\tif(props.get){\n\t\t\t\t\tprops.get();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn value;\n\t\t\t}\n\t\t});\n\t}\n\t\n\tunwatchRow(row){\n\t\tvar data = row.getData();\n\t\t\n\t\tfor(var key in data){\n\t\t\tObject.defineProperty(data, key, {\n\t\t\t\tvalue:data[key],\n\t\t\t});\n\t\t}\n\t}\n\t\n\tblock(key){\n\t\tif(!this.blocked){\n\t\t\tthis.blocked = key;\n\t\t}\n\t}\n\t\n\tunblock(key){\n\t\tif(this.blocked === key){\n\t\t\tthis.blocked = false;\n\t\t}\n\t}\n}\n\nReactiveData.moduleName = \"reactiveData\";\n\nexport default ReactiveData;\n\n\n\n","import Module from '../../core/Module.js';\n\nclass ResizeColumns extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.startColumn = false;\n\t\tthis.startX = false;\n\t\tthis.startWidth = false;\n\t\tthis.latestX = false;\n\t\tthis.handle = null;\n\t\tthis.initialNextColumn = null;\n\t\tthis.nextColumn = null;\n\t\t\n\t\tthis.initialized = false;\n\t\tthis.registerColumnOption(\"resizable\", true);\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\n\t}\n\t\n\tinitialize(){\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\n\t}\n\t\n\tinitializeEventWatchers(){\n\t\tif(!this.initialized){\n\t\t\t\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\n\t\t\t\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\n\t\t\t\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\t\n\t\n\tlayoutCellHandles(cell){\n\t\tif(cell.row.type === \"row\"){\n\t\t\tthis.deInitializeComponent(cell);\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\n\t\t}\n\t}\n\t\n\tlayoutColumnHeader(column){\n\t\tif(column.definition.resizable){\n\t\t\tthis.initializeEventWatchers();\n\t\t\tthis.deInitializeComponent(column);\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\n\t\t}\n\t}\n\t\n\tcolumnLayoutUpdated(column){\n\t\tvar prev = column.prevColumn();\n\t\t\n\t\tthis.reinitializeColumn(column);\n\t\t\n\t\tif(prev){\n\t\t\tthis.reinitializeColumn(prev);\n\t\t}\n\t}\n\t\n\tcolumnWidthUpdated(column){\n\t\tif(column.modules.frozen){\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\n\t\t\t\t\tthis.reinitializeColumn(col);\n\t\t\t\t});\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\n\t\t\t\t\tthis.reinitializeColumn(col);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfrozenColumnOffset(column){\n\t\tvar offset = false;\n\n\t\tif(column.modules.frozen){\n\t\t\toffset = column.modules.frozen.marginValue; \n\n\t\t\tif(column.modules.frozen.position === \"left\"){\n\t\t\t\toffset += column.getWidth() - 3;\n\t\t\t}else{\n\t\t\t\tif(offset){\n\t\t\t\t\toffset -= 3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn offset !== false ? offset + \"px\" : false;\n\t}\n\t\n\treinitializeColumn(column){\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\n\t\t\n\t\tcolumn.cells.forEach((cell) => {\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\n\t\t\t\tif(frozenOffset){\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\n\t\t\tif(frozenOffset){\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\n\t\t}\n\t}\n\t\n\tinitializeColumn(type, component, column, element){\n\t\tvar self = this,\n\t\tvariableHeight = false,\n\t\tmode = column.definition.resizable,\n\t\tconfig = {},\n\t\tnearestColumn = column.getLastColumn();\n\t\t\n\t\t//set column resize mode\n\t\tif(type === \"header\"){\n\t\t\tvariableHeight = column.definition.formatter == \"textarea\" || column.definition.variableHeight;\n\t\t\tconfig = {variableHeight:variableHeight};\n\t\t}\n\t\t\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\n\t\t\t\n\t\t\tvar handle = document.createElement('span');\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\n\t\t\t\n\t\t\thandle.addEventListener(\"click\", function(e){\n\t\t\t\te.stopPropagation();\n\t\t\t});\n\t\t\t\n\t\t\tvar handleDown = function(e){\n\t\t\t\tself.startColumn = column;\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\n\t\t\t};\n\t\t\t\n\t\t\thandle.addEventListener(\"mousedown\", handleDown);\n\t\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\n\t\t\t\n\t\t\t//resize column on double click\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\n\t\t\t\t\n\t\t\t\te.stopPropagation();\n\t\t\t\tnearestColumn.reinitializeWidth(true);\n\t\t\t\t\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif(column.modules.frozen){\n\t\t\t\thandle.style.position = \"sticky\";\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\n\t\t\t}\n\t\t\t\n\t\t\tconfig.handleEl = handle;\n\t\t\t\n\t\t\tif(element.parentNode && column.visible){\n\t\t\t\telement.after(handle);\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomponent.modules.resize = config;\n\t}\n\t\n\tdeInitializeColumn(column){\n\t\tthis.deInitializeComponent(column);\n\t\t\n\t\tcolumn.cells.forEach((cell) => {\n\t\t\tthis.deInitializeComponent(cell);\n\t\t});\n\t}\n\t\n\tdeInitializeComponent(component){\n\t\tvar handleEl;\n\t\t\n\t\tif(component.modules.resize){\n\t\t\thandleEl = component.modules.resize.handleEl;\n\t\t\t\n\t\t\tif(handleEl && handleEl.parentElement){\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tresizeHandle(component, height){\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\n\t\t}\n\t}\n\t\n\t_checkResizability(column){\n\t\treturn column.definition.resizable;\n\t}\n\t\n\t_mouseDown(e, column, handle){\n\t\tvar self = this;\n\t\t\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\n\t\t\n\t\tfunction mouseMove(e){\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\n\t\t\tstartDiff = x - self.startX,\n\t\t\tmoveDiff = x - self.latestX,\n\t\t\tblockedBefore, blockedAfter;\n\t\t\t\n\t\t\tself.latestX = x;\n\t\t\t\n\t\t\tif(self.table.rtl){\n\t\t\t\tstartDiff = -startDiff;\n\t\t\t\tmoveDiff = -moveDiff;\n\t\t\t}\n\t\t\t\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\n\t\t\t\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\n\t\t\t\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\n\t\t\t\n\t\t\tif(moveDiff < 0){\n\t\t\t\tself.nextColumn = self.initialNextColumn;\n\t\t\t}\n\t\t\t\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\n\t\t\t\t\n\t\t\t\tif(moveDiff > 0){\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(self.nextColumn){\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tself.table.columnManager.rerenderColumns(true);\n\t\t\t\n\t\t\tif(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\n\t\t\t\tcolumn.checkCellHeights();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction mouseUp(e){\n\t\t\t\n\t\t\t//block editor from taking action while resizing is taking place\n\t\t\tif(self.startColumn.modules.edit){\n\t\t\t\tself.startColumn.modules.edit.blocked = false;\n\t\t\t}\n\t\t\t\n\t\t\tif(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){\n\t\t\t\tcolumn.checkCellHeights();\n\t\t\t}\n\t\t\t\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseUp);\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\n\t\t\t\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\n\t\t\t\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\n\t\t\t\n\t\t\tif(self.startWidth !== column.getWidth()){\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\n\n\t\t\t\tself.dispatch(\"column-resized\", column);\n\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", column.getComponent());\n\t\t\t}\n\t\t}\n\t\t\n\t\te.stopPropagation(); //prevent resize from interfering with movable columns\n\t\t\n\t\t//block editor from taking action while resizing is taking place\n\t\tif(self.startColumn.modules.edit){\n\t\t\tself.startColumn.modules.edit.blocked = true;\n\t\t}\n\t\t\n\t\tself.startX = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX;\n\t\tself.latestX = self.startX;\n\t\tself.startWidth = column.getWidth();\n\t\t\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\n\t\thandle.addEventListener(\"touchend\", mouseUp);\n\t}\n}\n\nResizeColumns.moduleName = \"resizeColumns\";\n\nexport default ResizeColumns;","import Module from '../../core/Module.js';\n\nclass ResizeRows extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.startColumn = false;\n\t\tthis.startY = false;\n\t\tthis.startHeight = false;\n\t\tthis.handle = null;\n\t\tthis.prevHandle = null;\n\n\t\tthis.registerTableOption(\"resizableRows\", false); //resizable rows\n\t}\n\n\tinitialize(){\n\t\tif(this.table.options.resizableRows){\n\t\t\tthis.subscribe(\"row-layout-after\", this.initializeRow.bind(this));\n\t\t}\n\t}\n\n\tinitializeRow(row){\n\t\tvar self = this,\n\t\trowEl = row.getElement();\n\n\t\tvar handle = document.createElement('div');\n\t\thandle.className = \"tabulator-row-resize-handle\";\n\n\t\tvar prevHandle = document.createElement('div');\n\t\tprevHandle.className = \"tabulator-row-resize-handle prev\";\n\n\t\thandle.addEventListener(\"click\", function(e){\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tvar handleDown = function(e){\n\t\t\tself.startRow = row;\n\t\t\tself._mouseDown(e, row, handle);\n\t\t};\n\n\t\thandle.addEventListener(\"mousedown\", handleDown);\n\t\thandle.addEventListener(\"touchstart\", handleDown, {passive: true});\n\n\t\tprevHandle.addEventListener(\"click\", function(e){\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tvar prevHandleDown = function(e){\n\t\t\tvar prevRow = self.table.rowManager.prevDisplayRow(row);\n\n\t\t\tif(prevRow){\n\t\t\t\tself.startRow = prevRow;\n\t\t\t\tself._mouseDown(e, prevRow, prevHandle);\n\t\t\t}\n\t\t};\n\n\t\tprevHandle.addEventListener(\"mousedown\",prevHandleDown);\n\t\tprevHandle.addEventListener(\"touchstart\",prevHandleDown, {passive: true});\n\n\t\trowEl.appendChild(handle);\n\t\trowEl.appendChild(prevHandle);\n\t}\n\n\t_mouseDown(e, row, handle){\n\t\tvar self = this;\n\n\t\tself.table.element.classList.add(\"tabulator-block-select\");\n\n\t\tfunction mouseMove(e){\n\t\t\trow.setHeight(self.startHeight + ((typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY) - self.startY));\n\t\t}\n\n\t\tfunction mouseUp(e){\n\n\t\t\t// //block editor from taking action while resizing is taking place\n\t\t\t// if(self.startColumn.modules.edit){\n\t\t\t// \tself.startColumn.modules.edit.blocked = false;\n\t\t\t// }\n\n\t\t\tdocument.body.removeEventListener(\"mouseup\", mouseMove);\n\t\t\tdocument.body.removeEventListener(\"mousemove\", mouseMove);\n\n\t\t\thandle.removeEventListener(\"touchmove\", mouseMove);\n\t\t\thandle.removeEventListener(\"touchend\", mouseUp);\n\n\t\t\tself.table.element.classList.remove(\"tabulator-block-select\");\n\n\t\t\tself.dispatchExternal(\"rowResized\", row.getComponent());\n\t\t}\n\n\t\te.stopPropagation(); //prevent resize from interfering with movable columns\n\n\t\t//block editor from taking action while resizing is taking place\n\t\t// if(self.startColumn.modules.edit){\n\t\t// \tself.startColumn.modules.edit.blocked = true;\n\t\t// }\n\n\t\tself.startY = typeof e.screenY === \"undefined\" ? e.touches[0].screenY : e.screenY;\n\t\tself.startHeight = row.getHeight();\n\n\t\tdocument.body.addEventListener(\"mousemove\", mouseMove);\n\t\tdocument.body.addEventListener(\"mouseup\", mouseUp);\n\n\t\thandle.addEventListener(\"touchmove\", mouseMove, {passive: true});\n\t\thandle.addEventListener(\"touchend\", mouseUp);\n\t}\n}\n\nResizeRows.moduleName = \"resizeRows\";\n\nexport default ResizeRows;","import Module from '../../core/Module.js';\n\nclass ResizeTable extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.binding = false;\n\t\tthis.visibilityObserver = false;\n\t\tthis.resizeObserver = false;\n\t\tthis.containerObserver = false;\n\t\t\n\t\tthis.tableHeight = 0;\n\t\tthis.tableWidth = 0;\n\t\tthis.containerHeight = 0;\n\t\tthis.containerWidth = 0;\n\t\t\n\t\tthis.autoResize = false;\n\t\t\n\t\tthis.visible = false;\n\t\t\n\t\tthis.initialized = false;\n\t\tthis.initialRedraw = false;\n\t\t\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\n\t}\n\t\n\tinitialize(){\n\t\tif(this.table.options.autoResize){\n\t\t\tvar table = this.table,\n\t\t\ttableStyle;\n\t\t\t\n\t\t\tthis.tableHeight = table.element.clientHeight;\n\t\t\tthis.tableWidth = table.element.clientWidth;\n\t\t\t\n\t\t\tif(table.element.parentNode){\n\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\n\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\n\t\t\t}\n\t\t\t\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\n\t\t\t\t\n\t\t\t\tthis.initializeVisibilityObserver();\n\t\t\t\t\n\t\t\t\tthis.autoResize = true;\n\t\t\t\t\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\n\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(this.tableHeight != nodeHeight || this.tableWidth != nodeWidth){\n\t\t\t\t\t\t\tthis.tableHeight = nodeHeight;\n\t\t\t\t\t\t\tthis.tableWidth = nodeWidth;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(table.element.parentNode){\n\t\t\t\t\t\t\t\tthis.containerHeight = table.element.parentNode.clientHeight;\n\t\t\t\t\t\t\t\tthis.containerWidth = table.element.parentNode.clientWidth;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.redrawTable();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.resizeObserver.observe(table.element);\n\t\t\t\t\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\n\t\t\t\t\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\n\t\t\t\t\t\n\t\t\t\t\tthis.containerObserver = new ResizeObserver((entry) => {\n\t\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar nodeHeight = Math.floor(entry[0].contentRect.height);\n\t\t\t\t\t\t\tvar nodeWidth = Math.floor(entry[0].contentRect.width);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(this.containerHeight != nodeHeight || this.containerWidth != nodeWidth){\n\t\t\t\t\t\t\t\tthis.containerHeight = nodeHeight;\n\t\t\t\t\t\t\t\tthis.containerWidth = nodeWidth;\n\t\t\t\t\t\t\t\tthis.tableHeight = table.element.clientHeight;\n\t\t\t\t\t\t\t\tthis.tableWidth = table.element.clientWidth;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.redrawTable();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.containerObserver.observe(this.table.element.parentNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tthis.binding = function(){\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile && !table.modules.edit.currentCell)){\n\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\n\t\t\t\t\t\ttable.redraw();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\n\t\t\t}\n\t\t\t\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\n\t\t}\n\t}\n\t\n\tinitializeVisibilityObserver(){\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\n\t\t\tthis.visible = entries[0].isIntersecting;\n\t\t\t\n\t\t\tif(!this.initialized){\n\t\t\t\tthis.initialized = true;\n\t\t\t\tthis.initialRedraw = !this.visible;\n\t\t\t}else{\n\t\t\t\tif(this.visible){\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\n\t\t\t\t\tthis.initialRedraw = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.visibilityObserver.observe(this.table.element);\n\t}\n\t\n\tredrawTable(force){\n\t\tif(this.initialized && this.visible){\n\t\t\tthis.table.columnManager.rerenderColumns(true);\n\t\t\tthis.table.redraw(force);\n\t\t}\n\t}\n\t\n\ttableResized(){\n\t\tthis.table.rowManager.redraw();\n\t}\n\t\n\tclearBindings(){\n\t\tif(this.binding){\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\n\t\t}\n\t\t\n\t\tif(this.resizeObserver){\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\n\t\t}\n\t\t\n\t\tif(this.visibilityObserver){\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\n\t\t}\n\t\t\n\t\tif(this.containerObserver){\n\t\t\tthis.containerObserver.unobserve(this.table.element.parentNode);\n\t\t}\n\t}\n}\n\nResizeTable.moduleName = \"resizeTable\";\n\nexport default ResizeTable;","import Module from '../../core/Module.js';\n\nclass ResponsiveLayout extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.columns = [];\n\t\tthis.hiddenColumns = [];\n\t\tthis.mode = \"\";\n\t\tthis.index = 0;\n\t\tthis.collapseFormatter = [];\n\t\tthis.collapseStartOpen = true;\n\t\tthis.collapseHandleColumn = false;\n\n\t\tthis.registerTableOption(\"responsiveLayout\", false); //responsive layout flags\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseStartOpen\", true); //start showing collapsed data\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseUseFormatters\", true); //responsive layout collapse formatter\n\t\tthis.registerTableOption(\"responsiveLayoutCollapseFormatter\", false); //responsive layout collapse formatter\n\n\t\tthis.registerColumnOption(\"responsive\");\n\t}\n\n\t//generate responsive columns list\n\tinitialize(){\n\t\tif(this.table.options.responsiveLayout){\n\t\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\n\t\t\tthis.subscribe(\"column-show\", this.updateColumnVisibility.bind(this));\n\t\t\tthis.subscribe(\"column-hide\", this.updateColumnVisibility.bind(this));\n\t\t\tthis.subscribe(\"columns-loaded\", this.initializeResponsivity.bind(this));\n\t\t\tthis.subscribe(\"column-moved\", this.initializeResponsivity.bind(this));\n\t\t\tthis.subscribe(\"column-add\", this.initializeResponsivity.bind(this));\n\t\t\tthis.subscribe(\"column-delete\", this.initializeResponsivity.bind(this));\n\n\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedraw.bind(this));\n\t\t\t\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\n\t\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\n\t\t\t\tthis.subscribe(\"row-layout\", this.layoutRow.bind(this));\n\t\t\t}\n\t\t}\n\t}\n\n\ttableRedraw(force){\n\t\tif([\"fitColumns\", \"fitDataStretch\"].indexOf(this.layoutMode()) === -1){\n\t\t\tif(!force){\n\t\t\t\tthis.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tinitializeResponsivity(){\n\t\tvar columns = [];\n\n\t\tthis.mode = this.table.options.responsiveLayout;\n\t\tthis.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;\n\t\tthis.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen;\n\t\tthis.hiddenColumns = [];\n\n\t\t//determine level of responsivity for each column\n\t\tthis.table.columnManager.columnsByIndex.forEach((column, i) => {\n\t\t\tif(column.modules.responsive){\n\t\t\t\tif(column.modules.responsive.order && column.modules.responsive.visible){\n\t\t\t\t\tcolumn.modules.responsive.index = i;\n\t\t\t\t\tcolumns.push(column);\n\n\t\t\t\t\tif(!column.visible && this.mode === \"collapse\"){\n\t\t\t\t\t\tthis.hiddenColumns.push(column);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t//sort list by responsivity\n\t\tcolumns = columns.reverse();\n\t\tcolumns = columns.sort((a, b) => {\n\t\t\tvar diff = b.modules.responsive.order - a.modules.responsive.order;\n\t\t\treturn diff || (b.modules.responsive.index - a.modules.responsive.index);\n\t\t});\n\n\t\tthis.columns = columns;\n\n\t\tif(this.mode === \"collapse\"){\n\t\t\tthis.generateCollapsedContent();\n\t\t}\n\n\t\t//assign collapse column\n\t\tfor (let col of this.table.columnManager.columnsByIndex){\n\t\t\tif(col.definition.formatter == \"responsiveCollapse\"){\n\t\t\t\tthis.collapseHandleColumn = col;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(this.collapseHandleColumn){\n\t\t\tif(this.hiddenColumns.length){\n\t\t\t\tthis.collapseHandleColumn.show();\n\t\t\t}else{\n\t\t\t\tthis.collapseHandleColumn.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t//define layout information\n\tinitializeColumn(column){\n\t\tvar def = column.getDefinition();\n\n\t\tcolumn.modules.responsive = {order: typeof def.responsive === \"undefined\" ? 1 : def.responsive, visible:def.visible === false ? false : true};\n\t}\n\n\tinitializeRow(row){\n\t\tvar el;\n\n\t\tif(row.type !== \"calc\"){\n\t\t\tel = document.createElement(\"div\");\n\t\t\tel.classList.add(\"tabulator-responsive-collapse\");\n\n\t\t\trow.modules.responsiveLayout = {\n\t\t\t\telement:el,\n\t\t\t\topen:this.collapseStartOpen,\n\t\t\t};\n\n\t\t\tif(!this.collapseStartOpen){\n\t\t\t\tel.style.display = 'none';\n\t\t\t}\n\t\t}\n\t}\n\n\tlayoutRow(row){\n\t\tvar rowEl = row.getElement();\n\n\t\tif(row.modules.responsiveLayout){\n\t\t\trowEl.appendChild(row.modules.responsiveLayout.element);\n\t\t\tthis.generateCollapsedRowContent(row);\n\t\t}\n\t}\n\n\t//update column visibility\n\tupdateColumnVisibility(column, responsiveToggle){\n\t\tif(!responsiveToggle && column.modules.responsive){\n\t\t\tcolumn.modules.responsive.visible = column.visible;\n\t\t\tthis.initializeResponsivity();\n\t\t}\n\t}\n\n\thideColumn(column){\n\t\tvar colCount = this.hiddenColumns.length;\n\n\t\tcolumn.hide(false, true);\n\n\t\tif(this.mode === \"collapse\"){\n\t\t\tthis.hiddenColumns.unshift(column);\n\t\t\tthis.generateCollapsedContent();\n\n\t\t\tif(this.collapseHandleColumn && !colCount){\n\t\t\t\tthis.collapseHandleColumn.show();\n\t\t\t}\n\t\t}\n\t}\n\n\tshowColumn(column){\n\t\tvar index;\n\n\t\tcolumn.show(false, true);\n\t\t//set column width to prevent calculation loops on uninitialized columns\n\t\tcolumn.setWidth(column.getWidth());\n\n\t\tif(this.mode === \"collapse\"){\n\t\t\tindex = this.hiddenColumns.indexOf(column);\n\n\t\t\tif(index > -1){\n\t\t\t\tthis.hiddenColumns.splice(index, 1);\n\t\t\t}\n\n\t\t\tthis.generateCollapsedContent();\n\n\t\t\tif(this.collapseHandleColumn && !this.hiddenColumns.length){\n\t\t\t\tthis.collapseHandleColumn.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t//redraw columns to fit space\n\tupdate(){\n\t\tvar working = true;\n\n\t\twhile(working){\n\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\n\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.table.element.clientWidth) - width;\n\n\t\t\tif(diff < 0){\n\t\t\t\t//table is too wide\n\t\t\t\tlet column = this.columns[this.index];\n\n\t\t\t\tif(column){\n\t\t\t\t\tthis.hideColumn(column);\n\t\t\t\t\tthis.index ++;\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\t//table has spare space\n\t\t\t\tlet column = this.columns[this.index -1];\n\n\t\t\t\tif(column){\n\t\t\t\t\tif(diff > 0){\n\t\t\t\t\t\tif(diff >= column.getWidth()){\n\t\t\t\t\t\t\tthis.showColumn(column);\n\t\t\t\t\t\t\tthis.index --;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tworking = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tworking = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!this.table.rowManager.activeRowsCount){\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateCollapsedContent(){\n\t\tvar rows = this.table.rowManager.getDisplayRows();\n\n\t\trows.forEach((row) => {\n\t\t\tthis.generateCollapsedRowContent(row);\n\t\t});\n\t}\n\n\tgenerateCollapsedRowContent(row){\n\t\tvar el, contents;\n\n\t\tif(row.modules.responsiveLayout){\n\t\t\tel = row.modules.responsiveLayout.element;\n\n\t\t\twhile(el.firstChild) el.removeChild(el.firstChild);\n\n\t\t\tcontents = this.collapseFormatter(this.generateCollapsedRowData(row));\n\t\t\tif(contents){\n\t\t\t\tel.appendChild(contents);\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateCollapsedRowData(row){\n\t\tvar data = row.getData(),\n\t\toutput = [],\n\t\tmockCellComponent;\n\n\t\tthis.hiddenColumns.forEach((column) => {\n\t\t\tvar value = column.getFieldValue(data);\n\n\t\t\tif(column.definition.title && column.field){\n\t\t\t\tif(column.modules.format && this.table.options.responsiveLayoutCollapseUseFormatters){\n\n\t\t\t\t\tmockCellComponent = {\n\t\t\t\t\t\tvalue:false,\n\t\t\t\t\t\tdata:{},\n\t\t\t\t\t\tgetValue:function(){\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetData:function(){\n\t\t\t\t\t\t\treturn data;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetElement:function(){\n\t\t\t\t\t\t\treturn document.createElement(\"div\");\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetRow:function(){\n\t\t\t\t\t\t\treturn row.getComponent();\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetColumn:function(){\n\t\t\t\t\t\t\treturn column.getComponent();\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetTable:() => {\n\t\t\t\t\t\t\treturn this.table;\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\t\tfunction onRendered(callback){\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push({\n\t\t\t\t\t\tfield: column.field,\n\t\t\t\t\t\ttitle: column.definition.title,\n\t\t\t\t\t\tvalue: column.modules.format.formatter.call(this.table.modules.format, mockCellComponent, column.modules.format.params, onRendered)\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\toutput.push({\n\t\t\t\t\t\tfield: column.field,\n\t\t\t\t\t\ttitle: column.definition.title,\n\t\t\t\t\t\tvalue: value\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tformatCollapsedData(data){\n\t\tvar list = document.createElement(\"table\");\n\n\t\tdata.forEach(function(item){\n\t\t\tvar row = document.createElement(\"tr\");\n\t\t\tvar titleData = document.createElement(\"td\");\n\t\t\tvar valueData = document.createElement(\"td\");\n\t\t\tvar node_content;\n\n\t\t\tvar titleHighlight = document.createElement(\"strong\");\n\t\t\ttitleData.appendChild(titleHighlight);\n\t\t\tthis.langBind(\"columns|\" + item.field, function(text){\n\t\t\t\ttitleHighlight.innerHTML = text || item.title;\n\t\t\t});\n\n\t\t\tif(item.value instanceof Node){\n\t\t\t\tnode_content = document.createElement(\"div\");\n\t\t\t\tnode_content.appendChild(item.value);\n\t\t\t\tvalueData.appendChild(node_content);\n\t\t\t}else{\n\t\t\t\tvalueData.innerHTML = item.value;\n\t\t\t}\n\n\t\t\trow.appendChild(titleData);\n\t\t\trow.appendChild(valueData);\n\t\t\tlist.appendChild(row);\n\t\t}, this);\n\n\t\treturn Object.keys(data).length ? list : \"\";\n\t}\n}\n\nResponsiveLayout.moduleName = \"responsiveLayout\";\n\nexport default ResponsiveLayout;\n","import Module from '../../core/Module.js';\n\nclass SelectRow extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.selecting = false; //flag selecting in progress\n\t\tthis.lastClickedRow = false; //last clicked row\n\t\tthis.selectPrev = []; //hold previously selected element for drag drop selection\n\t\tthis.selectedRows = []; //hold selected rows\n\t\tthis.headerCheckboxElement = null; // hold header select element\n\t\t\n\t\tthis.registerTableOption(\"selectable\", \"highlight\"); //highlight rows on hover\n\t\tthis.registerTableOption(\"selectableRangeMode\", \"drag\"); //highlight rows on hover\n\t\tthis.registerTableOption(\"selectableRollingSelection\", true); //roll selection once maximum number of selectable rows is reached\n\t\tthis.registerTableOption(\"selectablePersistence\", true); // maintain selection when table view is updated\n\t\tthis.registerTableOption(\"selectableCheck\", function(data, row){return true;}); //check whether row is selectable\n\t\t\n\t\tthis.registerTableFunction(\"selectRow\", this.selectRows.bind(this));\n\t\tthis.registerTableFunction(\"deselectRow\", this.deselectRows.bind(this));\n\t\tthis.registerTableFunction(\"toggleSelectRow\", this.toggleRow.bind(this));\n\t\tthis.registerTableFunction(\"getSelectedRows\", this.getSelectedRows.bind(this));\n\t\tthis.registerTableFunction(\"getSelectedData\", this.getSelectedData.bind(this));\n\t\t\n\t\t//register component functions\n\t\tthis.registerComponentFunction(\"row\", \"select\", this.selectRows.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"deselect\", this.deselectRows.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"toggleSelect\", this.toggleRow.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"isSelected\", this.isRowSelected.bind(this));\n\t}\n\t\n\tinitialize(){\n\t\tif(this.table.options.selectable !== false){\n\t\t\tthis.subscribe(\"row-init\", this.initializeRow.bind(this));\n\t\t\tthis.subscribe(\"row-deleting\", this.rowDeleted.bind(this));\n\t\t\tthis.subscribe(\"rows-wipe\", this.clearSelectionData.bind(this));\n\t\t\tthis.subscribe(\"rows-retrieve\", this.rowRetrieve.bind(this));\n\t\t\t\n\t\t\tif(this.table.options.selectable && !this.table.options.selectablePersistence){\n\t\t\t\tthis.subscribe(\"data-refreshing\", this.deselectRows.bind(this));\n\t\t\t}\n\t\t}\n\t}\n\t\n\trowRetrieve(type, prevValue){\n\t\treturn type === \"selected\" ? this.selectedRows : prevValue;\n\t}\n\t\n\trowDeleted(row){\n\t\tthis._deselectRow(row, true);\n\t}\n\t\n\tclearSelectionData(silent){\n\t\tvar prevSelected = this.selectedRows.length;\n\n\t\tthis.selecting = false;\n\t\tthis.lastClickedRow = false;\n\t\tthis.selectPrev = [];\n\t\tthis.selectedRows = [];\n\t\t\n\t\tif(prevSelected && silent !== true){\n\t\t\tthis._rowSelectionChanged();\n\t\t}\n\t}\n\t\n\tinitializeRow(row){\n\t\tvar self = this,\n\t\telement = row.getElement();\n\t\t\n\t\t// trigger end of row selection\n\t\tvar endSelect = function(){\n\t\t\t\n\t\t\tsetTimeout(function(){\n\t\t\t\tself.selecting = false;\n\t\t\t}, 50);\n\t\t\t\n\t\t\tdocument.body.removeEventListener(\"mouseup\", endSelect);\n\t\t};\n\t\t\n\t\trow.modules.select = {selected:false};\n\t\t\n\t\t//set row selection class\n\t\tif(self.checkRowSelectability(row)){\n\t\t\telement.classList.add(\"tabulator-selectable\");\n\t\t\telement.classList.remove(\"tabulator-unselectable\");\n\t\t\t\n\t\t\tif(self.table.options.selectable && self.table.options.selectable != \"highlight\"){\n\t\t\t\tif(self.table.options.selectableRangeMode === \"click\"){\n\t\t\t\t\telement.addEventListener(\"click\", this.handleComplexRowClick.bind(this, row));\n\t\t\t\t}else{\n\t\t\t\t\telement.addEventListener(\"click\", function(e){\n\t\t\t\t\t\tif(!self.table.modExists(\"edit\") || !self.table.modules.edit.getCurrentCell()){\n\t\t\t\t\t\t\tself.table._clearSelection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!self.selecting){\n\t\t\t\t\t\t\tself.toggleRow(row);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\telement.addEventListener(\"mousedown\", function(e){\n\t\t\t\t\t\tif(e.shiftKey){\n\t\t\t\t\t\t\tself.table._clearSelection();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself.selecting = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself.selectPrev = [];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"mouseup\", endSelect);\n\t\t\t\t\t\t\tdocument.body.addEventListener(\"keyup\", endSelect);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself.toggleRow(row);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\telement.addEventListener(\"mouseenter\", function(e){\n\t\t\t\t\t\tif(self.selecting){\n\t\t\t\t\t\t\tself.table._clearSelection();\n\t\t\t\t\t\t\tself.toggleRow(row);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(self.selectPrev[1] == row){\n\t\t\t\t\t\t\t\tself.toggleRow(self.selectPrev[0]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\telement.addEventListener(\"mouseout\", function(e){\n\t\t\t\t\t\tif(self.selecting){\n\t\t\t\t\t\t\tself.table._clearSelection();\n\t\t\t\t\t\t\tself.selectPrev.unshift(row);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\telement.classList.add(\"tabulator-unselectable\");\n\t\t\telement.classList.remove(\"tabulator-selectable\");\n\t\t}\n\t}\n\t\n\thandleComplexRowClick(row, e){\n\t\tif(e.shiftKey){\n\t\t\tthis.table._clearSelection();\n\t\t\tthis.lastClickedRow = this.lastClickedRow || row;\n\t\t\t\n\t\t\tvar lastClickedRowIdx = this.table.rowManager.getDisplayRowIndex(this.lastClickedRow);\n\t\t\tvar rowIdx = this.table.rowManager.getDisplayRowIndex(row);\n\t\t\t\n\t\t\tvar fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx;\n\t\t\tvar toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx;\n\t\t\t\n\t\t\tvar rows = this.table.rowManager.getDisplayRows().slice(0);\n\t\t\tvar toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1);\n\t\t\t\n\t\t\tif(e.ctrlKey || e.metaKey){\n\t\t\t\ttoggledRows.forEach((toggledRow)=>{\n\t\t\t\t\tif(toggledRow !== this.lastClickedRow){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(this.table.options.selectable !== true && !this.isRowSelected(row)){\n\t\t\t\t\t\t\tif(this.selectedRows.length < this.table.options.selectable){\n\t\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthis.toggleRow(toggledRow);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.lastClickedRow = row;\n\t\t\t}else{\n\t\t\t\tthis.deselectRows(undefined, true);\n\t\t\t\t\n\t\t\t\tif(this.table.options.selectable !== true){\n\t\t\t\t\tif(toggledRows.length > this.table.options.selectable){\n\t\t\t\t\t\ttoggledRows = toggledRows.slice(0, this.table.options.selectable);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.selectRows(toggledRows);\n\t\t\t}\n\t\t\tthis.table._clearSelection();\n\t\t}\n\t\telse if(e.ctrlKey || e.metaKey){\n\t\t\tthis.toggleRow(row);\n\t\t\tthis.lastClickedRow = row;\n\t\t}else{\n\t\t\tthis.deselectRows(undefined, true);\n\t\t\tthis.selectRows(row);\n\t\t\tthis.lastClickedRow = row;\n\t\t}\n\t}\n\n\tcheckRowSelectability(row){\n\t\tif(row.type === \"row\"){\n\t\t\treturn this.table.options.selectableCheck.call(this.table, row.getComponent());\n\t\t}\n\n\t\treturn false;\n\t}\n\t\n\t//toggle row selection\n\ttoggleRow(row){\n\t\tif(this.checkRowSelectability(row)){\n\t\t\tif(row.modules.select && row.modules.select.selected){\n\t\t\t\tthis._deselectRow(row);\n\t\t\t}else{\n\t\t\t\tthis._selectRow(row);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//select a number of rows\n\tselectRows(rows){\n\t\tvar rowMatch;\n\t\t\n\t\tswitch(typeof rows){\n\t\t\tcase \"undefined\":\n\t\t\t\tthis.table.rowManager.rows.forEach((row) => {\n\t\t\t\t\tthis._selectRow(row, true, true);\n\t\t\t\t});\n\t\t\t\n\t\t\t\tthis._rowSelectionChanged();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"string\":\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\n\t\t\t\n\t\t\t\tif(rowMatch){\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\n\t\t\t\t\tthis._rowSelectionChanged();\n\t\t\t\t}else{\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\n\t\t\t\t\t\n\t\t\t\t\trowMatch.forEach((row) => {\n\t\t\t\t\t\tthis._selectRow(row, true, true);\n\t\t\t\t\t});\n\n\t\t\t\t\tif(rowMatch.length){\n\t\t\t\t\t\tthis._rowSelectionChanged();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tif(Array.isArray(rows)){\n\t\t\t\t\trows.forEach((row) => {\n\t\t\t\t\t\tthis._selectRow(row, true, true);\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\tthis._rowSelectionChanged();\n\t\t\t\t}else{\n\t\t\t\t\tthis._selectRow(rows, false, true);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t//select an individual row\n\t_selectRow(rowInfo, silent, force){\n\t\t//handle max row count\n\t\tif(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){\n\t\t\tif(this.selectedRows.length >= this.table.options.selectable){\n\t\t\t\tif(this.table.options.selectableRollingSelection){\n\t\t\t\t\tthis._deselectRow(this.selectedRows[0]);\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar row = this.table.rowManager.findRow(rowInfo);\n\t\t\n\t\tif(row){\n\t\t\tif(this.selectedRows.indexOf(row) == -1){\n\t\t\t\trow.getElement().classList.add(\"tabulator-selected\");\n\t\t\t\tif(!row.modules.select){\n\t\t\t\t\trow.modules.select = {};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trow.modules.select.selected = true;\n\t\t\t\tif(row.modules.select.checkboxEl){\n\t\t\t\t\trow.modules.select.checkboxEl.checked = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.selectedRows.push(row);\n\t\t\t\t\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\n\t\t\t\t\tthis.childRowSelection(row, true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.dispatchExternal(\"rowSelected\", row.getComponent());\n\t\t\t\t\n\t\t\t\tthis._rowSelectionChanged(silent);\n\t\t\t}\n\t\t}else{\n\t\t\tif(!silent){\n\t\t\t\tconsole.warn(\"Selection Error - No such row found, ignoring selection:\" + rowInfo);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tisRowSelected(row){\n\t\treturn this.selectedRows.indexOf(row) !== -1;\n\t}\n\t\n\t//deselect a number of rows\n\tdeselectRows(rows, silent){\n\t\tvar self = this,\n\t\trowCount;\n\t\t\n\t\tif(typeof rows == \"undefined\"){\n\t\t\t\n\t\t\trowCount = self.selectedRows.length;\n\t\t\t\n\t\t\tfor(let i = 0; i < rowCount; i++){\n\t\t\t\tself._deselectRow(self.selectedRows[0], true);\n\t\t\t}\n\t\t\t\n\t\t\tif(rowCount){\n\t\t\t\tself._rowSelectionChanged(silent);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\tif(Array.isArray(rows)){\n\t\t\t\trows.forEach(function(row){\n\t\t\t\t\tself._deselectRow(row, true);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tself._rowSelectionChanged(silent);\n\t\t\t}else{\n\t\t\t\tself._deselectRow(rows, silent);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//deselect an individual row\n\t_deselectRow(rowInfo, silent){\n\t\tvar self = this,\n\t\trow = self.table.rowManager.findRow(rowInfo),\n\t\tindex;\n\t\t\n\t\tif(row){\n\t\t\tindex = self.selectedRows.findIndex(function(selectedRow){\n\t\t\t\treturn selectedRow == row;\n\t\t\t});\n\t\t\t\n\t\t\tif(index > -1){\n\t\t\t\t\n\t\t\t\trow.getElement().classList.remove(\"tabulator-selected\");\n\t\t\t\tif(!row.modules.select){\n\t\t\t\t\trow.modules.select = {};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trow.modules.select.selected = false;\n\t\t\t\tif(row.modules.select.checkboxEl){\n\t\t\t\t\trow.modules.select.checkboxEl.checked = false;\n\t\t\t\t}\n\t\t\t\tself.selectedRows.splice(index, 1);\n\t\t\t\t\n\t\t\t\tif(this.table.options.dataTreeSelectPropagate){\n\t\t\t\t\tthis.childRowSelection(row, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.dispatchExternal(\"rowDeselected\", row.getComponent());\n\t\t\t\t\n\t\t\t\tself._rowSelectionChanged(silent);\n\t\t\t}\n\t\t}else{\n\t\t\tif(!silent){\n\t\t\t\tconsole.warn(\"Deselection Error - No such row found, ignoring selection:\" + rowInfo);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tgetSelectedData(){\n\t\tvar data = [];\n\t\t\n\t\tthis.selectedRows.forEach(function(row){\n\t\t\tdata.push(row.getData());\n\t\t});\n\t\t\n\t\treturn data;\n\t}\n\t\n\tgetSelectedRows(){\n\t\t\n\t\tvar rows = [];\n\t\t\n\t\tthis.selectedRows.forEach(function(row){\n\t\t\trows.push(row.getComponent());\n\t\t});\n\t\t\n\t\treturn rows;\n\t}\n\t\n\t_rowSelectionChanged(silent){\n\t\tif(this.headerCheckboxElement){\n\t\t\tif(this.selectedRows.length === 0){\n\t\t\t\tthis.headerCheckboxElement.checked = false;\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\n\t\t\t} else if(this.table.rowManager.rows.length === this.selectedRows.length){\n\t\t\t\tthis.headerCheckboxElement.checked = true;\n\t\t\t\tthis.headerCheckboxElement.indeterminate = false;\n\t\t\t} else {\n\t\t\t\tthis.headerCheckboxElement.indeterminate = true;\n\t\t\t\tthis.headerCheckboxElement.checked = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!silent){\n\t\t\tthis.dispatchExternal(\"rowSelectionChanged\", this.getSelectedData(), this.getSelectedRows());\n\t\t}\n\t}\n\t\n\tregisterRowSelectCheckbox (row, element) {\n\t\tif(!row._row.modules.select){\n\t\t\trow._row.modules.select = {};\n\t\t}\n\t\t\n\t\trow._row.modules.select.checkboxEl = element;\n\t}\n\t\n\tregisterHeaderSelectCheckbox (element) {\n\t\tthis.headerCheckboxElement = element;\n\t}\n\t\n\tchildRowSelection(row, select){\n\t\tvar children = this.table.modules.dataTree.getChildren(row, true);\n\t\t\n\t\tif(select){\n\t\t\tfor(let child of children){\n\t\t\t\tthis._selectRow(child, true);\n\t\t\t}\n\t\t}else{\n\t\t\tfor(let child of children){\n\t\t\t\tthis._deselectRow(child, true);\n\t\t\t}\n\t\t}\n\t}\n}\n\nSelectRow.moduleName = \"selectRow\";\n\nexport default SelectRow;","//sort datetime\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar DT = window.DateTime || luxon.DateTime;\n\tvar format = params.format || \"dd/MM/yyyy HH:mm:ss\",\n\talignEmptyValues = params.alignEmptyValues,\n\temptyAlign = 0;\n\n\tif(typeof DT != \"undefined\"){\n\t\tif(!DT.isDateTime(a)){\n\t\t\tif(format === \"iso\"){\n\t\t\t\ta = DT.fromISO(String(a));\n\t\t\t}else{\n\t\t\t\ta = DT.fromFormat(String(a), format);\n\t\t\t}\n\t\t}\n\n\t\tif(!DT.isDateTime(b)){\n\t\t\tif(format === \"iso\"){\n\t\t\t\tb = DT.fromISO(String(b));\n\t\t\t}else{\n\t\t\t\tb = DT.fromFormat(String(b), format);\n\t\t\t}\n\t\t}\n\n\t\tif(!a.isValid){\n\t\t\temptyAlign = !b.isValid ? 0 : -1;\n\t\t}else if(!b.isValid){\n\t\t\temptyAlign = 1;\n\t\t}else{\n\t\t\t//compare valid values\n\t\t\treturn a - b;\n\t\t}\n\n\t\t//fix empty values in position\n\t\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\n\t\t\temptyAlign *= -1;\n\t\t}\n\n\t\treturn emptyAlign;\n\n\t}else{\n\t\tconsole.error(\"Sort Error - 'datetime' sorter is dependant on luxon.js\");\n\t}\n}","import number from './sorters/number.js';\nimport string from './sorters/string.js';\nimport date from './sorters/date.js';\nimport time from './sorters/time.js';\nimport datetime from './sorters/datetime.js';\nimport boolean from './sorters/boolean.js';\nimport array from './sorters/array.js';\nimport exists from './sorters/exists.js';\nimport alphanum from './sorters/alphanum.js';\n\nexport default {\n\tnumber:number,\n\tstring:string,\n\tdate:date,\n\ttime:time,\n\tdatetime:datetime,\n\tboolean:boolean,\n\tarray:array,\n\texists:exists,\n\talphanum:alphanum\n};","//sort numbers\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar alignEmptyValues = params.alignEmptyValues;\n\tvar decimal = params.decimalSeparator;\n\tvar thousand = params.thousandSeparator;\n\tvar emptyAlign = 0;\n\n\ta = String(a);\n\tb = String(b);\n\n\tif(thousand){\n\t\ta = a.split(thousand).join(\"\");\n\t\tb = b.split(thousand).join(\"\");\n\t}\n\n\tif(decimal){\n\t\ta = a.split(decimal).join(\".\");\n\t\tb = b.split(decimal).join(\".\");\n\t}\n\n\ta = parseFloat(a);\n\tb = parseFloat(b);\n\n\t//handle non numeric values\n\tif(isNaN(a)){\n\t\temptyAlign = isNaN(b) ? 0 : -1;\n\t}else if(isNaN(b)){\n\t\temptyAlign = 1;\n\t}else{\n\t\t//compare valid values\n\t\treturn a - b;\n\t}\n\n\t//fix empty values in position\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\n\t\temptyAlign *= -1;\n\t}\n\n\treturn emptyAlign;\n}","//sort strings\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar alignEmptyValues = params.alignEmptyValues;\n\tvar emptyAlign = 0;\n\tvar locale;\n\n\t//handle empty values\n\tif(!a){\n\t\temptyAlign = !b ? 0 : -1;\n\t}else if(!b){\n\t\temptyAlign = 1;\n\t}else{\n\t\t//compare valid values\n\t\tswitch(typeof params.locale){\n\t\t\tcase \"boolean\":\n\t\t\t\tif(params.locale){\n\t\t\t\t\tlocale = this.langLocale();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"string\":\n\t\t\t\tlocale = params.locale;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale);\n\t}\n\n\t//fix empty values in position\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\n\t\temptyAlign *= -1;\n\t}\n\n\treturn emptyAlign;\n}","import datetime from './datetime.js';\n\n//sort date\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tif(!params.format){\n\t\tparams.format = \"dd/MM/yyyy\";\n\t}\n\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\n}","import datetime from './datetime.js';\n\n//sort times\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tif(!params.format){\n\t\tparams.format = \"HH:mm\";\n\t}\n\n\treturn datetime.call(this, a, b, aRow, bRow, column, dir, params);\n}","//sort booleans\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar el1 = a === true || a === \"true\" || a === \"True\" || a === 1 ? 1 : 0;\n\tvar el2 = b === true || b === \"true\" || b === \"True\" || b === 1 ? 1 : 0;\n\n\treturn el1 - el2;\n}","//sort if element contains any data\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar type = params.type || \"length\",\n\talignEmptyValues = params.alignEmptyValues,\n\temptyAlign = 0;\n\n\tfunction calc(value){\n\t\tvar result;\n\n\t\tswitch(type){\n\t\t\tcase \"length\":\n\t\t\t\tresult = value.length;\n\t\t\t\tbreak;\n\n\t\t\tcase \"sum\":\n\t\t\t\tresult = value.reduce(function(c, d){\n\t\t\t\t\treturn c + d;\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"max\":\n\t\t\t\tresult = Math.max.apply(null, value) ;\n\t\t\t\tbreak;\n\n\t\t\tcase \"min\":\n\t\t\t\tresult = Math.min.apply(null, value) ;\n\t\t\t\tbreak;\n\n\t\t\tcase \"avg\":\n\t\t\t\tresult = value.reduce(function(c, d){\n\t\t\t\t\treturn c + d;\n\t\t\t\t}) / value.length;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t//handle non array values\n\tif(!Array.isArray(a)){\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\n\t}else if(!Array.isArray(b)){\n\t\temptyAlign = 1;\n\t}else{\n\t\treturn calc(b) - calc(a);\n\t}\n\n\t//fix empty values in position\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\n\t\temptyAlign *= -1;\n\t}\n\n\treturn emptyAlign;\n}","//sort if element contains any data\nexport default function(a, b, aRow, bRow, column, dir, params){\n\tvar el1 = typeof a == \"undefined\" ? 0 : 1;\n\tvar el2 = typeof b == \"undefined\" ? 0 : 1;\n\n\treturn el1 - el2;\n}","//sort alpha numeric strings\nexport default function(as, bs, aRow, bRow, column, dir, params){\n\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\n\tvar alignEmptyValues = params.alignEmptyValues;\n\tvar emptyAlign = 0;\n\n\t//handle empty values\n\tif(!as && as!== 0){\n\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\n\t}else if(!bs && bs!== 0){\n\t\temptyAlign = 1;\n\t}else{\n\n\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\n\t\ta = String(as).toLowerCase();\n\t\tb = String(bs).toLowerCase();\n\t\tif(a === b) return 0;\n\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\n\t\ta = a.match(rx);\n\t\tb = b.match(rx);\n\t\tL = a.length > b.length ? b.length : a.length;\n\t\twhile(i < L){\n\t\t\ta1= a[i];\n\t\t\tb1= b[i++];\n\t\t\tif(a1 !== b1){\n\t\t\t\tif(isFinite(a1) && isFinite(b1)){\n\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\n\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\n\t\t\t\t\treturn a1 - b1;\n\t\t\t\t}\n\t\t\t\telse return a1 > b1 ? 1 : -1;\n\t\t\t}\n\t\t}\n\n\t\treturn a.length > b.length;\n\t}\n\n\t//fix empty values in position\n\tif((alignEmptyValues === \"top\" && dir === \"desc\") || (alignEmptyValues === \"bottom\" && dir === \"asc\")){\n\t\temptyAlign *= -1;\n\t}\n\n\treturn emptyAlign;\n}","import Module from '../../core/Module.js';\n\nimport defaultSorters from './defaults/sorters.js';\n\nclass Sort extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.sortList = []; //holder current sort\n\t\tthis.changed = false; //has the sort changed since last render\n\n\t\tthis.registerTableOption(\"sortMode\", \"local\"); //local or remote sorting\n\n\t\tthis.registerTableOption(\"initialSort\", false); //initial sorting criteria\n\t\tthis.registerTableOption(\"columnHeaderSortMulti\", true); //multiple or single column sorting\n\t\tthis.registerTableOption(\"sortOrderReverse\", false); //reverse internal sort ordering\n\t\tthis.registerTableOption(\"headerSortElement\", \"
\"); //header sort element\n\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\n\n\t\tthis.registerColumnOption(\"sorter\");\n\t\tthis.registerColumnOption(\"sorterParams\");\n\n\t\tthis.registerColumnOption(\"headerSort\", true);\n\t\tthis.registerColumnOption(\"headerSortStartingDir\");\n\t\tthis.registerColumnOption(\"headerSortTristate\");\n\n\t}\n\n\tinitialize(){\n\t\tthis.subscribe(\"column-layout\", this.initializeColumn.bind(this));\n\t\tthis.subscribe(\"table-built\", this.tableBuilt.bind(this));\n\t\tthis.registerDataHandler(this.sort.bind(this), 20);\n\n\t\tthis.registerTableFunction(\"setSort\", this.userSetSort.bind(this));\n\t\tthis.registerTableFunction(\"getSorters\", this.getSort.bind(this));\n\t\tthis.registerTableFunction(\"clearSort\", this.clearSort.bind(this));\n\n\t\tif(this.table.options.sortMode === \"remote\"){\n\t\t\tthis.subscribe(\"data-params\", this.remoteSortParams.bind(this));\n\t\t}\n\t}\n\n\ttableBuilt(){\n\t\tif(this.table.options.initialSort){\n\t\t\tthis.setSort(this.table.options.initialSort);\n\t\t}\n\t}\n\n\tremoteSortParams(data, config, silent, params){\n\t\tvar sorters = this.getSort();\n\n\t\tsorters.forEach((item) => {\n\t\t\tdelete item.column;\n\t\t});\n\n\t\tparams.sort = sorters;\n\n\t\treturn params;\n\t}\n\n\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\n\tuserSetSort(sortList, dir){\n\t\tthis.setSort(sortList, dir);\n\t\t// this.table.rowManager.sorterRefresh();\n\t\tthis.refreshSort();\n\t}\n\n\tclearSort(){\n\t\tthis.clear();\n\t\t// this.table.rowManager.sorterRefresh();\n\t\tthis.refreshSort();\n\t}\n\n\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\n\t//initialize column header for sorting\n\tinitializeColumn(column){\n\t\tvar sorter = false,\n\t\tcolEl,\n\t\tarrowEl;\n\n\t\tswitch(typeof column.definition.sorter){\n\t\t\tcase \"string\":\n\t\t\t\tif(Sort.sorters[column.definition.sorter]){\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"function\":\n\t\t\t\tsorter = column.definition.sorter;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tcolumn.modules.sort = {\n\t\t\tsorter:sorter, dir:\"none\",\n\t\t\tparams:column.definition.sorterParams || {},\n\t\t\tstartingDir:column.definition.headerSortStartingDir || \"asc\",\n\t\t\ttristate: column.definition.headerSortTristate,\n\t\t};\n\n\t\tif(column.definition.headerSort !== false){\n\n\t\t\tcolEl = column.getElement();\n\n\t\t\tcolEl.classList.add(\"tabulator-sortable\");\n\n\t\t\tarrowEl = document.createElement(\"div\");\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\n\n\t\t\tswitch(this.table.options.headerSortClickElement){\n\t\t\t\tcase \"icon\":\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"header\":\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch(this.table.options.headerSortElement){\n\t\t\t\tcase \"function\":\n\t\t\t\t\t//do nothing\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"object\":\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tarrowEl.innerHTML = this.table.options.headerSortElement;\n\t\t\t}\n\n\t\t\t//create sorter arrow\n\t\t\tcolumn.titleHolderElement.appendChild(arrowEl);\n\n\t\t\tcolumn.modules.sort.element = arrowEl;\n\n\t\t\tthis.setColumnHeaderSortIcon(column, \"none\");\n\n\t\t\t//sort on click\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).addEventListener(\"click\", (e) => {\n\t\t\t\tvar dir = \"\",\n\t\t\t\tsorters=[],\n\t\t\t\tmatch = false;\n\n\t\t\t\tif(column.modules.sort){\n\t\t\t\t\tif(column.modules.sort.tristate){\n\t\t\t\t\t\tif(column.modules.sort.dir == \"none\"){\n\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(column.modules.sort.dir == column.modules.sort.startingDir){\n\t\t\t\t\t\t\t\tdir = column.modules.sort.dir == \"asc\" ? \"desc\" : \"asc\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdir = \"none\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tswitch(column.modules.sort.dir){\n\t\t\t\t\t\t\tcase \"asc\":\n\t\t\t\t\t\t\t\tdir = \"desc\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase \"desc\":\n\t\t\t\t\t\t\t\tdir = \"asc\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tdir = column.modules.sort.startingDir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {\n\t\t\t\t\t\tsorters = this.getSort();\n\n\t\t\t\t\t\tmatch = sorters.findIndex((sorter) => {\n\t\t\t\t\t\t\treturn sorter.field === column.getField();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif(match > -1){\n\t\t\t\t\t\t\tsorters[match].dir = dir;\n\n\t\t\t\t\t\t\tmatch = sorters.splice(match, 1)[0];\n\t\t\t\t\t\t\tif(dir != \"none\"){\n\t\t\t\t\t\t\t\tsorters.push(match);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(dir != \"none\"){\n\t\t\t\t\t\t\t\tsorters.push({column:column, dir:dir});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//add to existing sort\n\t\t\t\t\t\tthis.setSort(sorters);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(dir == \"none\"){\n\t\t\t\t\t\t\tthis.clear();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//sort by column only\n\t\t\t\t\t\t\tthis.setSort(column, dir);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// this.table.rowManager.sorterRefresh(!this.sortList.length);\n\t\t\t\t\tthis.refreshSort();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\trefreshSort(){\n\t\tif(this.table.options.sortMode === \"remote\"){\n\t\t\tthis.reloadData(null, false, false);\n\t\t}else{\n\t\t\tthis.refreshData(true);\n\t\t}\n\n\t\t//TODO - Persist left position of row manager\n\t\t// left = this.scrollLeft;\n\t\t// this.scrollHorizontal(left);\n\t}\n\n\t//check if the sorters have changed since last use\n\thasChanged(){\n\t\tvar changed = this.changed;\n\t\tthis.changed = false;\n\t\treturn changed;\n\t}\n\n\t//return current sorters\n\tgetSort(){\n\t\tvar self = this,\n\t\tsorters = [];\n\n\t\tself.sortList.forEach(function(item){\n\t\t\tif(item.column){\n\t\t\t\tsorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir});\n\t\t\t}\n\t\t});\n\n\t\treturn sorters;\n\t}\n\n\t//change sort list and trigger sort\n\tsetSort(sortList, dir){\n\t\tvar self = this,\n\t\tnewSortList = [];\n\n\t\tif(!Array.isArray(sortList)){\n\t\t\tsortList = [{column: sortList, dir:dir}];\n\t\t}\n\n\t\tsortList.forEach(function(item){\n\t\t\tvar column;\n\n\t\t\tcolumn = self.table.columnManager.findColumn(item.column);\n\n\t\t\tif(column){\n\t\t\t\titem.column = column;\n\t\t\t\tnewSortList.push(item);\n\t\t\t\tself.changed = true;\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Sort Warning - Sort field does not exist and is being ignored: \", item.column);\n\t\t\t}\n\n\t\t});\n\n\t\tself.sortList = newSortList;\n\n\t\tthis.dispatch(\"sort-changed\");\n\t}\n\n\t//clear sorters\n\tclear(){\n\t\tthis.setSort([]);\n\t}\n\n\t//find appropriate sorter for column\n\tfindSorter(column){\n\t\tvar row = this.table.rowManager.activeRows[0],\n\t\tsorter = \"string\",\n\t\tfield, value;\n\n\t\tif(row){\n\t\t\trow = row.getData();\n\t\t\tfield = column.getField();\n\n\t\t\tif(field){\n\n\t\t\t\tvalue = column.getFieldValue(row);\n\n\t\t\t\tswitch(typeof value){\n\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\tsorter = \"string\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"boolean\":\n\t\t\t\t\t\tsorter = \"boolean\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\n\t\t\t\t\t\t\tsorter = \"number\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\n\t\t\t\t\t\t\t\tsorter = \"alphanum\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Sort.sorters[sorter];\n\t}\n\n\t//work through sort list sorting data\n\tsort(data){\n\t\tvar self = this,\n\t\tsortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList,\n\t\tsortListActual = [],\n\t\trowComponents = [];\n\n\t\tif(this.subscribedExternal(\"dataSorting\")){\n\t\t\tthis.dispatchExternal(\"dataSorting\", self.getSort());\n\t\t}\n\n\t\tself.clearColumnHeaders();\n\n\t\tif(this.table.options.sortMode !== \"remote\"){\n\n\t\t\t//build list of valid sorters and trigger column specific callbacks before sort begins\n\t\t\tsortList.forEach(function(item, i){\n\t\t\t\tvar sortObj;\n\n\t\t\t\tif(item.column){\n\t\t\t\t\tsortObj = item.column.modules.sort;\n\n\t\t\t\t\tif(sortObj){\n\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\n\t\t\t\t\t\tif(!sortObj.sorter){\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titem.params = typeof sortObj.params === \"function\" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;\n\n\t\t\t\t\t\tsortListActual.push(item);\n\t\t\t\t\t}\n\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//sort data\n\t\t\tif (sortListActual.length) {\n\t\t\t\tself._sortItems(data, sortListActual);\n\t\t\t}\n\n\t\t}else{\n\t\t\tsortList.forEach(function(item, i){\n\t\t\t\tself.setColumnHeader(item.column, item.dir);\n\t\t\t});\n\t\t}\n\n\t\tif(this.subscribedExternal(\"dataSorted\")){\n\t\t\tdata.forEach((row) => {\n\t\t\t\trowComponents.push(row.getComponent());\n\t\t\t});\n\n\t\t\tthis.dispatchExternal(\"dataSorted\", self.getSort(), rowComponents);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t//clear sort arrows on columns\n\tclearColumnHeaders(){\n\t\tthis.table.columnManager.getRealColumns().forEach((column) => {\n\t\t\tif(column.modules.sort){\n\t\t\t\tcolumn.modules.sort.dir = \"none\";\n\t\t\t\tcolumn.getElement().setAttribute(\"aria-sort\", \"none\");\n\t\t\t\tthis.setColumnHeaderSortIcon(column, \"none\");\n\t\t\t}\n\t\t});\n\t}\n\n\t//set the column header sort direction\n\tsetColumnHeader(column, dir){\n\t\tcolumn.modules.sort.dir = dir;\n\t\tcolumn.getElement().setAttribute(\"aria-sort\", dir === \"asc\" ? \"ascending\" : \"descending\");\n\t\tthis.setColumnHeaderSortIcon(column, dir);\n\t}\n\n\tsetColumnHeaderSortIcon(column, dir){\n\t\tvar sortEl = column.modules.sort.element,\n\t\tarrowEl;\n\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\n\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\n\t\t\t\n\t\t\tif(typeof arrowEl === \"object\"){\n\t\t\t\tsortEl.appendChild(arrowEl);\n\t\t\t}else{\n\t\t\t\tsortEl.innerHTML = arrowEl;\n\t\t\t}\n\t\t}\n\t}\n\n\t//sort each item in sort list\n\t_sortItems(data, sortList){\n\t\tvar sorterCount = sortList.length - 1;\n\n\t\tdata.sort((a, b) => {\n\t\t\tvar result;\n\n\t\t\tfor(var i = sorterCount; i>= 0; i--){\n\t\t\t\tlet sortItem = sortList[i];\n\n\t\t\t\tresult = this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);\n\n\t\t\t\tif(result !== 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t});\n\t}\n\n\t//process individual rows for a sort function on active data\n\t_sortRow(a, b, column, dir, params){\n\t\tvar el1Comp, el2Comp;\n\n\t\t//switch elements depending on search direction\n\t\tvar el1 = dir == \"asc\" ? a : b;\n\t\tvar el2 = dir == \"asc\" ? b : a;\n\n\t\ta = column.getFieldValue(el1.getData());\n\t\tb = column.getFieldValue(el2.getData());\n\n\t\ta = typeof a !== \"undefined\" ? a : \"\";\n\t\tb = typeof b !== \"undefined\" ? b : \"\";\n\n\t\tel1Comp = el1.getComponent();\n\t\tel2Comp = el2.getComponent();\n\n\t\treturn column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params);\n\t}\n}\n\nSort.moduleName = \"sort\";\n\n//load defaults\nSort.sorters = defaultSorters;\n\nexport default Sort;","import Module from '../../core/Module.js';\nimport Cell from '../../core/cell/Cell.js';\n\nclass Tooltip extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.tooltipSubscriber = null,\n\t\tthis.headerSubscriber = null,\n\t\t\n\t\tthis.timeout = null;\n\t\tthis.popupInstance = null;\n\t\t\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \n\t\t\n\t\tthis.registerColumnOption(\"tooltip\");\n\t\tthis.registerColumnOption(\"headerTooltip\");\n\t}\n\t\n\tinitialize(){\n\t\tthis.deprecatedOptionsCheck();\n\t\t\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\n\t}\n\t\n\tdeprecatedOptionsCheck(){\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\n\t}\t\n\t\n\tinitializeColumn(column){\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\n\t\t\tthis.headerSubscriber = true;\n\t\t\t\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\n\t\t}\n\t\t\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\n\t\t\tthis.tooltipSubscriber = true;\n\t\t\t\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\n\t\t}\n\t}\n\t\n\tmousemoveCheck(action, e, component){\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\n\t\t\n\t\tif(tooltip){\n\t\t\tthis.clearPopup();\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\n\t\t}\n\t}\n\n\tmouseoutCheck(action, e, component){\n\t\tif(!this.popupInstance){\n\t\t\tthis.clearPopup();\n\t\t}\n\t}\n\t\n\tclearPopup(action, e, component){\n\t\tclearTimeout(this.timeout);\n\t\tthis.timeout = null;\n\t\t\n\t\tif(this.popupInstance){\n\t\t\tthis.popupInstance.hide();\n\t\t}\n\t}\n\t\n\tloadTooltip(e, component, tooltip){\n\t\tvar contentsEl, renderedCallback, coords;\n\n\t\tfunction onRendered(callback){\n\t\t\trenderedCallback = callback;\n\t\t}\n\t\t\n\t\tif(typeof tooltip === \"function\"){\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\n\t\t}\n\t\t\n\t\tif(tooltip instanceof HTMLElement){\n\t\t\tcontentsEl = tooltip;\n\t\t}else{\n\t\t\tcontentsEl = document.createElement(\"div\");\n\t\t\t\n\t\t\tif(tooltip === true){\n\t\t\t\tif(component instanceof Cell){\n\t\t\t\t\ttooltip = component.value;\n\t\t\t\t}else{\n\t\t\t\t\tif(component.definition.field){\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\n\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\ttooltip = component.definition.title;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcontentsEl.innerHTML = tooltip;\n\t\t}\n\t\t\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\n\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\n\t\t\t\n\t\t\tthis.popupInstance = this.popup(contentsEl);\n\t\t\t\n\t\t\tif(typeof renderedCallback === \"function\"){\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\n\t\t\t}\n\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\n\t\t\t\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\n\t\t\t\tthis.popupInstance = null;\n\t\t\t});\n\t\t\t\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\n\t\t}\n\t}\n}\n\nTooltip.moduleName = \"tooltip\";\n\nexport default Tooltip;\n","export default {\n\t//is integer\n\tinteger: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\n\t\tvalue = Number(value);\n\n\t\treturn !isNaN(value) && isFinite(value) && Math.floor(value) === value;\n\t},\n\n\t//is float\n\tfloat: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tvalue = Number(value);\n\n\t\treturn !isNaN(value) && isFinite(value) && value % 1 !== 0;\n\t},\n\n\t//must be a number\n\tnumeric: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn !isNaN(value);\n\t},\n\n\t//must be a string\n\tstring: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn isNaN(value);\n\t},\n\n\t//maximum value\n\tmax: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn parseFloat(value) <= parameters;\n\t},\n\n\t//minimum value\n\tmin: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn parseFloat(value) >= parameters;\n\t},\n\n\t//starts with value\n\tstarts: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn String(value).toLowerCase().startsWith(String(parameters).toLowerCase());\n\t},\n\n\t//ends with value\n\tends: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn String(value).toLowerCase().endsWith(String(parameters).toLowerCase());\n\t},\n\n\n\t//minimum string length\n\tminLength: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn String(value).length >= parameters;\n\t},\n\n\t//maximum string length\n\tmaxLength: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn String(value).length <= parameters;\n\t},\n\n\t//in provided value list\n\tin: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(typeof parameters == \"string\"){\n\t\t\tparameters = parameters.split(\"|\");\n\t\t}\n\n\t\treturn parameters.indexOf(value) > -1;\n\t},\n\n\t//must match provided regex\n\tregex: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\tvar reg = new RegExp(parameters);\n\n\t\treturn reg.test(value);\n\t},\n\n\t//value must be unique in this column\n\tunique: function(cell, value, parameters){\n\t\tif(value === \"\" || value === null || typeof value === \"undefined\"){\n\t\t\treturn true;\n\t\t}\n\t\tvar unique = true;\n\n\t\tvar cellData = cell.getData();\n\t\tvar column = cell.getColumn()._getSelf();\n\n\t\tthis.table.rowManager.rows.forEach(function(row){\n\t\t\tvar data = row.getData();\n\n\t\t\tif(data !== cellData){\n\t\t\t\tif(value == column.getFieldValue(data)){\n\t\t\t\t\tunique = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn unique;\n\t},\n\n\t//must have a value\n\trequired:function(cell, value, parameters){\n\t\treturn value !== \"\" && value !== null && typeof value !== \"undefined\";\n\t},\n};","import Module from '../../core/Module.js';\n\nimport defaultValidators from './defaults/validators.js';\n\nclass Validate extends Module{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.invalidCells = [];\n\t\t\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\n\t\t\n\t\tthis.registerColumnOption(\"validator\");\n\t\t\n\t\tthis.registerTableFunction(\"getInvalidCells\", this.getInvalidCells.bind(this));\n\t\tthis.registerTableFunction(\"clearCellValidation\", this.userClearCellValidation.bind(this));\n\t\tthis.registerTableFunction(\"validate\", this.userValidate.bind(this));\n\t\t\n\t\tthis.registerComponentFunction(\"cell\", \"isValid\", this.cellIsValid.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"clearValidation\", this.clearValidation.bind(this));\n\t\tthis.registerComponentFunction(\"cell\", \"validate\", this.cellValidate.bind(this));\n\t\t\n\t\tthis.registerComponentFunction(\"column\", \"validate\", this.columnValidate.bind(this));\n\t\tthis.registerComponentFunction(\"row\", \"validate\", this.rowValidate.bind(this));\n\t}\n\t\n\t\n\tinitialize(){\n\t\tthis.subscribe(\"cell-delete\", this.clearValidation.bind(this));\n\t\tthis.subscribe(\"column-layout\", this.initializeColumnCheck.bind(this));\n\t\t\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Event Handling //////////\n\t///////////////////////////////////\n\t\n\teditValidate(cell, value, previousValue){\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\n\t\t\n\t\t// allow time for editor to make render changes then style cell\n\t\tif(valid !== true){\n\t\t\tsetTimeout(() => {\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn valid;\n\t}\n\t\n\teditorClear(cell, cancelled){\n\t\tif(cancelled){\n\t\t\tif(cell.column.modules.validate){\n\t\t\t\tthis.cellValidate(cell);\n\t\t\t}\n\t\t}\n\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\n\t}\n\t\n\teditedClear(cell){\n\t\tif(cell.modules.validate){\n\t\t\tcell.modules.validate.invalid = false;\n\t\t}\n\t}\n\t\n\t///////////////////////////////////\n\t////////// Cell Functions /////////\n\t///////////////////////////////////\n\t\n\tcellIsValid(cell){\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\n\t}\n\t\n\tcellValidate(cell){\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Column Functions ////////\n\t///////////////////////////////////\n\t\n\tcolumnValidate(column){\n\t\tvar invalid = [];\n\t\t\n\t\tcolumn.cells.forEach((cell) => {\n\t\t\tif(this.cellValidate(cell) !== true){\n\t\t\t\tinvalid.push(cell.getComponent());\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn invalid.length ? invalid : true;\n\t}\n\t\n\t///////////////////////////////////\n\t////////// Row Functions //////////\n\t///////////////////////////////////\n\t\n\trowValidate(row){\n\t\tvar invalid = [];\n\t\t\n\t\trow.cells.forEach((cell) => {\n\t\t\tif(this.cellValidate(cell) !== true){\n\t\t\t\tinvalid.push(cell.getComponent());\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn invalid.length ? invalid : true;\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Table Functions /////////\n\t///////////////////////////////////\n\t\n\t\n\tuserClearCellValidation(cells){\n\t\tif(!cells){\n\t\t\tcells = this.getInvalidCells();\n\t\t}\n\t\t\n\t\tif(!Array.isArray(cells)){\n\t\t\tcells = [cells];\n\t\t}\n\t\t\n\t\tcells.forEach((cell) => {\n\t\t\tthis.clearValidation(cell._getSelf());\n\t\t});\n\t}\n\t\n\tuserValidate(cells){\n\t\tvar output = [];\n\t\t\n\t\t//clear row data\n\t\tthis.table.rowManager.rows.forEach((row) => {\n\t\t\trow = row.getComponent();\n\t\t\t\n\t\t\tvar valid = row.validate();\n\t\t\t\n\t\t\tif(valid !== true){\n\t\t\t\toutput = output.concat(valid);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn output.length ? output : true;\n\t}\n\t\n\t///////////////////////////////////\n\t///////// Internal Logic //////////\n\t///////////////////////////////////\n\t\n\tinitializeColumnCheck(column){\n\t\tif(typeof column.definition.validator !== \"undefined\"){\n\t\t\tthis.initializeColumn(column);\n\t\t}\n\t}\n\t\n\t//validate\n\tinitializeColumn(column){\n\t\tvar self = this,\n\t\tconfig = [],\n\t\tvalidator;\n\t\t\n\t\tif(column.definition.validator){\n\t\t\t\n\t\t\tif(Array.isArray(column.definition.validator)){\n\t\t\t\tcolumn.definition.validator.forEach((item) => {\n\t\t\t\t\tvalidator = self._extractValidator(item);\n\t\t\t\t\t\n\t\t\t\t\tif(validator){\n\t\t\t\t\t\tconfig.push(validator);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\n\t\t\t\t\n\t\t\t\tif(validator){\n\t\t\t\t\tconfig.push(validator);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcolumn.modules.validate = config.length ? config : false;\n\t\t}\n\t}\n\t\n\t_extractValidator(value){\n\t\tvar type, params, pos;\n\t\t\n\t\tswitch(typeof value){\n\t\t\tcase \"string\":\n\t\t\t\tpos = value.indexOf(':');\n\t\t\t\n\t\t\t\tif(pos > -1){\n\t\t\t\t\ttype = value.substring(0,pos);\n\t\t\t\t\tparams = value.substring(pos+1);\n\t\t\t\t}else{\n\t\t\t\t\ttype = value;\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn this._buildValidator(type, params);\n\t\t\t\n\t\t\tcase \"function\":\n\t\t\t\treturn this._buildValidator(value);\n\t\t\t\n\t\t\tcase \"object\":\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\n\t\t}\n\t}\n\t\n\t_buildValidator(type, params){\n\t\t\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\n\t\t\n\t\tif(!func){\n\t\t\tconsole.warn(\"Validator Setup Error - No matching validator found:\", type);\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn {\n\t\t\t\ttype:typeof type == \"function\" ? \"function\" : type,\n\t\t\t\tfunc:func,\n\t\t\t\tparams:params,\n\t\t\t};\n\t\t}\n\t}\n\t\n\tvalidate(validators, cell, value){\n\t\tvar self = this,\n\t\tfailedValidators = [],\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\n\t\t\n\t\tif(validators){\n\t\t\tvalidators.forEach((item) => {\n\t\t\t\tif(!item.func.call(self, cell.getComponent(), value, item.params)){\n\t\t\t\t\tfailedValidators.push({\n\t\t\t\t\t\ttype:item.type,\n\t\t\t\t\t\tparameters:item.params\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tif(!cell.modules.validate){\n\t\t\tcell.modules.validate = {};\n\t\t}\n\t\t\n\t\tif(!failedValidators.length){\n\t\t\tcell.modules.validate.invalid = false;\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\n\t\t\t\n\t\t\tif(invalidIndex > -1){\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\n\t\t\t}\n\t\t}else{\n\t\t\tcell.modules.validate.invalid = failedValidators;\n\t\t\t\n\t\t\tif(this.table.options.validationMode !== \"manual\"){\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\n\t\t\t}\n\t\t\t\n\t\t\tif(invalidIndex == -1){\n\t\t\t\tthis.invalidCells.push(cell);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn failedValidators.length ? failedValidators : true;\n\t}\n\t\n\tgetInvalidCells(){\n\t\tvar output = [];\n\t\t\n\t\tthis.invalidCells.forEach((cell) => {\n\t\t\toutput.push(cell.getComponent());\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tclearValidation(cell){\n\t\tvar invalidIndex;\n\t\t\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\n\t\t\t\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\n\t\t\tcell.modules.validate.invalid = false;\n\t\t\t\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\n\t\t\t\n\t\t\tif(invalidIndex > -1){\n\t\t\t\tthis.invalidCells.splice(invalidIndex, 1);\n\t\t\t}\n\t\t}\n\t}\n}\n\nValidate.moduleName = \"validate\";\n\n//load defaults\nValidate.validators = defaultValidators;\n\nexport default Validate;\n","export default class OptionsList {\n\tconstructor(table, msgType, defaults = {}){\n\t\tthis.table = table;\n\t\tthis.msgType = msgType;\n\t\tthis.registeredDefaults = Object.assign({}, defaults);\n\t}\n\t\n\tregister(option, value){\n\t\tthis.registeredDefaults[option] = value;\n\t}\n\t\n\tgenerate(defaultOptions, userOptions = {}){\n\t\tvar output = Object.assign({}, this.registeredDefaults),\n\t\twarn = this.table.options.debugInvalidOptions || userOptions.debugInvalidOptions === true;\n\t\t\n\t\tObject.assign(output, defaultOptions);\n\t\t\n\t\tfor (let key in userOptions){\n\t\t\tif(!output.hasOwnProperty(key)){\n\t\t\t\tif(warn){\n\t\t\t\t\tconsole.warn(\"Invalid \" + this.msgType + \" option:\", key);\n\t\t\t\t}\n\n\t\t\t\toutput[key] = userOptions.key;\n\t\t\t}\n\t\t}\n\t\n\t\t\n\t\tfor (let key in output){\n\t\t\tif(key in userOptions){\n\t\t\t\toutput[key] = userOptions[key];\n\t\t\t}else{\n\t\t\t\tif(Array.isArray(output[key])){\n\t\t\t\t\toutput[key] = Object.assign([], output[key]);\n\t\t\t\t}else if(typeof output[key] === \"object\" && output[key] !== null){\n\t\t\t\t\toutput[key] = Object.assign({}, output[key]);\n\t\t\t\t}else if (typeof output[key] === \"undefined\"){\n\t\t\t\t\tdelete output[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn output;\n\t}\n}","import CoreFeature from '../CoreFeature.js';\nimport Helpers from '../tools/Helpers.js';\n\nexport default class Renderer extends CoreFeature{\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.elementVertical = table.rowManager.element;\n\t\tthis.elementHorizontal = table.columnManager.element;\n\t\tthis.tableElement = table.rowManager.tableElement;\n\n\t\tthis.verticalFillMode = \"fit\"; // used by row manager to determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container without resizing it)\n\t}\n\n\n\t///////////////////////////////////\n\t/////// Internal Bindings /////////\n\t///////////////////////////////////\n\n\tinitialize(){\n\t\t//initialize core functionality\n\t}\n\n\tclearRows(){\n\t\t//clear down existing rows layout\n\t}\n\n\tclearColumns(){\n\t\t//clear down existing columns layout\n\t}\n\n\n\treinitializeColumnWidths(columns){\n\t\t//resize columns to fit data\n\t}\n\n\n\trenderRows(){\n\t\t//render rows from a clean slate\n\t}\n\n\trenderColumns(){\n\t\t//render columns from a clean slate\n\t}\n\n\trerenderRows(callback){\n\t\t// rerender rows and keep position\n\t\tif(callback){\n\t\t\tcallback();\n\t\t}\n\t}\n\n\trerenderColumns(update, blockRedraw){\n\t\t//rerender columns\n\t}\n\n\trenderRowCells(row){\n\t\t//render the cells in a row\n\t}\n\n\trerenderRowCells(row, force){\n\t\t//rerender the cells in a row\n\t}\n\n\tscrollColumns(left, dir){\n\t\t//handle horizontal scrolling\n\t}\n\n\tscrollRows(top, dir){\n\t\t//handle vertical scrolling\n\t}\n\n\tresize(){\n\t\t//container has resized, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)\n\t}\n\n\tscrollToRow(row){\n\t\t//scroll to a specific row\n\t}\n\n\tscrollToRowNearestTop(row){\n\t\t//determine weather the row is nearest the top or bottom of the table, return true for top or false for bottom\n\t}\n\n\tvisibleRows(includingBuffer){\n\t\t//return the visible rows\n\t\treturn [];\n\t}\n\n\t///////////////////////////////////\n\t//////// Helper Functions /////////\n\t///////////////////////////////////\n\n\trows(){\n\t\treturn this.table.rowManager.getDisplayRows();\n\t}\n\n\tstyleRow(row, index){\n\t\tvar rowEl = row.getElement();\n\n\t\tif(index % 2){\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\n\t\t}else{\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\n\t\t}\n\t}\n\n\t///////////////////////////////////\n\t/////// External Triggers /////////\n\t/////// (DO NOT OVERRIDE) /////////\n\t///////////////////////////////////\n\n\tclear(){\n\t\t//clear down existing layout\n\t\tthis.clearRows();\n\t\tthis.clearColumns();\n\t}\n\n\trender(){\n\t\t//render from a clean slate\n\t\tthis.renderRows();\n\t\tthis.renderColumns();\n\t}\n\n\trerender(callback){\n\t\t// rerender and keep position\n\t\tthis.rerenderRows();\n\t\tthis.rerenderColumns();\n\t}\n\n\tscrollToRowPosition(row, position, ifVisible){\n\t\tvar rowIndex = this.rows().indexOf(row),\n\t\trowEl = row.getElement(),\n\t\toffset = 0;\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif(rowIndex > -1){\n\n\t\t\t\tif(typeof ifVisible === \"undefined\"){\n\t\t\t\t\tifVisible = this.table.options.scrollToRowIfVisible;\n\t\t\t\t}\n\n\t\t\t\t//check row visibility\n\t\t\t\tif(!ifVisible){\n\t\t\t\t\tif(Helpers.elVisible(rowEl)){\n\t\t\t\t\t\toffset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(typeof position === \"undefined\"){\n\t\t\t\t\tposition = this.table.options.scrollToRowPosition;\n\t\t\t\t}\n\n\t\t\t\tif(position === \"nearest\"){\n\t\t\t\t\tposition = this.scrollToRowNearestTop(row) ? \"top\" : \"bottom\";\n\t\t\t\t}\n\n\t\t\t\t//scroll to row\n\t\t\t\tthis.scrollToRow(row);\n\n\t\t\t\t//align to correct position\n\t\t\t\tswitch(position){\n\t\t\t\t\tcase \"middle\":\n\t\t\t\t\tcase \"center\":\n\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop + (rowEl.offsetTop - this.elementVertical.scrollTop) - ((this.elementVertical.scrollHeight - rowEl.offsetTop) / 2);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"bottom\":\n\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"top\":\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tresolve();\n\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Scroll Error - Row not visible\");\n\t\t\t\treject(\"Scroll Error - Row not visible\");\n\t\t\t}\n\t\t});\n\t}\n}","import Renderer from '../Renderer.js';\n\nexport default class BasicHorizontal extends Renderer{\n\tconstructor(table){\n\t\tsuper(table);\n\t}\n\n\trenderRowCells(row){\n\t\trow.cells.forEach((cell) => {\n\t\t\trow.element.appendChild(cell.getElement());\n\t\t\tcell.cellRendered();\n\t\t});\n\t}\n\n\treinitializeColumnWidths(columns){\n\t\tcolumns.forEach(function(column){\n\t\t\tcolumn.reinitializeWidth();\n\t\t});\n\t}\n}","import Renderer from '../Renderer.js';\n\nexport default class VirtualDomHorizontal extends Renderer{\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.leftCol = 0;\n\t\tthis.rightCol = 0;\n\t\tthis.scrollLeft = 0;\n\t\t\n\t\tthis.vDomScrollPosLeft = 0;\n\t\tthis.vDomScrollPosRight = 0;\n\t\t\n\t\tthis.vDomPadLeft = 0;\n\t\tthis.vDomPadRight = 0;\n\t\t\n\t\tthis.fitDataColAvg = 0;\n\t\t\n\t\tthis.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen\n\t\t\n\t\tthis.visibleRows = null;\n\t\t\n\t\tthis.initialized = false;\n\t\tthis.isFitData = false;\n\t\t\n\t\tthis.columns = [];\n\t}\n\t\n\tinitialize(){\n\t\tthis.compatibilityCheck();\n\t\tthis.layoutCheck();\n\t\tthis.vertScrollListen();\n\t}\n\t\n\tcompatibilityCheck(){\t\t\n\t\tif(this.options(\"layout\") == \"fitDataTable\"){\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with fitDataTable layout mode\");\n\t\t}\n\t\t\n\t\tif(this.options(\"responsiveLayout\")){\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not compatible with responsive columns\");\n\t\t}\n\t\t\n\t\tif(this.options(\"rtl\")){\n\t\t\tconsole.warn(\"Horizontal Virtual DOM is not currently compatible with RTL text direction\");\n\t\t}\n\t}\n\t\n\tlayoutCheck(){\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\n\t}\n\t\n\tvertScrollListen(){\n\t\tthis.subscribe(\"scroll-vertical\", this.clearVisRowCache.bind(this));\n\t\tthis.subscribe(\"data-refreshed\", this.clearVisRowCache.bind(this));\n\t}\n\t\n\tclearVisRowCache(){\n\t\tthis.visibleRows = null;\n\t}\n\t\n\t//////////////////////////////////////\n\t///////// Public Functions ///////////\n\t//////////////////////////////////////\n\t\n\trenderColumns(row, force){\n\t\tthis.dataChange();\n\t}\n\t\n\t\n\tscrollColumns(left, dir){\n\t\tif(this.scrollLeft != left){\n\t\t\tthis.scrollLeft = left;\n\t\t\t\n\t\t\tthis.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));\n\t\t}\n\t}\n\t\n\tcalcWindowBuffer(){\n\t\tvar buffer = this.elementVertical.clientWidth;\n\t\t\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\tif(column.visible){\n\t\t\t\tvar width = column.getWidth();\n\t\t\t\t\n\t\t\t\tif(width > buffer){\n\t\t\t\t\tbuffer = width;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.windowBuffer = buffer * 2;\n\t}\n\t\n\trerenderColumns(update, blockRedraw){\t\t\n\t\tvar old = {\n\t\t\tcols:this.columns,\n\t\t\tleftCol:this.leftCol,\n\t\t\trightCol:this.rightCol,\n\t\t},\n\t\tcolPos = 0;\n\t\t\n\t\tif(update && !this.initialized){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.clear();\n\t\t\n\t\tthis.calcWindowBuffer();\n\t\t\n\t\tthis.scrollLeft = this.elementVertical.scrollLeft;\n\t\t\n\t\tthis.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;\n\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\n\t\t\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\tvar config = {},\n\t\t\twidth;\n\t\t\t\n\t\t\tif(column.visible){\n\t\t\t\tif(!column.modules.frozen){\t\t\t\n\t\t\t\t\twidth = column.getWidth();\n\n\t\t\t\t\tconfig.leftPos = colPos;\n\t\t\t\t\tconfig.rightPos = colPos + width;\n\t\t\t\t\t\n\t\t\t\t\tconfig.width = width;\n\t\t\t\t\t\n\t\t\t\t\tif (this.isFitData) {\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\n\t\t\t\t\t\t//column is visible\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(this.leftCol == -1){\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// column is hidden\n\t\t\t\t\t\tif(this.leftCol !== -1){\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.columns.push(column);\n\t\t\t\t\t\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\n\t\t\t\t\t\n\t\t\t\t\tcolPos += width;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\n\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\n\t\t\n\t\tthis.initialized = true;\n\t\t\n\t\tif(!blockRedraw){\n\t\t\tif(!update || this.reinitChanged(old)){\n\t\t\t\tthis.reinitializeRows();\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.elementVertical.scrollLeft = this.scrollLeft;\n\t}\n\t\n\trenderRowCells(row){\n\t\tif(this.initialized){\n\t\t\tthis.initializeRow(row);\n\t\t}else{\n\t\t\trow.cells.forEach((cell) => {\n\t\t\t\trow.element.appendChild(cell.getElement());\n\t\t\t\tcell.cellRendered();\n\t\t\t});\n\t\t}\n\t}\n\t\n\trerenderRowCells(row, force){\n\t\tthis.reinitializeRow(row, force);\n\t}\n\t\n\treinitializeColumnWidths(columns){\n\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\n\t\t\tthis.columns[i].reinitializeWidth();\n\t\t}\n\t}\n\t\n\t//////////////////////////////////////\n\t//////// Internal Rendering //////////\n\t//////////////////////////////////////\n\t\n\tdeinitialize(){\n\t\tthis.initialized = false;\n\t}\n\t\n\tclear(){\n\t\tthis.columns = [];\n\t\t\n\t\tthis.leftCol = -1;\n\t\tthis.rightCol = 0;\n\t\t\n\t\tthis.vDomScrollPosLeft = 0;\n\t\tthis.vDomScrollPosRight = 0;\n\t\tthis.vDomPadLeft = 0;\n\t\tthis.vDomPadRight = 0;\n\t}\n\t\n\tdataChange(){\n\t\tvar change = false,\n\t\trow, rowEl;\n\t\t\n\t\tif(this.isFitData){\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\n\t\t\t\tif(!column.definition.width && column.visible){\n\t\t\t\t\tchange = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif(change && this.table.rowManager.getDisplayRows().length){\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\n\t\t\t\t\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\n\t\t\t\t})[0];\n\t\t\t\t\n\t\t\t\tif(row){\n\t\t\t\t\trowEl = row.getElement();\n\t\t\t\t\t\n\t\t\t\t\trow.generateCells();\n\t\t\t\t\t\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\n\t\t\t\t\t\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\n\t\t\t\t\t\t\n\t\t\t\t\t\tcell.column.reinitializeWidth();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\n\t\t\t\t\t\n\t\t\t\t\tthis.rerenderColumns(false, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(this.options(\"layout\") === \"fitColumns\"){\n\t\t\t\tthis.layoutRefresh();\n\t\t\t\tthis.rerenderColumns(false, true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treinitChanged(old){\n\t\tvar match = true;\n\t\t\n\t\tif(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\told.cols.forEach((col, i) => {\n\t\t\tif(col !== this.columns[i]){\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn !match;\n\t}\n\t\n\treinitializeRows(){\n\t\tvar visibleRows = this.getVisibleRows(),\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\n\n\t\tvisibleRows.forEach((row) => {\n\t\t\tthis.reinitializeRow(row, true);\n\t\t});\n\n\t\totherRows.forEach((row) =>{\n\t\t\trow.deinitialize();\n\t\t});\n\t}\n\t\n\tgetVisibleRows(){\n\t\tif (!this.visibleRows){\n\t\t\tthis.visibleRows = this.table.rowManager.getVisibleRows();\n\t\t}\n\t\t\n\t\treturn this.visibleRows;\t\n\t}\n\t\n\tscroll(diff){\n\t\tthis.vDomScrollPosLeft += diff;\n\t\tthis.vDomScrollPosRight += diff;\n\t\t\n\t\tif(Math.abs(diff) > (this.windowBuffer / 2)){\n\t\t\tthis.rerenderColumns();\n\t\t}else{\n\t\t\tif(diff > 0){\n\t\t\t\t//scroll right\n\t\t\t\tthis.addColRight();\n\t\t\t\tthis.removeColLeft();\n\t\t\t}else{\n\t\t\t\t//scroll left\n\t\t\t\tthis.addColLeft();\n\t\t\t\tthis.removeColRight();\n\t\t\t}\n\t\t}\n\t}\n\t\n\tcolPositionAdjust (start, end, diff){\n\t\tfor(let i = start; i < end; i++){\n\t\t\tlet column = this.columns[i];\n\t\t\t\n\t\t\tcolumn.modules.vdomHoz.leftPos += diff;\n\t\t\tcolumn.modules.vdomHoz.rightPos += diff;\n\t\t}\n\t}\n\t\n\taddColRight(){\n\t\tvar changes = false,\n\t\tworking = true;\n\t\t\n\t\twhile(working){\n\n\t\t\tlet column = this.columns[this.rightCol + 1];\n\t\t\t\n\t\t\tif(column){\n\t\t\t\tif(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){\n\t\t\t\t\tchanges = true;\n\t\t\t\t\t\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\n\t\t\t\t\t\t\trow.getElement().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\n\t\t\t\t\t\t\tcell.cellRendered();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.fitDataColActualWidthCheck(column);\n\t\t\t\t\t\n\t\t\t\t\tthis.rightCol++; // Don't move this below the >= check below\n\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\trow.modules.vdomHoz.rightCol = this.rightCol;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tif(this.rightCol >= (this.columns.length - 1)){\n\t\t\t\t\t\tthis.vDomPadRight = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.vDomPadRight -= column.getWidth();\n\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(changes){\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\n\t\t}\n\t}\n\t\n\taddColLeft(){\n\t\tvar changes = false,\n\t\tworking = true;\n\t\t\n\t\twhile(working){\n\t\t\tlet column = this.columns[this.leftCol - 1];\n\t\t\t\n\t\t\tif(column){\n\t\t\t\tif(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){\n\t\t\t\t\tchanges = true;\n\t\t\t\t\t\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\n\t\t\t\t\t\t\trow.getElement().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).getElement());\n\t\t\t\t\t\t\tcell.cellRendered();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.leftCol--; // don't move this below the <= check below\n\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\trow.modules.vdomHoz.leftCol = this.leftCol;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tif(this.leftCol <= 0){ // replicating logic in addColRight\n\t\t\t\t\t\tthis.vDomPadLeft = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.vDomPadLeft -= column.getWidth();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlet diff = this.fitDataColActualWidthCheck(column);\n\t\t\t\t\t\n\t\t\t\t\tif(diff){\n\t\t\t\t\t\tthis.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;\n\t\t\t\t\t\tthis.vDomPadRight -= diff;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(changes){\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\n\t\t}\n\t}\n\t\n\tremoveColRight(){\n\t\tvar changes = false,\n\t\tworking = true;\n\t\t\n\t\twhile(working){\n\t\t\tlet column = this.columns[this.rightCol];\n\t\t\t\n\t\t\tif(column){\n\t\t\t\tif(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){\n\t\t\t\t\tchanges = true;\n\t\t\t\t\t\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\n\t\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColRight\", ex.message);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.vDomPadRight += column.getWidth();\n\t\t\t\t\tthis.rightCol --;\n\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\trow.modules.vdomHoz.rightCol = this.rightCol;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(changes){\n\t\t\tthis.tableElement.style.paddingRight = this.vDomPadRight + \"px\";\n\t\t}\n\t}\n\t\n\tremoveColLeft(){\n\t\tvar changes = false,\n\t\tworking = true;\n\n\t\twhile(working){\n\t\t\tlet column = this.columns[this.leftCol];\n\t\t\t\n\t\t\tif(column){\n\t\t\t\tif(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){\n\t\t\t\t\tchanges = true;\n\t\t\t\t\t\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\t\t\t\t\t\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\tvar cell = row.getCell(column);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trow.getElement().removeChild(cell.getElement());\n\t\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t\tconsole.warn(\"Could not removeColLeft\", ex.message);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.vDomPadLeft += column.getWidth();\n\t\t\t\t\tthis.leftCol ++;\n\n\t\t\t\t\tthis.getVisibleRows().forEach((row) => {\n\t\t\t\t\t\tif(row.type !== \"group\"){\n\t\t\t\t\t\t\trow.modules.vdomHoz.leftCol = this.leftCol;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(changes){\n\t\t\tthis.tableElement.style.paddingLeft = this.vDomPadLeft + \"px\";\n\t\t}\n\t}\n\t\n\tfitDataColActualWidthCheck(column){\n\t\tvar newWidth, widthDiff;\n\t\t\n\t\tif(column.modules.vdomHoz.fitDataCheck){\n\t\t\tcolumn.reinitializeWidth();\n\t\t\t\n\t\t\tnewWidth = column.getWidth();\n\t\t\twidthDiff = newWidth - column.modules.vdomHoz.width;\n\t\t\t\n\t\t\tif(widthDiff){\n\t\t\t\tcolumn.modules.vdomHoz.rightPos += widthDiff;\n\t\t\t\tcolumn.modules.vdomHoz.width = newWidth;\n\t\t\t\tthis.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);\n\t\t\t}\n\t\t\t\n\t\t\tcolumn.modules.vdomHoz.fitDataCheck = false;\n\t\t}\n\t\t\n\t\treturn widthDiff;\n\t}\n\t\n\tinitializeRow(row){\n\t\tif(row.type !== \"group\"){\n\t\t\trow.modules.vdomHoz = {\n\t\t\t\tleftCol:this.leftCol,\n\t\t\t\trightCol:this.rightCol,\n\t\t\t};\n\n\t\t\tif(this.table.modules.frozenColumns){\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\n\t\t\t\t\tthis.appendCell(row, column);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\n\t\t\t\tthis.appendCell(row, this.columns[i]);\n\t\t\t}\n\n\t\t\tif(this.table.modules.frozenColumns){\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\n\t\t\t\t\tthis.appendCell(row, column);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\t\n\tappendCell(row, column){\n\t\tif(column && column.visible){\n\t\t\tlet cell = row.getCell(column);\n\t\t\t\n\t\t\trow.getElement().appendChild(cell.getElement());\n\t\t\tcell.cellRendered();\n\t\t}\n\t}\n\t\n\treinitializeRow(row, force){\n\t\tif(row.type !== \"group\"){\n\t\t\tif(force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol){\n\t\t\t\t\n\t\t\t\tvar rowEl = row.getElement();\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\n\n\t\t\t\tthis.initializeRow(row);\n\t\t\t}\n\t\t}\n\t}\n}","import CoreFeature from './CoreFeature.js';\nimport Column from './column/Column.js';\nimport ColumnComponent from './column/ColumnComponent.js';\nimport Helpers from './tools/Helpers.js';\nimport OptionsList from './tools/OptionsList.js';\n\nimport RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';\nimport RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';\n\nimport defaultColumnOptions from './column/defaults/options.js';\n\nexport default class ColumnManager extends CoreFeature {\n\t\n\tconstructor (table){\n\t\tsuper(table);\n\t\t\n\t\tthis.blockHozScrollEvent = false;\n\t\tthis.headersElement = null;\n\t\tthis.contentsElement = null;\n\t\tthis.element = null ; //containing element\n\t\tthis.columns = []; // column definition object\n\t\tthis.columnsByIndex = []; //columns by index\n\t\tthis.columnsByField = {}; //columns by field\n\t\tthis.scrollLeft = 0;\n\t\tthis.optionsList = new OptionsList(this.table, \"column definition\", defaultColumnOptions);\n\t\t\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\n\t\t\n\t\tthis.renderer = null;\n\t}\n\t\n\t////////////// Setup Functions /////////////////\n\t\n\tinitialize(){\n\t\tthis.initializeRenderer();\n\t\t\n\t\tthis.headersElement = this.createHeadersElement();\n\t\tthis.contentsElement = this.createHeaderContentsElement();\n\t\tthis.element = this.createHeaderElement();\n\t\t\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\n\t\t\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\n\t}\n\n\tpadVerticalScrollbar(width){\n\t\tif(this.table.rtl){\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\n\t\t}else{\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\n\t\t}\n\t}\n\t\n\tinitializeRenderer(){\n\t\tvar renderClass;\n\t\t\n\t\tvar renderers = {\n\t\t\t\"virtual\": RendererVirtualDomHorizontal,\n\t\t\t\"basic\": RendererBasicHorizontal,\n\t\t};\n\t\t\n\t\tif(typeof this.table.options.renderHorizontal === \"string\"){\n\t\t\trenderClass = renderers[this.table.options.renderHorizontal];\n\t\t}else{\n\t\t\trenderClass = this.table.options.renderHorizontal;\n\t\t}\n\t\t\n\t\tif(renderClass){\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\n\t\t\tthis.renderer.initialize();\n\t\t}else{\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\n\t\t}\n\t}\n\t\n\t\n\tcreateHeadersElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-headers\");\n\t\tel.setAttribute(\"role\", \"row\");\n\t\t\n\t\treturn el;\n\t}\n\n\tcreateHeaderContentsElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-header-contents\");\n\t\tel.setAttribute(\"role\", \"rowgroup\");\n\t\t\n\t\treturn el;\n\t}\n\t\n\tcreateHeaderElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-header\");\n\t\tel.setAttribute(\"role\", \"rowgroup\");\n\t\t\n\t\tif(!this.table.options.headerVisible){\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\n\t\t}\n\t\t\n\t\treturn el;\n\t}\n\t\n\t//return containing element\n\tgetElement(){\n\t\treturn this.element;\n\t}\n\n\t//return containing contents element\n\tgetContentsElement(){\n\t\treturn this.contentsElement;\n\t}\n\t\n\t\n\t//return header containing element\n\tgetHeadersElement(){\n\t\treturn this.headersElement;\n\t}\n\t\n\t//scroll horizontally to match table body\n\tscrollHorizontal(left){\n\t\tthis.contentsElement.scrollLeft = left;\n\n\t\tthis.scrollLeft = left;\n\t\t\n\t\tthis.renderer.scrollColumns(left);\n\t}\n\t\n\t///////////// Column Setup Functions /////////////\n\tgenerateColumnsFromRowData(data){\n\t\tvar cols = [],\n\t\tdefinitions = this.table.options.autoColumnsDefinitions,\n\t\trow, sorter;\n\t\t\n\t\tif(data && data.length){\n\t\t\t\n\t\t\trow = data[0];\n\t\t\t\n\t\t\tfor(var key in row){\n\t\t\t\tlet col = {\n\t\t\t\t\tfield:key,\n\t\t\t\t\ttitle:key,\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tlet value = row[key];\n\t\t\t\t\n\t\t\t\tswitch(typeof value){\n\t\t\t\t\tcase \"undefined\":\n\t\t\t\t\t\tsorter = \"string\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"boolean\":\n\t\t\t\t\t\tsorter = \"boolean\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\tif(Array.isArray(value)){\n\t\t\t\t\t\t\tsorter = \"array\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tsorter = \"string\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\n\t\t\t\t\t\t\tsorter = \"number\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){\n\t\t\t\t\t\t\t\tsorter = \"alphanum\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsorter = \"string\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcol.sorter = sorter;\n\t\t\t\t\n\t\t\t\tcols.push(col);\n\t\t\t}\n\t\t\t\n\t\t\tif(definitions){\n\t\t\t\t\n\t\t\t\tswitch(typeof definitions){\n\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\tif(Array.isArray(definitions)){\n\t\t\t\t\t\t\tcols.forEach((col) => {\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(match){\n\t\t\t\t\t\t\t\t\tObject.assign(col, match);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tcols.forEach((col) => {\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.table.options.columns = cols;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.table.options.columns = cols;\n\t\t\t}\n\t\t\t\n\t\t\tthis.setColumns(this.table.options.columns);\n\t\t}\n\t}\n\t\n\tsetColumns(cols, row){\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\n\t\t\n\t\tthis.columns = [];\n\t\tthis.columnsByIndex = [];\n\t\tthis.columnsByField = {};\n\t\t\n\t\tthis.dispatch(\"columns-loading\");\n\t\t\n\t\tcols.forEach((def, i) => {\n\t\t\tthis._addColumn(def);\n\t\t});\n\t\t\n\t\tthis._reIndexColumns();\n\t\t\n\t\tthis.dispatch(\"columns-loaded\");\n\t\t\n\t\tthis.rerenderColumns(false, true);\n\t\t\n\t\tthis.redraw(true);\n\t}\n\t\n\t_addColumn(definition, before, nextToColumn){\n\t\tvar column = new Column(definition, this),\n\t\tcolEl = column.getElement(),\n\t\tindex = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;\n\t\t\n\t\tif(nextToColumn && index > -1){\n\t\t\tvar topColumn = nextToColumn.getTopColumn();\n\t\t\tvar parentIndex = this.columns.indexOf(topColumn);\n\t\t\tvar nextEl = topColumn.getElement();\n\t\t\t\n\t\t\tif(before){\n\t\t\t\tthis.columns.splice(parentIndex, 0, column);\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl);\n\t\t\t}else{\n\t\t\t\tthis.columns.splice(parentIndex + 1, 0, column);\n\t\t\t\tnextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);\n\t\t\t}\n\t\t}else{\n\t\t\tif(before){\n\t\t\t\tthis.columns.unshift(column);\n\t\t\t\tthis.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild);\n\t\t\t}else{\n\t\t\t\tthis.columns.push(column);\n\t\t\t\tthis.headersElement.appendChild(column.getElement());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcolumn.columnRendered();\n\t\t\n\t\treturn column;\n\t}\n\t\n\tregisterColumnField(col){\n\t\tif(col.definition.field){\n\t\t\tthis.columnsByField[col.definition.field] = col;\n\t\t}\n\t}\n\t\n\tregisterColumnPosition(col){\n\t\tthis.columnsByIndex.push(col);\n\t}\n\t\n\t_reIndexColumns(){\n\t\tthis.columnsByIndex = [];\n\t\t\n\t\tthis.columns.forEach(function(column){\n\t\t\tcolumn.reRegisterPosition();\n\t\t});\n\t}\n\t\n\t//ensure column headers take up the correct amount of space in column groups\n\tverticalAlignHeaders(){\n\t\tvar minHeight = 0;\n\t\t\n\t\tif(!this.redrawBlock){\n\n\t\t\tthis.headersElement.style.height=\"\";\n\t\t\t\n\t\t\tthis.columns.forEach((column) => {\n\t\t\t\tcolumn.clearVerticalAlign();\n\t\t\t});\n\t\t\t\n\t\t\tthis.columns.forEach((column) => {\n\t\t\t\tvar height = column.getHeight();\n\t\t\t\t\n\t\t\t\tif(height > minHeight){\n\t\t\t\t\tminHeight = height;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\n\n\t\t\tthis.columns.forEach((column) => {\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\n\t\t\t});\n\t\t\t\n\t\t\tthis.table.rowManager.adjustTableSize();\n\t\t}\n\t}\n\t\n\t//////////////// Column Details /////////////////\n\tfindColumn(subject){\n\t\tvar columns;\n\n\t\tif(typeof subject == \"object\"){\n\t\t\t\n\t\t\tif(subject instanceof Column){\n\t\t\t\t//subject is column element\n\t\t\t\treturn subject;\n\t\t\t}else if(subject instanceof ColumnComponent){\n\t\t\t\t//subject is public column component\n\t\t\t\treturn subject._getSelf() || false;\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\n\n\t\t\t\tcolumns = [];\n\n\t\t\t\tthis.columns.forEach((column) => {\n\t\t\t\t\tcolumns.push(column);\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\n\t\t\t\t});\n\n\t\t\t\t//subject is a HTML element of the column header\n\t\t\t\tlet match = columns.find((column) => {\n\t\t\t\t\treturn column.element === subject;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\treturn match || false;\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t//subject should be treated as the field name of the column\n\t\t\treturn this.columnsByField[subject] || false;\n\t\t}\n\t\t\n\t\t//catch all for any other type of input\n\t\treturn false;\n\t}\n\t\n\tgetColumnByField(field){\n\t\treturn this.columnsByField[field];\n\t}\n\t\n\tgetColumnsByFieldRoot(root){\n\t\tvar matches = [];\n\t\t\n\t\tObject.keys(this.columnsByField).forEach((field) => {\n\t\t\tvar fieldRoot = field.split(\".\")[0];\n\t\t\tif(fieldRoot === root){\n\t\t\t\tmatches.push(this.columnsByField[field]);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn matches;\n\t}\n\t\n\tgetColumnByIndex(index){\n\t\treturn this.columnsByIndex[index];\n\t}\n\t\n\tgetFirstVisibleColumn(){\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\n\t\t\treturn col.visible;\n\t\t});\n\t\t\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\n\t}\n\t\n\tgetColumns(){\n\t\treturn this.columns;\n\t}\n\t\n\tfindColumnIndex(column){\n\t\treturn this.columnsByIndex.findIndex((col) => {\n\t\t\treturn column === col;\n\t\t});\n\t}\n\t\n\t//return all columns that are not groups\n\tgetRealColumns(){\n\t\treturn this.columnsByIndex;\n\t}\n\t\n\t//traverse across columns and call action\n\ttraverse(callback){\n\t\tthis.columnsByIndex.forEach((column,i) =>{\n\t\t\tcallback(column, i);\n\t\t});\n\t}\n\t\n\t//get definitions of actual columns\n\tgetDefinitions(active){\n\t\tvar output = [];\n\t\t\n\t\tthis.columnsByIndex.forEach((column) => {\n\t\t\tif(!active || (active && column.visible)){\n\t\t\t\toutput.push(column.getDefinition());\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\t//get full nested definition tree\n\tgetDefinitionTree(){\n\t\tvar output = [];\n\t\t\n\t\tthis.columns.forEach((column) => {\n\t\t\toutput.push(column.getDefinition(true));\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetComponents(structured){\n\t\tvar output = [],\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\n\t\t\n\t\tcolumns.forEach((column) => {\n\t\t\toutput.push(column.getComponent());\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetWidth(){\n\t\tvar width = 0;\n\t\t\n\t\tthis.columnsByIndex.forEach((column) => {\n\t\t\tif(column.visible){\n\t\t\t\twidth += column.getWidth();\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn width;\n\t}\n\t\n\tmoveColumn(from, to, after){\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\n\t\t\n\t\tif(after){\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\n\t\t}\n\t\t\n\t\tthis.moveColumnActual(from, to, after);\n\n\t\tthis.verticalAlignHeaders();\n\t\t\n\t\tthis.table.rowManager.reinitialize();\n\t}\n\t\n\tmoveColumnActual(from, to, after){\n\t\tif(from.parent.isGroup){\n\t\t\tthis._moveColumnInArray(from.parent.columns, from, to, after);\n\t\t}else{\n\t\t\tthis._moveColumnInArray(this.columns, from, to, after);\n\t\t}\n\t\t\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\n\t\t\n\t\tthis.rerenderColumns(true);\n\t\t\n\t\tthis.dispatch(\"column-moved\", from, to, after);\n\t\t\n\t\tif(this.subscribedExternal(\"columnMoved\")){\n\t\t\tthis.dispatchExternal(\"columnMoved\", from.getComponent(), this.table.columnManager.getComponents());\n\t\t}\n\t}\n\t\n\t_moveColumnInArray(columns, from, to, after, updateRows){\n\t\tvar\tfromIndex = columns.indexOf(from),\n\t\ttoIndex, rows = [];\n\t\t\n\t\tif (fromIndex > -1) {\n\t\t\t\n\t\t\tcolumns.splice(fromIndex, 1);\n\t\t\t\n\t\t\ttoIndex = columns.indexOf(to);\n\t\t\t\n\t\t\tif (toIndex > -1) {\n\t\t\t\t\n\t\t\t\tif(after){\n\t\t\t\t\ttoIndex = toIndex+1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\ttoIndex = fromIndex;\n\t\t\t}\n\t\t\t\n\t\t\tcolumns.splice(toIndex, 0, from);\n\t\t\t\n\t\t\tif(updateRows){\n\t\t\t\t\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\n\t\t\t\t\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\n\t\t\t\t\n\t\t\t\trows.forEach(function(row){\n\t\t\t\t\tif(row.cells.length){\n\t\t\t\t\t\tvar cell = row.cells.splice(fromIndex, 1)[0];\n\t\t\t\t\t\trow.cells.splice(toIndex, 0, cell);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\tscrollToColumn(column, position, ifVisible){\n\t\tvar left = 0,\n\t\toffset = column.getLeftOffset(),\n\t\tadjust = 0,\n\t\tcolEl = column.getElement();\n\t\t\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t\n\t\t\tif(typeof position === \"undefined\"){\n\t\t\t\tposition = this.table.options.scrollToColumnPosition;\n\t\t\t}\n\t\t\t\n\t\t\tif(typeof ifVisible === \"undefined\"){\n\t\t\t\tifVisible = this.table.options.scrollToColumnIfVisible;\n\t\t\t}\n\t\t\t\n\t\t\tif(column.visible){\n\t\t\t\t\n\t\t\t\t//align to correct position\n\t\t\t\tswitch(position){\n\t\t\t\t\tcase \"middle\":\n\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\tadjust = -this.element.clientWidth / 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"right\":\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check column visibility\n\t\t\t\tif(!ifVisible){\n\t\t\t\t\tif(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//calculate scroll position\n\t\t\t\tleft = offset + adjust;\n\t\t\t\t\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\n\t\t\t\t\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\n\t\t\t\tthis.scrollHorizontal(left);\n\t\t\t\t\n\t\t\t\tresolve();\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Scroll Error - Column not visible\");\n\t\t\t\treject(\"Scroll Error - Column not visible\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t}\n\t\n\t//////////////// Cell Management /////////////////\n\tgenerateCells(row){\n\t\tvar cells = [];\n\t\t\n\t\tthis.columnsByIndex.forEach((column) => {\n\t\t\tcells.push(column.generateCell(row));\n\t\t});\n\t\t\n\t\treturn cells;\n\t}\n\t\n\t//////////////// Column Management /////////////////\n\tgetFlexBaseWidth(){\n\t\tvar totalWidth = this.table.element.clientWidth, //table element width\n\t\tfixedWidth = 0;\n\t\t\n\t\t//adjust for vertical scrollbar if present\n\t\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\n\t\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\n\t\t}\n\t\t\n\t\tthis.columnsByIndex.forEach(function(column){\n\t\t\tvar width, minWidth, colWidth;\n\t\t\t\n\t\t\tif(column.visible){\n\t\t\t\t\n\t\t\t\twidth = column.definition.width || 0;\n\t\t\t\t\n\t\t\t\tminWidth = parseInt(column.minWidth);\n\t\t\t\t\n\t\t\t\tif(typeof(width) == \"string\"){\n\t\t\t\t\tif(width.indexOf(\"%\") > -1){\n\t\t\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width) ;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcolWidth = parseInt(width);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tcolWidth = width;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn fixedWidth;\n\t}\n\t\n\taddColumn(definition, before, nextToColumn){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tvar column = this._addColumn(definition, before, nextToColumn);\n\t\t\t\n\t\t\tthis._reIndexColumns();\n\t\t\t\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\n\t\t\t\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\n\t\t\t\tcolumn.reinitializeWidth();\n\t\t\t}\n\t\t\t\n\t\t\tthis.redraw(true);\n\t\t\t\n\t\t\tthis.table.rowManager.reinitialize();\n\t\t\t\n\t\t\tthis.rerenderColumns();\n\t\t\t\n\t\t\tresolve(column);\n\t\t});\n\t}\n\t\n\t//remove column from system\n\tderegisterColumn(column){\n\t\tvar field = column.getField(),\n\t\tindex;\n\t\t\n\t\t//remove from field list\n\t\tif(field){\n\t\t\tdelete this.columnsByField[field];\n\t\t}\n\t\t\n\t\t//remove from index list\n\t\tindex = this.columnsByIndex.indexOf(column);\n\t\t\n\t\tif(index > -1){\n\t\t\tthis.columnsByIndex.splice(index, 1);\n\t\t}\n\t\t\n\t\t//remove from column list\n\t\tindex = this.columns.indexOf(column);\n\t\t\n\t\tif(index > -1){\n\t\t\tthis.columns.splice(index, 1);\n\t\t}\n\t\t\n\t\tthis.verticalAlignHeaders();\n\t\t\n\t\tthis.redraw();\n\t}\n\t\n\trerenderColumns(update, silent){\n\t\tif(!this.redrawBlock){\n\t\t\tthis.renderer.rerenderColumns(update, silent);\n\t\t}else{\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\n\t\t\t\tthis.redrawBlockUpdate = update;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tblockRedraw(){\n\t\tthis.redrawBlock = true;\n\t\tthis.redrawBlockUpdate = null;\n\t}\n\t\n\trestoreRedraw(){\n\t\tthis.redrawBlock = false;\n\t\tthis.verticalAlignHeaders();\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\n\t\t\n\t}\n\t\n\t//redraw columns\n\tredraw(force){\n\t\tif(Helpers.elVisible(this.element)){\n\t\t\tthis.verticalAlignHeaders();\n\t\t}\n\t\t\n\t\tif(force){\n\t\t\tthis.table.rowManager.resetScroll();\n\t\t\tthis.table.rowManager.reinitialize();\n\t\t}\n\t\t\n\t\tif(!this.confirm(\"table-redrawing\", force)){\n\t\t\tthis.layoutRefresh(force);\n\t\t}\n\t\t\n\t\tthis.dispatch(\"table-redraw\", force);\n\t\t\n\t\tthis.table.footerManager.redraw();\n\t}\n}","import Renderer from '../Renderer.js';\nimport Helpers from '../../tools/Helpers.js';\n\nexport default class BasicVertical extends Renderer{\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.verticalFillMode = \"fill\";\n\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\t}\n\n\tclearRows(){\n\t\tvar element = this.tableElement;\n\n\t\t// element.children.detach();\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\n\t\telement.scrollTop = 0;\n\t\telement.scrollLeft = 0;\n\n\t\telement.style.minWidth = \"\";\n\t\telement.style.minHeight = \"\";\n\t\telement.style.display = \"\";\n\t\telement.style.visibility = \"\";\n\t}\n\n\trenderRows(){\n\t\tvar element = this.tableElement,\n\t\tonlyGroupHeaders = true;\n\n\t\tthis.rows().forEach((row, index) => {\n\t\t\tthis.styleRow(row, index);\n\t\t\telement.appendChild(row.getElement());\n\t\t\trow.initialize(true);\n\n\t\t\tif(row.type !== \"group\"){\n\t\t\t\tonlyGroupHeaders = false;\n\t\t\t}\n\t\t});\n\n\t\tif(onlyGroupHeaders){\n\t\t\telement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\n\t\t}else{\n\t\t\telement.style.minWidth = \"\";\n\t\t}\n\t}\n\n\n\trerenderRows(callback){\t\n\t\tthis.clearRows();\n\n\t\tif(callback){\n\t\t\tcallback();\n\t\t}\n\n\t\tthis.renderRows();\n\t}\n\n\tscrollToRowNearestTop(row){\n\t\tvar rowTop = Helpers.elOffset(row.getElement()).top;\n\n\t\treturn !(Math.abs(this.elementVertical.scrollTop - rowTop) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - rowTop));\n\t}\n\n\tscrollToRow(row){\n\t\tvar rowEl = row.getElement();\n\n\t\tthis.elementVertical.scrollTop = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;\n\t}\n\n\tvisibleRows(includingBuffer){\n\t\treturn this.rows();\n\t}\n\n}","import Renderer from '../Renderer.js';\nimport Helpers from '../../tools/Helpers.js';\n\nexport default class VirtualDomVertical extends Renderer{\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.verticalFillMode = \"fill\";\n\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\n\t\tthis.vDomRowHeight = 20; //approximation of row heights for padding\n\n\t\tthis.vDomTop = 0; //hold position for first rendered row in the virtual DOM\n\t\tthis.vDomBottom = 0; //hold position for last rendered row in the virtual DOM\n\n\t\tthis.vDomScrollPosTop = 0; //last scroll position of the vDom top;\n\t\tthis.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom;\n\n\t\tthis.vDomTopPad = 0; //hold value of padding for top of virtual DOM\n\t\tthis.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM\n\n\t\tthis.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go\n\n\t\tthis.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling\n\n\t\tthis.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows)\n\t\tthis.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin\n\n\t\tthis.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed\n\t\tthis.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed\n\t}\n\n\t//////////////////////////////////////\n\t///////// Public Functions ///////////\n\t//////////////////////////////////////\n\n\tclearRows(){\n\t\tvar element = this.tableElement;\n\n\t\t// element.children.detach();\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\n\t\telement.style.paddingTop = \"\";\n\t\telement.style.paddingBottom = \"\";\n\t\t// element.style.minWidth = \"\";\n\t\telement.style.minHeight = \"\";\n\t\telement.style.display = \"\";\n\t\telement.style.visibility = \"\";\n\n\t\tthis.elementVertical.scrollTop = 0;\n\t\tthis.elementVertical.scrollLeft = 0;\n\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\n\t\tthis.vDomTop = 0;\n\t\tthis.vDomBottom = 0;\n\t\tthis.vDomTopPad = 0;\n\t\tthis.vDomBottomPad = 0;\n\t\tthis.vDomScrollPosTop = 0;\n\t\tthis.vDomScrollPosBottom = 0;\n\t}\n\n\trenderRows(){\n\t\tthis._virtualRenderFill();\n\t}\n\n\trerenderRows(callback){\n\t\tvar scrollTop = this.elementVertical.scrollTop;\n\t\tvar topRow = false;\n\t\tvar topOffset = false;\n\n\t\tvar left = this.table.rowManager.scrollLeft;\n\n\t\tvar rows = this.rows();\n\n\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\n\n\t\t\tif(rows[i]){\n\t\t\t\tvar diff = scrollTop - rows[i].getElement().offsetTop;\n\n\t\t\t\tif(topOffset === false || Math.abs(diff) < topOffset){\n\t\t\t\t\ttopOffset = diff;\n\t\t\t\t\ttopRow = i;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trows.forEach((row) => {\n\t\t\trow.deinitializeHeight();\n\t\t});\n\n\t\tif(callback){\n\t\t\tcallback();\n\t\t}\n\n\t\tif(this.rows().length){\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\n\t\t}else{\n\t\t\tthis.clear();\n\t\t\tthis.table.rowManager.tableEmpty();\n\t\t}\n\n\t\tthis.scrollColumns(left);\n\t}\n\n\tscrollColumns(left){\n\t\tthis.table.rowManager.scrollHorizontal(left);\n\t}\n\n\tscrollRows(top, dir){\n\t\tvar topDiff = top - this.vDomScrollPosTop;\n\t\tvar bottomDiff = top - this.vDomScrollPosBottom;\n\t\tvar margin = this.vDomWindowBuffer * 2;\n\t\tvar rows = this.rows();\n\n\t\tthis.scrollTop = top;\n\n\t\tif(-topDiff > margin || bottomDiff > margin){\n\t\t\t//if big scroll redraw table;\n\t\t\tvar left = this.table.rowManager.scrollLeft;\n\t\t\tthis._virtualRenderFill(Math.floor((this.elementVertical.scrollTop / this.elementVertical.scrollHeight) * rows.length));\n\t\t\tthis.scrollColumns(left);\n\t\t}else{\n\n\t\t\tif(dir){\n\t\t\t\t//scrolling up\n\t\t\t\tif(topDiff < 0){\n\t\t\t\t\tthis._addTopRow(rows, -topDiff);\n\t\t\t\t}\n\n\t\t\t\tif(bottomDiff < 0){\n\t\t\t\t\t//hide bottom row if needed\n\t\t\t\t\tif(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){\n\t\t\t\t\t\tthis._removeBottomRow(rows, -bottomDiff);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\tif(bottomDiff >= 0){\n\t\t\t\t\tthis._addBottomRow(rows, bottomDiff);\n\t\t\t\t}\n\n\t\t\t\t//scrolling down\n\t\t\t\tif(topDiff >= 0){\n\t\t\t\t\t//hide top row if needed\n\t\t\t\t\tif(this.scrollTop > this.vDomWindowBuffer){\n\t\t\t\t\t\tthis._removeTopRow(rows, topDiff);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.vDomScrollPosTop = this.scrollTop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tresize(){\n\t\tthis.vDomWindowBuffer = this.table.options.renderVerticalBuffer || this.elementVertical.clientHeight;\n\t}\n\n\tscrollToRowNearestTop(row){\n\t\tvar rowIndex = this.rows().indexOf(row);\n\n\t\treturn !(Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex));\n\t}\n\n\tscrollToRow(row){\n\t\tvar index = this.rows().indexOf(row);\n\n\t\tif(index > -1){\n\t\t\tthis._virtualRenderFill(index, true);\n\t\t}\n\t}\n\n\tvisibleRows(includingBuffer){\n\t\tvar topEdge = this.elementVertical.scrollTop,\n\t\tbottomEdge = this.elementVertical.clientHeight + topEdge,\n\t\ttopFound = false,\n\t\ttopRow = 0,\n\t\tbottomRow = 0,\n\t\trows = this.rows();\n\n\t\tif(includingBuffer){\n\t\t\ttopRow = this.vDomTop;\n\t\t\tbottomRow = this.vDomBottom;\n\t\t}else{\n\t\t\tfor(var i = this.vDomTop; i <= this.vDomBottom; i++){\n\t\t\t\tif(rows[i]){\n\t\t\t\t\tif(!topFound){\n\t\t\t\t\t\tif((topEdge - rows[i].getElement().offsetTop) >= 0){\n\t\t\t\t\t\t\ttopRow = i;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\ttopFound = true;\n\n\t\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\n\t\t\t\t\t\t\t\tbottomRow = i;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(bottomEdge - rows[i].getElement().offsetTop >= 0){\n\t\t\t\t\t\t\tbottomRow = i;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn rows.slice(topRow, bottomRow + 1);\n\t}\n\n\t//////////////////////////////////////\n\t//////// Internal Rendering //////////\n\t//////////////////////////////////////\n\n\t//full virtual render\n\t_virtualRenderFill(position, forceMove, offset){\n\t\tvar\telement = this.tableElement,\n\t\tholder = this.elementVertical,\n\t\ttopPad = 0,\n\t\trowsHeight = 0,\n\t\theightOccupied = 0,\n\t\ttopPadHeight = 0,\n\t\ti = 0,\n\t\trows = this.rows(),\n\t\trowsCount = rows.length,\n\t\tcontainerHeight = this.elementVertical.clientHeight;\n\n\t\tposition = position || 0;\n\n\t\toffset = offset || 0;\n\n\t\tif(!position){\n\t\t\tthis.clear();\n\t\t}else{\n\t\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\n\t\t\t//check if position is too close to bottom of table\n\t\t\theightOccupied = (rowsCount - position + 1) * this.vDomRowHeight;\n\n\t\t\tif(heightOccupied < containerHeight){\n\t\t\t\tposition -= Math.ceil((containerHeight - heightOccupied) / this.vDomRowHeight);\n\t\t\t\tif(position < 0){\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//calculate initial pad\n\t\t\ttopPad = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), position);\n\t\t\tposition -= topPad;\n\t\t}\n\n\t\tif(rowsCount && Helpers.elVisible(this.elementVertical)){\n\t\t\tthis.vDomTop = position;\n\n\t\t\tthis.vDomBottom = position -1;\n\n\t\t\twhile ((rowsHeight <= containerHeight + this.vDomWindowBuffer || i < this.vDomWindowMinTotalRows) && this.vDomBottom < rowsCount -1){\n\t\t\t\tvar index = this.vDomBottom + 1,\n\t\t\t\trow = rows[index],\n\t\t\t\trowHeight = 0;\n\n\t\t\t\tthis.styleRow(row, index);\n\n\t\t\t\telement.appendChild(row.getElement());\n\n\t\t\t\trow.initialize();\n\n\t\t\t\tif(!row.heightInitialized){\n\t\t\t\t\trow.normalizeHeight(true);\n\t\t\t\t}\n\n\t\t\t\trowHeight = row.getHeight();\n\n\t\t\t\tif(i < topPad){\n\t\t\t\t\ttopPadHeight += rowHeight;\n\t\t\t\t}else{\n\t\t\t\t\trowsHeight += rowHeight;\n\t\t\t\t}\n\n\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\n\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\n\t\t\t\t}\n\n\t\t\t\tthis.vDomBottom ++;\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tif(!position){\n\t\t\t\tthis.vDomTopPad = 0;\n\t\t\t\t//adjust row height to match average of rendered elements\n\t\t\t\tthis.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);\n\t\t\t\tthis.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom -1);\n\n\t\t\t\tthis.vDomScrollHeight = topPadHeight + rowsHeight + this.vDomBottomPad - containerHeight;\n\t\t\t}else{\n\t\t\t\tthis.vDomTopPad = !forceMove ? this.scrollTop - topPadHeight : (this.vDomRowHeight * this.vDomTop) + offset;\n\t\t\t\tthis.vDomBottomPad = this.vDomBottom == rowsCount-1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - rowsHeight - topPadHeight, 0);\n\t\t\t}\n\n\t\t\telement.style.paddingTop = this.vDomTopPad + \"px\";\n\t\t\telement.style.paddingBottom = this.vDomBottomPad + \"px\";\n\n\t\t\tif(forceMove){\n\t\t\t\tthis.scrollTop = this.vDomTopPad + (topPadHeight) + offset - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - containerHeight : 0);\n\t\t\t}\n\n\t\t\tthis.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - containerHeight);\n\n\t\t\t//adjust for horizontal scrollbar if present (and not at top of table)\n\t\t\tif(this.elementVertical.scrollWidth > this.elementVertical.clientWidth && forceMove){\n\t\t\t\tthis.scrollTop += this.elementVertical.offsetHeight - containerHeight;\n\t\t\t}\n\n\t\t\tthis.vDomScrollPosTop = this.scrollTop;\n\t\t\tthis.vDomScrollPosBottom = this.scrollTop;\n\n\t\t\tholder.scrollTop = this.scrollTop;\n\n\t\t\tthis.dispatch(\"render-virtual-fill\");\n\t\t}\n\t}\n\n\t_addTopRow(rows, fillableSpace){\n\t\tvar table = this.tableElement,\n\t\taddedRows = [],\n\t\tpaddingAdjust = 0,\n\t\tindex = this.vDomTop -1,\n\t\ti = 0,\n\t\tworking = true;\n\n\t\twhile(working){\n\t\t\tif(this.vDomTop){\n\t\t\t\tlet row = rows[index],\n\t\t\t\trowHeight, initialized;\n\n\t\t\t\tif(row && i < this.vDomMaxRenderChain){\n\t\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\n\t\t\t\t\tinitialized = row.initialized;\n\n\t\t\t\t\tif(fillableSpace >= rowHeight){\n\n\t\t\t\t\t\tthis.styleRow(row, index);\n\t\t\t\t\t\ttable.insertBefore(row.getElement(), table.firstChild);\n\n\t\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\n\t\t\t\t\t\t\taddedRows.push(row);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trow.initialize();\n\n\t\t\t\t\t\tif(!initialized){\n\t\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\n\n\t\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\n\t\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfillableSpace -= rowHeight;\n\t\t\t\t\t\tpaddingAdjust += rowHeight;\n\n\t\t\t\t\t\tthis.vDomTop--;\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t\ti++;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tworking = false;\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\n\t\tfor (let row of addedRows){\n\t\t\trow.clearCellHeight();\n\t\t}\n\n\t\tthis._quickNormalizeRowHeight(addedRows);\n\n\t\tif(paddingAdjust){\n\t\t\tthis.vDomTopPad -= paddingAdjust;\n\n\t\t\tif(this.vDomTopPad < 0){\n\t\t\t\tthis.vDomTopPad = index * this.vDomRowHeight;\n\t\t\t}\n\n\t\t\tif(index < 1){\n\t\t\t\tthis.vDomTopPad = 0;\n\t\t\t}\n\n\t\t\ttable.style.paddingTop = this.vDomTopPad + \"px\";\n\t\t\tthis.vDomScrollPosTop -= paddingAdjust;\n\t\t}\n\t}\n\n\t_removeTopRow(rows, fillableSpace){\n\t\tvar removableRows = [],\n\t\tpaddingAdjust = 0,\n\t\ti = 0,\n\t\tworking = true;\n\n\t\twhile(working){\n\t\t\tlet row = rows[this.vDomTop],\n\t\t\trowHeight;\n\n\t\t\tif(row && i < this.vDomMaxRenderChain){\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\n\n\t\t\t\tif(fillableSpace >= rowHeight){\n\t\t\t\t\tthis.vDomTop++;\n\n\t\t\t\t\tfillableSpace -= rowHeight;\n\t\t\t\t\tpaddingAdjust += rowHeight;\n\n\t\t\t\t\tremovableRows.push(row);\n\t\t\t\t\ti++;\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\n\t\tfor (let row of removableRows){\n\t\t\tlet rowEl = row.getElement();\n\n\t\t\tif(rowEl.parentNode){\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\n\t\t\t}\n\t\t}\n\n\t\tif(paddingAdjust){\n\t\t\tthis.vDomTopPad += paddingAdjust;\n\t\t\tthis.tableElement.style.paddingTop = this.vDomTopPad + \"px\";\n\t\t\tthis.vDomScrollPosTop += this.vDomTop ? paddingAdjust : paddingAdjust + this.vDomWindowBuffer;\n\t\t}\n\t}\n\n\t_addBottomRow(rows, fillableSpace){\n\t\tvar table = this.tableElement,\n\t\taddedRows = [],\n\t\tpaddingAdjust = 0,\n\t\tindex = this.vDomBottom + 1,\n\t\ti = 0,\n\t\tworking = true;\n\n\t\twhile(working){\n\t\t\tlet row = rows[index],\n\t\t\trowHeight, initialized;\n\n\t\t\tif(row && i < this.vDomMaxRenderChain){\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\n\t\t\t\tinitialized = row.initialized;\n\n\t\t\t\tif(fillableSpace >= rowHeight){\n\n\t\t\t\t\tthis.styleRow(row, index);\n\t\t\t\t\ttable.appendChild(row.getElement());\n\n\t\t\t\t\tif(!row.initialized || !row.heightInitialized){\n\t\t\t\t\t\taddedRows.push(row);\n\t\t\t\t\t}\n\n\t\t\t\t\trow.initialize();\n\n\t\t\t\t\tif(!initialized){\n\t\t\t\t\t\trowHeight = row.getElement().offsetHeight;\n\n\t\t\t\t\t\tif(rowHeight > this.vDomWindowBuffer){\n\t\t\t\t\t\t\tthis.vDomWindowBuffer = rowHeight * 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfillableSpace -= rowHeight;\n\t\t\t\t\tpaddingAdjust += rowHeight;\n\n\t\t\t\t\tthis.vDomBottom++;\n\t\t\t\t\tindex++;\n\t\t\t\t\ti++;\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\n\t\tfor (let row of addedRows){\n\t\t\trow.clearCellHeight();\n\t\t}\n\n\t\tthis._quickNormalizeRowHeight(addedRows);\n\n\t\tif(paddingAdjust){\n\t\t\tthis.vDomBottomPad -= paddingAdjust;\n\n\t\t\tif(this.vDomBottomPad < 0 || index == rows.length -1){\n\t\t\t\tthis.vDomBottomPad = 0;\n\t\t\t}\n\n\t\t\ttable.style.paddingBottom = this.vDomBottomPad + \"px\";\n\t\t\tthis.vDomScrollPosBottom += paddingAdjust;\n\t\t}\n\t}\n\n\t_removeBottomRow(rows, fillableSpace){\n\t\tvar removableRows = [],\n\t\tpaddingAdjust = 0,\n\t\ti = 0,\n\t\tworking = true;\n\n\t\twhile(working){\n\t\t\tlet row = rows[this.vDomBottom],\n\t\t\trowHeight;\n\n\t\t\tif(row && i < this.vDomMaxRenderChain){\n\t\t\t\trowHeight = row.getHeight() || this.vDomRowHeight;\n\n\t\t\t\tif(fillableSpace >= rowHeight){\n\t\t\t\t\tthis.vDomBottom --;\n\n\t\t\t\t\tfillableSpace -= rowHeight;\n\t\t\t\t\tpaddingAdjust += rowHeight;\n\n\t\t\t\t\tremovableRows.push(row);\n\t\t\t\t\ti++;\n\t\t\t\t}else{\n\t\t\t\t\tworking = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tworking = false;\n\t\t\t}\n\t\t}\n\n\t\tfor (let row of removableRows){\n\t\t\tlet rowEl = row.getElement();\n\n\t\t\tif(rowEl.parentNode){\n\t\t\t\trowEl.parentNode.removeChild(rowEl);\n\t\t\t}\n\t\t}\n\n\t\tif(paddingAdjust){\n\t\t\tthis.vDomBottomPad += paddingAdjust;\n\n\t\t\tif(this.vDomBottomPad < 0){\n\t\t\t\tthis.vDomBottomPad = 0;\n\t\t\t}\n\n\t\t\tthis.tableElement.style.paddingBottom = this.vDomBottomPad + \"px\";\n\t\t\tthis.vDomScrollPosBottom -= paddingAdjust;\n\t\t}\n\t}\n\n\t_quickNormalizeRowHeight(rows){\n\t\tfor(let row of rows){\n\t\t\trow.calcHeight();\n\t\t}\n\n\t\tfor(let row of rows){\n\t\t\trow.setCellHeight();\n\t\t}\n\t}\n}","import CoreFeature from './CoreFeature.js';\nimport Row from './row/Row.js';\nimport RowComponent from './row/RowComponent.js';\nimport Helpers from './tools/Helpers.js';\n\nimport RendererBasicVertical from './rendering/renderers/BasicVertical.js';\nimport RendererVirtualDomVertical from './rendering/renderers/VirtualDomVertical.js';\n\nexport default class RowManager extends CoreFeature{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t\t\n\t\tthis.element = this.createHolderElement(); //containing element\n\t\tthis.tableElement = this.createTableElement(); //table element\n\t\tthis.heightFixer = this.createTableElement(); //table element\n\t\tthis.placeholder = null; //placeholder element\n\t\tthis.placeholderContents = null; //placeholder element\n\t\t\n\t\tthis.firstRender = false; //handle first render\n\t\tthis.renderMode = \"virtual\"; //current rendering mode\n\t\tthis.fixedHeight = false; //current rendering mode\n\t\t\n\t\tthis.rows = []; //hold row data objects\n\t\tthis.activeRowsPipeline = []; //hold calculation of active rows\n\t\tthis.activeRows = []; //rows currently available to on display in the table\n\t\tthis.activeRowsCount = 0; //count of active rows\n\t\t\n\t\tthis.displayRows = []; //rows currently on display in the table\n\t\tthis.displayRowsCount = 0; //count of display rows\n\t\t\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\t\t\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\n\t\tthis.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed\n\t\tthis.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed\n\t\t\n\t\tthis.dataPipeline = []; //hold data pipeline tasks\n\t\tthis.displayPipeline = []; //hold data display pipeline tasks\n\n\t\tthis.scrollbarWidth = 0;\n\t\t\n\t\tthis.renderer = null;\n\t}\n\t\n\t//////////////// Setup Functions /////////////////\n\t\n\tcreateHolderElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-tableholder\");\n\t\tel.setAttribute(\"tabindex\", 0);\n\t\t// el.setAttribute(\"role\", \"rowgroup\");\n\t\t\n\t\treturn el;\n\t}\n\t\n\tcreateTableElement (){\n\t\tvar el = document.createElement(\"div\");\n\t\t\n\t\tel.classList.add(\"tabulator-table\");\n\t\tel.setAttribute(\"role\", \"rowgroup\");\n\t\t\n\t\treturn el;\n\t}\n\t\n\tinitializePlaceholder(){\n\t\tvar placeholder = this.table.options.placeholder;\n\n\t\t//configure placeholder element\n\t\tif(placeholder){\t\n\t\t\tlet el = document.createElement(\"div\");\n\t\t\tel.classList.add(\"tabulator-placeholder\");\n\n\t\t\tif(typeof placeholder == \"string\"){\n\t\t\t\tlet contents = document.createElement(\"div\");\n\t\t\t\tcontents.classList.add(\"tabulator-placeholder-contents\");\n\t\t\t\tcontents.innerHTML = placeholder;\n\t\t\t\t\n\t\t\t\tel.appendChild(contents);\n\t\t\t\t\n\t\t\t\tthis.placeholderContents = contents;\n\t\t\t\t\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && placeholder instanceof HTMLElement){\n\t\t\t\t\n\t\t\t\tel.appendChild(placeholder);\n\t\t\t\tthis.placeholderContents = placeholder;\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Invalid placeholder provided, must be string or HTML Element\", placeholder);\n\n\t\t\t\tthis.el = null;\n\t\t\t}\n\n\t\t\tthis.placeholder = el;\n\t\t}\n\t}\n\t\n\t//return containing element\n\tgetElement(){\n\t\treturn this.element;\n\t}\n\t\n\t//return table element\n\tgetTableElement(){\n\t\treturn this.tableElement;\n\t}\n\t\n\tinitialize(){\n\t\tthis.initializePlaceholder();\n\t\tthis.initializeRenderer();\n\t\t\n\t\t//initialize manager\n\t\tthis.element.appendChild(this.tableElement);\n\t\t\n\t\tthis.firstRender = true;\n\t\t\n\t\t//scroll header along with table body\n\t\tthis.element.addEventListener(\"scroll\", () => {\n\t\t\tvar left = this.element.scrollLeft,\n\t\t\tleftDir = this.scrollLeft > left,\n\t\t\ttop = this.element.scrollTop,\n\t\t\ttopDir = this.scrollTop > top;\n\t\t\t\n\t\t\t//handle horizontal scrolling\n\t\t\tif(this.scrollLeft != left){\n\t\t\t\tthis.scrollLeft = left;\n\t\t\t\t\n\t\t\t\tthis.dispatch(\"scroll-horizontal\", left, leftDir);\n\t\t\t\tthis.dispatchExternal(\"scrollHorizontal\", left, leftDir);\n\t\t\t\t\n\t\t\t\tthis._positionPlaceholder();\n\t\t\t}\n\t\t\t\n\t\t\t//handle vertical scrolling\n\t\t\tif(this.scrollTop != top){\n\t\t\t\tthis.scrollTop = top;\n\t\t\t\t\n\t\t\t\tthis.renderer.scrollRows(top, topDir);\n\t\t\t\t\n\t\t\t\tthis.dispatch(\"scroll-vertical\", top, topDir);\n\t\t\t\tthis.dispatchExternal(\"scrollVertical\", top, topDir);\n\t\t\t}\n\t\t});\n\t}\n\t\n\t////////////////// Row Manipulation //////////////////\n\tfindRow(subject){\n\t\tif(typeof subject == \"object\"){\n\t\t\tif(subject instanceof Row){\n\t\t\t\t//subject is row element\n\t\t\t\treturn subject;\n\t\t\t}else if(subject instanceof RowComponent){\n\t\t\t\t//subject is public row component\n\t\t\t\treturn subject._getSelf() || false;\n\t\t\t}else if(typeof HTMLElement !== \"undefined\" && subject instanceof HTMLElement){\n\t\t\t\t//subject is a HTML element of the row\n\t\t\t\tlet match = this.rows.find((row) => {\n\t\t\t\t\treturn row.getElement() === subject;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\treturn match || false;\n\t\t\t}else if(subject === null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else if(typeof subject == \"undefined\"){\n\t\t\treturn false;\n\t\t}else{\n\t\t\t//subject should be treated as the index of the row\n\t\t\tlet match = this.rows.find((row) => {\n\t\t\t\treturn row.data[this.table.options.index] == subject;\n\t\t\t});\n\t\t\t\n\t\t\treturn match || false;\n\t\t}\n\t\t\n\t\t//catch all for any other type of input\n\t\treturn false;\n\t}\n\t\n\tgetRowFromDataObject(data){\n\t\tvar match = this.rows.find((row) => {\n\t\t\treturn row.data === data;\n\t\t});\n\t\t\n\t\treturn match || false;\n\t}\n\t\n\tgetRowFromPosition(position){\n\t\treturn this.getDisplayRows().find((row) => {\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\n\t\t});\n\t}\n\t\n\tscrollToRow(row, position, ifVisible){\n\t\treturn this.renderer.scrollToRowPosition(row, position, ifVisible);\n\t}\n\t\n\t////////////////// Data Handling //////////////////\n\tsetData(data, renderInPosition, columnsChanged){\n\t\treturn new Promise((resolve, reject)=>{\n\t\t\tif(renderInPosition && this.getDisplayRows().length){\n\t\t\t\tif(this.table.options.pagination){\n\t\t\t\t\tthis._setDataActual(data, true);\n\t\t\t\t}else{\n\t\t\t\t\tthis.reRenderInPosition(() => {\n\t\t\t\t\t\tthis._setDataActual(data);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(this.table.options.autoColumns && columnsChanged && this.table.initialized){\n\t\t\t\t\tthis.table.columnManager.generateColumnsFromRowData(data);\n\t\t\t\t}\n\t\t\t\tthis.resetScroll();\n\t\t\t\t\n\t\t\t\tthis._setDataActual(data);\n\t\t\t}\n\t\t\t\n\t\t\tresolve();\n\t\t});\n\t}\n\t\n\t_setDataActual(data, renderInPosition){\n\t\tthis.dispatchExternal(\"dataProcessing\", data);\n\t\t\n\t\tthis._wipeElements();\n\t\t\n\t\tif(Array.isArray(data)){\n\t\t\tthis.dispatch(\"data-processing\", data);\n\t\t\t\n\t\t\tdata.forEach((def, i) => {\n\t\t\t\tif(def && typeof def === \"object\"){\n\t\t\t\t\tvar row = new Row(def, this);\n\t\t\t\t\tthis.rows.push(row);\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Data Loading Warning - Invalid row data detected and ignored, expecting object but received:\", def);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthis.refreshActiveData(false, false, renderInPosition);\n\t\t\t\n\t\t\tthis.dispatch(\"data-processed\", data);\n\t\t\tthis.dispatchExternal(\"dataProcessed\", data);\n\t\t}else{\n\t\t\tconsole.error(\"Data Loading Error - Unable to process data due to invalid data type \\nExpecting: array \\nReceived: \", typeof data, \"\\nData: \", data);\n\t\t}\n\t}\n\t\n\t_wipeElements(){\n\t\tthis.dispatch(\"rows-wipe\");\n\t\t\n\t\tthis.destroy();\n\t\t\n\t\tthis.adjustTableSize();\n\n\t\tthis.dispatch(\"rows-wiped\");\n\t}\n\n\tdestroy(){\n\t\tthis.rows.forEach((row) => {\n\t\t\trow.wipe();\n\t\t});\n\n\t\tthis.rows = [];\n\t\tthis.activeRows = [];\n\t\tthis.activeRowsPipeline = [];\n\t\tthis.activeRowsCount = 0;\n\t\tthis.displayRows = [];\n\t\tthis.displayRowsCount = 0;\n\t}\n\t\n\tdeleteRow(row, blockRedraw){\n\t\tvar allIndex = this.rows.indexOf(row),\n\t\tactiveIndex = this.activeRows.indexOf(row);\n\t\t\n\t\tif(activeIndex > -1){\n\t\t\tthis.activeRows.splice(activeIndex, 1);\n\t\t}\n\t\t\n\t\tif(allIndex > -1){\n\t\t\tthis.rows.splice(allIndex, 1);\n\t\t}\n\t\t\n\t\tthis.setActiveRows(this.activeRows);\n\t\t\n\t\tthis.displayRowIterator((rows) => {\n\t\t\tvar displayIndex = rows.indexOf(row);\n\t\t\t\n\t\t\tif(displayIndex > -1){\n\t\t\t\trows.splice(displayIndex, 1);\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(!blockRedraw){\n\t\t\tthis.reRenderInPosition();\n\t\t}\n\t\t\n\t\tthis.regenerateRowPositions();\n\t\t\n\t\tthis.dispatchExternal(\"rowDeleted\", row.getComponent());\n\t\t\n\t\tif(!this.displayRowsCount){\n\t\t\tthis.tableEmpty();\n\t\t}\n\t\t\n\t\tif(this.subscribedExternal(\"dataChanged\")){\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.getData());\n\t\t}\n\t}\n\t\n\taddRow(data, pos, index, blockRedraw){\n\t\tvar row = this.addRowActual(data, pos, index, blockRedraw);\n\t\treturn row;\n\t}\n\t\n\t//add multiple rows\n\taddRows(data, pos, index, refreshDisplayOnly){\n\t\tvar rows = [];\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tpos = this.findAddRowPos(pos);\n\t\t\t\n\t\t\tif(!Array.isArray(data)){\n\t\t\t\tdata = [data];\n\t\t\t}\n\t\t\t\n\t\t\tif((typeof index == \"undefined\" && pos) || (typeof index !== \"undefined\" && !pos)){\n\t\t\t\tdata.reverse();\n\t\t\t}\n\t\t\t\n\t\t\tdata.forEach((item, i) => {\n\t\t\t\tvar row = this.addRow(item, pos, index, true);\n\t\t\t\trows.push(row);\n\t\t\t\tthis.dispatch(\"row-added\", row, item, pos, index);\n\t\t\t});\n\n\t\t\tthis.refreshActiveData(refreshDisplayOnly ? \"displayPipeline\" : false, false, true);\n\t\t\t\n\t\t\tthis.regenerateRowPositions();\n\t\t\t\n\t\t\tif(rows.length){\n\t\t\t\tthis._clearPlaceholder();\n\t\t\t}\n\t\t\t\n\t\t\tresolve(rows);\n\t\t});\n\t}\n\t\n\tfindAddRowPos(pos){\n\t\tif(typeof pos === \"undefined\"){\n\t\t\tpos = this.table.options.addRowPos;\n\t\t}\n\t\t\n\t\tif(pos === \"pos\"){\n\t\t\tpos = true;\n\t\t}\n\t\t\n\t\tif(pos === \"bottom\"){\n\t\t\tpos = false;\n\t\t}\n\t\t\n\t\treturn pos;\n\t}\n\t\n\taddRowActual(data, pos, index, blockRedraw){\n\t\tvar row = data instanceof Row ? data : new Row(data || {}, this),\n\t\ttop = this.findAddRowPos(pos),\n\t\tallIndex = -1,\n\t\tactiveIndex, chainResult;\n\t\t\n\t\tif(!index){\n\t\t\tchainResult = this.chain(\"row-adding-position\", [row, top], null, {index, top});\n\t\t\t\n\t\t\tindex = chainResult.index;\n\t\t\ttop = chainResult.top;\n\t\t}\n\t\t\n\t\tif(typeof index !== \"undefined\"){\n\t\t\tindex = this.findRow(index);\n\t\t}\n\t\t\n\t\tindex = this.chain(\"row-adding-index\", [row, index, top], null, index);\n\t\t\n\t\tif(index){\n\t\t\tallIndex = this.rows.indexOf(index);\n\t\t}\n\t\t\n\t\tif(index && allIndex > -1){\n\t\t\tactiveIndex = this.activeRows.indexOf(index);\n\t\t\t\n\t\t\tthis.displayRowIterator(function(rows){\n\t\t\t\tvar displayIndex = rows.indexOf(index);\n\t\t\t\t\n\t\t\t\tif(displayIndex > -1){\n\t\t\t\t\trows.splice((top ? displayIndex : displayIndex + 1), 0, row);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif(activeIndex > -1){\n\t\t\t\tthis.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row);\n\t\t\t}\n\t\t\t\n\t\t\tthis.rows.splice((top ? allIndex : allIndex + 1), 0, row);\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tif(top){\n\t\t\t\t\n\t\t\t\tthis.displayRowIterator(function(rows){\n\t\t\t\t\trows.unshift(row);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.activeRows.unshift(row);\n\t\t\t\tthis.rows.unshift(row);\n\t\t\t}else{\n\t\t\t\tthis.displayRowIterator(function(rows){\n\t\t\t\t\trows.push(row);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.activeRows.push(row);\n\t\t\t\tthis.rows.push(row);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.setActiveRows(this.activeRows);\n\t\t\n\t\tthis.dispatchExternal(\"rowAdded\", row.getComponent());\n\t\t\n\t\tif(this.subscribedExternal(\"dataChanged\")){\n\t\t\tthis.dispatchExternal(\"dataChanged\", this.table.rowManager.getData());\n\t\t}\n\t\t\n\t\tif(!blockRedraw){\n\t\t\tthis.reRenderInPosition();\n\t\t}\n\t\t\n\t\treturn row;\n\t}\n\t\n\tmoveRow(from, to, after){\n\t\tthis.dispatch(\"row-move\", from, to, after);\n\t\t\n\t\tthis.moveRowActual(from, to, after);\n\t\t\n\t\tthis.regenerateRowPositions();\n\t\t\n\t\tthis.dispatch(\"row-moved\", from, to, after);\n\t\tthis.dispatchExternal(\"rowMoved\", from.getComponent());\n\t}\n\t\n\tmoveRowActual(from, to, after){\n\t\tthis.moveRowInArray(this.rows, from, to, after);\n\t\tthis.moveRowInArray(this.activeRows, from, to, after);\n\t\t\n\t\tthis.displayRowIterator((rows) => {\n\t\t\tthis.moveRowInArray(rows, from, to, after);\n\t\t});\n\t\t\n\t\tthis.dispatch(\"row-moving\", from, to, after);\n\t}\n\t\n\tmoveRowInArray(rows, from, to, after){\n\t\tvar\tfromIndex, toIndex, start, end;\n\t\t\n\t\tif(from !== to){\n\t\t\t\n\t\t\tfromIndex = rows.indexOf(from);\n\t\t\t\n\t\t\tif (fromIndex > -1) {\n\t\t\t\t\n\t\t\t\trows.splice(fromIndex, 1);\n\t\t\t\t\n\t\t\t\ttoIndex = rows.indexOf(to);\n\t\t\t\t\n\t\t\t\tif (toIndex > -1) {\n\t\t\t\t\t\n\t\t\t\t\tif(after){\n\t\t\t\t\t\trows.splice(toIndex+1, 0, from);\n\t\t\t\t\t}else{\n\t\t\t\t\t\trows.splice(toIndex, 0, from);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\trows.splice(fromIndex, 0, from);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//restyle rows\n\t\t\tif(rows === this.getDisplayRows()){\n\t\t\t\t\n\t\t\t\tstart = fromIndex < toIndex ? fromIndex : toIndex;\n\t\t\t\tend = toIndex > fromIndex ? toIndex : fromIndex +1;\n\t\t\t\t\n\t\t\t\tfor(let i = start; i <= end; i++){\n\t\t\t\t\tif(rows[i]){\n\t\t\t\t\t\tthis.styleRow(rows[i], i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tclearData(){\n\t\tthis.setData([]);\n\t}\n\t\n\tgetRowIndex(row){\n\t\treturn this.findRowIndex(row, this.rows);\n\t}\n\t\n\tgetDisplayRowIndex(row){\n\t\tvar index = this.getDisplayRows().indexOf(row);\n\t\treturn index > -1 ? index : false;\n\t}\n\t\n\tnextDisplayRow(row, rowOnly){\n\t\tvar index = this.getDisplayRowIndex(row),\n\t\tnextRow = false;\n\t\t\n\t\t\n\t\tif(index !== false && index < this.displayRowsCount -1){\n\t\t\tnextRow = this.getDisplayRows()[index+1];\n\t\t}\n\t\t\n\t\tif(nextRow && (!(nextRow instanceof Row) || nextRow.type != \"row\")){\n\t\t\treturn this.nextDisplayRow(nextRow, rowOnly);\n\t\t}\n\t\t\n\t\treturn nextRow;\n\t}\n\t\n\tprevDisplayRow(row, rowOnly){\n\t\tvar index = this.getDisplayRowIndex(row),\n\t\tprevRow = false;\n\t\t\n\t\tif(index){\n\t\t\tprevRow = this.getDisplayRows()[index-1];\n\t\t}\n\t\t\n\t\tif(rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != \"row\")){\n\t\t\treturn this.prevDisplayRow(prevRow, rowOnly);\n\t\t}\n\t\t\n\t\treturn prevRow;\n\t}\n\t\n\tfindRowIndex(row, list){\n\t\tvar rowIndex;\n\t\t\n\t\trow = this.findRow(row);\n\t\t\n\t\tif(row){\n\t\t\trowIndex = list.indexOf(row);\n\t\t\t\n\t\t\tif(rowIndex > -1){\n\t\t\t\treturn rowIndex;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\t\n\tgetData(active, transform){\n\t\tvar output = [],\n\t\trows = this.getRows(active);\n\t\t\n\t\trows.forEach(function(row){\n\t\t\tif(row.type == \"row\"){\n\t\t\t\toutput.push(row.getData(transform || \"data\"));\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetComponents(active){\n\t\tvar\toutput = [],\n\t\trows = this.getRows(active);\n\t\t\n\t\trows.forEach(function(row){\n\t\t\toutput.push(row.getComponent());\n\t\t});\n\t\t\n\t\treturn output;\n\t}\n\t\n\tgetDataCount(active){\n\t\tvar rows = this.getRows(active);\n\t\t\n\t\treturn rows.length;\n\t}\n\t\n\tscrollHorizontal(left){\n\t\tthis.scrollLeft = left;\n\t\tthis.element.scrollLeft = left;\n\t\t\n\t\tthis.dispatch(\"scroll-horizontal\", left);\n\t}\n\t\n\tregisterDataPipelineHandler(handler, priority){\n\t\tif(typeof priority !== \"undefined\"){\n\t\t\tthis.dataPipeline.push({handler, priority});\n\t\t\tthis.dataPipeline.sort((a, b) => {\n\t\t\t\treturn a.priority - b.priority;\n\t\t\t});\n\t\t}else{\n\t\t\tconsole.error(\"Data pipeline handlers must have a priority in order to be registered\");\n\t\t}\n\t}\n\t\n\tregisterDisplayPipelineHandler(handler, priority){\n\t\tif(typeof priority !== \"undefined\"){\n\t\t\tthis.displayPipeline.push({handler, priority});\n\t\t\tthis.displayPipeline.sort((a, b) => {\n\t\t\t\treturn a.priority - b.priority;\n\t\t\t});\n\t\t}else{\n\t\t\tconsole.error(\"Display pipeline handlers must have a priority in order to be registered\");\n\t\t}\n\t}\n\t\n\t//set active data set\n\trefreshActiveData(handler, skipStage, renderInPosition){\n\t\tvar table = this.table,\n\t\tstage = \"\",\n\t\tindex = 0,\n\t\tcascadeOrder = [\"all\", \"dataPipeline\", \"display\", \"displayPipeline\", \"end\"];\n\t\t\n\t\tif(!this.table.destroyed){\n\t\t\tif(typeof handler === \"function\"){\n\t\t\t\tindex = this.dataPipeline.findIndex((item) => {\n\t\t\t\t\treturn item.handler === handler;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif(index > -1){\n\t\t\t\t\tstage = \"dataPipeline\";\n\t\t\t\t\t\n\t\t\t\t\tif(skipStage){\n\t\t\t\t\t\tif(index == this.dataPipeline.length - 1){\n\t\t\t\t\t\t\tstage = \"display\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tindex = this.displayPipeline.findIndex((item) => {\n\t\t\t\t\t\treturn item.handler === handler;\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tif(index > -1){\n\t\t\t\t\t\tstage = \"displayPipeline\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(skipStage){\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\n\t\t\t\t\t\t\t\tstage = \"end\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.error(\"Unable to refresh data, invalid handler provided\", handler);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tstage = handler || \"all\";\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.redrawBlock){\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\n\t\t\t\t\t\thandler: handler,\n\t\t\t\t\t\tskipStage: skipStage,\n\t\t\t\t\t\trenderInPosition: renderInPosition,\n\t\t\t\t\t\tstage:stage,\n\t\t\t\t\t\tindex:index,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tif(Helpers.elVisible(this.element)){\n\t\t\t\t\tif(renderInPosition){\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!handler){\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.renderTable();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.dispatch(\"data-refreshed\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\trefreshPipelines(handler, stage, index, renderInPosition){\n\t\tthis.dispatch(\"data-refreshing\");\n\t\t\n\t\tif(!handler){\n\t\t\tthis.activeRowsPipeline[0] = this.rows.slice(0);\n\t\t}\n\t\t\n\t\t//cascade through data refresh stages\n\t\tswitch(stage){\n\t\t\tcase \"all\":\n\t\t\t//handle case where all data needs refreshing\n\t\t\t\n\t\t\tcase \"dataPipeline\":\n\t\t\t\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\n\t\t\t\t\t\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\n\t\t\t\t\n\t\t\tcase \"display\":\n\t\t\t\tindex = 0;\n\t\t\t\tthis.resetDisplayRows();\n\t\t\t\t\n\t\t\tcase \"displayPipeline\":\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\n\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\n\t\t\t\t}\n\t\t\t\n\t\t\tcase \"end\":\n\t\t\t\t//case to handle scenario when trying to skip past end stage\n\t\t\t\tthis.regenerateRowPositions();\n\t\t}\n\n\t\tif(this.getDisplayRows().length){\n\t\t\tthis._clearPlaceholder();\n\t\t}\n\t}\n\t\n\t//regenerate row positions\n\tregenerateRowPositions(){\n\t\tvar rows = this.getDisplayRows();\n\t\tvar index = 1;\n\t\t\n\t\trows.forEach((row) => {\n\t\t\tif (row.type === \"row\"){\n\t\t\t\trow.setPosition(index);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t});\n\t}\n\t\n\tsetActiveRows(activeRows){\n\t\tthis.activeRows = this.activeRows = Object.assign([], activeRows);\n\t\tthis.activeRowsCount = this.activeRows.length;\n\t}\n\t\n\t//reset display rows array\n\tresetDisplayRows(){\n\t\tthis.displayRows = [];\n\t\t\n\t\tthis.displayRows.push(this.activeRows.slice(0));\n\t\t\n\t\tthis.displayRowsCount = this.displayRows[0].length;\n\t}\n\t\n\t//set display row pipeline data\n\tsetDisplayRows(displayRows, index){\n\t\tthis.displayRows[index] = displayRows;\n\n\t\tif(index == this.displayRows.length -1){\n\t\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\n\t\t}\n\t}\n\t\n\tgetDisplayRows(index){\n\t\tif(typeof index == \"undefined\"){\n\t\t\treturn this.displayRows.length ? this.displayRows[this.displayRows.length -1] : [];\n\t\t}else{\n\t\t\treturn this.displayRows[index] || [];\n\t\t}\n\t}\n\t\n\tgetVisibleRows(chain, viewable){\n\t\tvar rows = Object.assign([], this.renderer.visibleRows(!viewable));\n\t\t\n\t\tif(chain){\n\t\t\trows = this.chain(\"rows-visible\", [viewable], rows, rows);\n\t\t}\n\t\t\n\t\treturn rows;\n\t}\n\t\n\t//repeat action across display rows\n\tdisplayRowIterator(callback){\n\t\tthis.activeRowsPipeline.forEach(callback);\n\t\tthis.displayRows.forEach(callback);\n\t\t\n\t\tthis.displayRowsCount = this.displayRows[this.displayRows.length -1].length;\n\t}\n\t\n\t//return only actual rows (not group headers etc)\n\tgetRows(type){\n\t\tvar rows = [];\n\n\t\tswitch(type){\n\t\t\tcase \"active\":\n\t\t\t\trows = this.activeRows;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"display\":\n\t\t\t\trows = this.table.rowManager.getDisplayRows();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"visible\":\n\t\t\t\trows = this.getVisibleRows(false, true);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\n\t\t}\n\t\t\n\t\treturn rows;\n\t}\n\t\n\t///////////////// Table Rendering /////////////////\n\t//trigger rerender of table in current position\n\treRenderInPosition(callback){\n\t\tif(this.redrawBlock){\n\t\t\tif(callback){\n\t\t\t\tcallback();\n\t\t\t}else{\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\n\t\t\t}\n\t\t}else{\n\t\t\tthis.dispatchExternal(\"renderStarted\");\n\t\t\t\n\t\t\tthis.renderer.rerenderRows(callback);\n\n\t\t\tif(!this.fixedHeight){\n\t\t\t\tthis.adjustTableSize();\n\t\t\t}\n\n\t\t\tthis.scrollBarCheck();\n\t\t\t\n\t\t\tthis.dispatchExternal(\"renderComplete\");\n\t\t}\n\t}\n\n\tscrollBarCheck(){\n\t\tvar scrollbarWidth = 0;\n\n\t\t//adjust for vertical scrollbar moving table when present\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\n\t\t}\n\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\n\t\t}\n\t}\n\t\n\tinitializeRenderer(){\n\t\tvar renderClass;\n\t\t\n\t\tvar renderers = {\n\t\t\t\"virtual\": RendererVirtualDomVertical,\n\t\t\t\"basic\": RendererBasicVertical,\n\t\t};\n\t\t\n\t\tif(typeof this.table.options.renderVertical === \"string\"){\n\t\t\trenderClass = renderers[this.table.options.renderVertical];\n\t\t}else{\n\t\t\trenderClass = this.table.options.renderVertical;\n\t\t}\n\t\t\n\t\tif(renderClass){\n\t\t\tthis.renderMode = this.table.options.renderVertical;\n\t\t\t\n\t\t\tthis.renderer = new renderClass(this.table, this.element, this.tableElement);\n\t\t\tthis.renderer.initialize();\n\t\t\t\n\t\t\tif((this.table.element.clientHeight || this.table.options.height) && !(this.table.options.minHeight && this.table.options.maxHeight)){\n\t\t\t\tthis.fixedHeight = true;\n\t\t\t}else{\n\t\t\t\tthis.fixedHeight = false;\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderVertical);\n\t\t}\n\t}\n\t\n\tgetRenderMode(){\n\t\treturn this.renderMode;\n\t}\n\t\n\trenderTable(){\n\t\tthis.dispatchExternal(\"renderStarted\");\n\t\t\n\t\tthis.element.scrollTop = 0;\n\t\t\n\t\tthis._clearTable();\n\t\t\n\t\tif(this.displayRowsCount){\n\t\t\tthis.renderer.renderRows();\n\t\t\t\n\t\t\tif(this.firstRender){\n\t\t\t\tthis.firstRender = false;\n\n\t\t\t\tif(!this.fixedHeight){\n\t\t\t\t\tthis.adjustTableSize();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.layoutRefresh(true);\n\t\t\t}\n\t\t}else{\n\t\t\tthis.renderEmptyScroll();\n\t\t}\n\t\t\n\t\tif(!this.fixedHeight){\n\t\t\tthis.adjustTableSize();\n\t\t}\n\t\t\n\t\tthis.dispatch(\"table-layout\");\n\t\t\n\t\tif(!this.displayRowsCount){\n\t\t\tthis._showPlaceholder();\n\t\t}\n\n\t\tthis.scrollBarCheck();\n\t\t\n\t\tthis.dispatchExternal(\"renderComplete\");\n\t}\n\t\n\t//show scrollbars on empty table div\n\trenderEmptyScroll(){\n\t\tif(this.placeholder){\n\t\t\tthis.tableElement.style.display = \"none\";\n\t\t}else{\n\t\t\tthis.tableElement.style.minWidth = this.table.columnManager.getWidth() + \"px\";\n\t\t\t// this.tableElement.style.minHeight = \"1px\";\n\t\t\t// this.tableElement.style.visibility = \"hidden\";\n\t\t}\n\t}\n\t\n\t_clearTable(){\t\n\t\tthis._clearPlaceholder();\n\t\t\n\t\tthis.scrollTop = 0;\n\t\tthis.scrollLeft = 0;\n\t\t\n\t\tthis.renderer.clearRows();\n\t}\n\n\ttableEmpty(){\n\t\tthis.renderEmptyScroll();\n\t\tthis._showPlaceholder();\n\t}\n\t\n\t_showPlaceholder(){\n\t\tif(this.placeholder){\n\t\t\tthis.placeholder.setAttribute(\"tabulator-render-mode\", this.renderMode);\n\t\t\t\n\t\t\tthis.getElement().appendChild(this.placeholder);\n\t\t\tthis._positionPlaceholder();\n\t\t}\n\t}\n\t\n\t_clearPlaceholder(){\n\t\tif(this.placeholder && this.placeholder.parentNode){\n\t\t\tthis.placeholder.parentNode.removeChild(this.placeholder);\n\t\t}\n\n\t\t// clear empty table placeholder min\n\t\tthis.tableElement.style.minWidth = \"\";\n\t\tthis.tableElement.style.display = \"\";\n\t}\n\t\n\t_positionPlaceholder(){\n\t\tif(this.placeholder && this.placeholder.parentNode){\n\t\t\tthis.placeholder.style.width = this.table.columnManager.getWidth() + \"px\";\n\t\t\tthis.placeholderContents.style.width = this.table.rowManager.element.clientWidth + \"px\";\n\t\t\tthis.placeholderContents.style.marginLeft = this.scrollLeft + \"px\";\n\t\t}\n\t}\n\t\n\tstyleRow(row, index){\n\t\tvar rowEl = row.getElement();\n\t\t\n\t\tif(index % 2){\n\t\t\trowEl.classList.add(\"tabulator-row-even\");\n\t\t\trowEl.classList.remove(\"tabulator-row-odd\");\n\t\t}else{\n\t\t\trowEl.classList.add(\"tabulator-row-odd\");\n\t\t\trowEl.classList.remove(\"tabulator-row-even\");\n\t\t}\n\t}\n\t\n\t//normalize height of active rows\n\tnormalizeHeight(){\n\t\tthis.activeRows.forEach(function(row){\n\t\t\trow.normalizeHeight();\n\t\t});\n\t}\n\t\n\t//adjust the height of the table holder to fit in the Tabulator element\n\tadjustTableSize(){\n\t\tvar initialHeight = this.element.clientHeight, minHeight;\n\t\t\n\t\tif(this.renderer.verticalFillMode === \"fill\"){\n\t\t\tlet otherHeight = Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && this.table.footerManager.active && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0));\n\t\t\t\n\t\t\tif(this.fixedHeight){\n\t\t\t\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\n\t\t\t\t\n\t\t\t\tthis.element.style.minHeight = minHeight || \"calc(100% - \" + otherHeight + \"px)\";\n\t\t\t\tthis.element.style.height = \"calc(100% - \" + otherHeight + \"px)\";\n\t\t\t\tthis.element.style.maxHeight = \"calc(100% - \" + otherHeight + \"px)\";\n\t\t\t}else{\n\t\t\t\tthis.element.style.height = \"\";\n\t\t\t\tthis.element.style.height = (this.table.element.clientHeight - otherHeight) + \"px\";\n\t\t\t\tthis.element.scrollTop = this.scrollTop;\n\t\t\t}\n\t\t\t\n\t\t\tthis.renderer.resize();\n\t\t\t\n\t\t\t//check if the table has changed size when dealing with variable height tables\n\t\t\tif(!this.fixedHeight && initialHeight != this.element.clientHeight){\n\t\t\t\tif(this.subscribed(\"table-resize\")){\n\t\t\t\t\tthis.dispatch(\"table-resize\");\n\t\t\t\t}else{\n\t\t\t\t\tthis.redraw();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.scrollBarCheck();\n\t\t}\n\t\t\n\t\tthis._positionPlaceholder();\n\t}\n\t\n\t//reinitialize all rows\n\treinitialize(){\n\t\tthis.rows.forEach(function(row){\n\t\t\trow.reinitialize(true);\n\t\t});\n\t}\n\t\n\t//prevent table from being redrawn\n\tblockRedraw (){\n\t\tthis.redrawBlock = true;\n\t\tthis.redrawBlockRestoreConfig = false;\n\t}\n\t\n\t//restore table redrawing\n\trestoreRedraw (){\n\t\tthis.redrawBlock = false;\n\t\t\n\t\tif(this.redrawBlockRestoreConfig){\n\t\t\tthis.refreshActiveData(this.redrawBlockRestoreConfig.handler, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition);\n\t\t\t\n\t\t\tthis.redrawBlockRestoreConfig = false;\n\t\t}else{\n\t\t\tif(this.redrawBlockRenderInPosition){\n\t\t\t\tthis.reRenderInPosition();\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.redrawBlockRenderInPosition = false;\n\t}\n\t\n\t//redraw table\n\tredraw (force){\n\t\tvar left = this.scrollLeft;\n\t\t\n\t\tthis.adjustTableSize();\n\t\t\n\t\tthis.table.tableWidth = this.table.element.clientWidth;\n\t\t\n\t\tif(!force){\n\t\t\tthis.reRenderInPosition();\n\t\t\tthis.scrollHorizontal(left);\n\t\t}else{\n\t\t\tthis.renderTable();\n\t\t}\n\t}\n\t\n\tresetScroll(){\n\t\tthis.element.scrollLeft = 0;\n\t\tthis.element.scrollTop = 0;\n\t\t\n\t\tif(this.table.browser === \"ie\"){\n\t\t\tvar event = document.createEvent(\"Event\");\n\t\t\tevent.initEvent(\"scroll\", false, true);\n\t\t\tthis.element.dispatchEvent(event);\n\t\t}else{\n\t\t\tthis.element.dispatchEvent(new Event('scroll'));\n\t\t}\n\t}\n}\n","import CoreFeature from './CoreFeature.js';\n\nexport default class FooterManager extends CoreFeature{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.active = false;\n\t\tthis.element = this.createElement(); //containing element\n\t\tthis.containerElement = this.createContainerElement(); //containing element\n\t\tthis.external = false;\n\t}\n\n\tinitialize(){\n\t\tthis.initializeElement();\n\t}\n\n\tcreateElement(){\n\t\tvar el = document.createElement(\"div\");\n\n\t\tel.classList.add(\"tabulator-footer\");\n\n\t\treturn el;\n\t}\n\n\t\n\tcreateContainerElement(){\n\t\tvar el = document.createElement(\"div\");\n\n\t\tel.classList.add(\"tabulator-footer-contents\");\n\n\t\tthis.element.appendChild(el);\n\n\t\treturn el;\n\t}\n\n\tinitializeElement(){\n\t\tif(this.table.options.footerElement){\n\n\t\t\tswitch(typeof this.table.options.footerElement){\n\t\t\t\tcase \"string\":\n\t\t\t\t\tif(this.table.options.footerElement[0] === \"<\"){\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.external = true;\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.element = this.table.options.footerElement;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetElement(){\n\t\treturn this.element;\n\t}\n\n\tappend(element){\n\t\tthis.activate();\n\n\t\tthis.containerElement.appendChild(element);\n\t\tthis.table.rowManager.adjustTableSize();\n\t}\n\n\tprepend(element){\n\t\tthis.activate();\n\n\t\tthis.element.insertBefore(element, this.element.firstChild);\n\t\tthis.table.rowManager.adjustTableSize();\n\t}\n\n\tremove(element){\n\t\telement.parentNode.removeChild(element);\n\t\tthis.deactivate();\n\t}\n\n\tdeactivate(force){\n\t\tif(!this.element.firstChild || force){\n\t\t\tif(!this.external){\n\t\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t\t}\n\t\t\tthis.active = false;\n\t\t}\n\t}\n\n\tactivate(){\n\t\tif(!this.active){\n\t\t\tthis.active = true;\n\t\t\tif(!this.external){\n\t\t\t\tthis.table.element.appendChild(this.getElement());\n\t\t\t\tthis.table.element.style.display = '';\n\t\t\t}\n\t\t}\n\t}\n\n\tredraw(){\n\t\tthis.dispatch(\"footer-redraw\");\n\t}\n}","import CoreFeature from '../CoreFeature.js';\nimport Row from '../row/Row.js';\n\nexport default class InteractionManager extends CoreFeature {\n\t\n\tconstructor (table){\n\t\tsuper(table);\n\t\t\n\t\tthis.el = null;\n\t\t\n\t\tthis.abortClasses = [\"tabulator-headers\", \"tabulator-table\"];\n\t\t\n\t\tthis.previousTargets = {};\n\t\t\n\t\tthis.listeners = [\n\t\t\t\"click\",\n\t\t\t\"dblclick\",\n\t\t\t\"contextmenu\",\n\t\t\t\"mouseenter\",\n\t\t\t\"mouseleave\",\n\t\t\t\"mouseover\",\n\t\t\t\"mouseout\",\n\t\t\t\"mousemove\",\n\t\t\t\"mouseup\",\n\t\t\t\"mousedown\",\n\t\t\t\"touchstart\",\n\t\t\t\"touchend\",\n\t\t];\n\t\t\n\t\tthis.componentMap = {\n\t\t\t\"tabulator-cell\":\"cell\",\n\t\t\t\"tabulator-row\":\"row\",\n\t\t\t\"tabulator-group\":\"group\",\n\t\t\t\"tabulator-col\":\"column\",\n\t\t};\n\t\t\n\t\tthis.pseudoTrackers = {\n\t\t\t\"row\":{\n\t\t\t\tsubscriber:null,\n\t\t\t\ttarget:null,\n\t\t\t},\n\t\t\t\"cell\":{\n\t\t\t\tsubscriber:null,\n\t\t\t\ttarget:null,\n\t\t\t},\n\t\t\t\"group\":{\n\t\t\t\tsubscriber:null,\n\t\t\t\ttarget:null,\n\t\t\t},\n\t\t\t\"column\":{\n\t\t\t\tsubscriber:null,\n\t\t\t\ttarget:null,\n\t\t\t},\n\t\t};\n\t\t\n\t\tthis.pseudoTracking = false;\n\t}\n\t\n\tinitialize(){\n\t\tthis.el = this.table.element;\n\t\t\n\t\tthis.buildListenerMap();\n\t\tthis.bindSubscriptionWatchers();\n\t}\n\t\n\tbuildListenerMap(){\n\t\tvar listenerMap = {};\n\t\t\n\t\tthis.listeners.forEach((listener) => {\n\t\t\tlistenerMap[listener] = {\n\t\t\t\thandler:null,\n\t\t\t\tcomponents:[],\n\t\t\t};\n\t\t});\n\t\t\n\t\tthis.listeners = listenerMap;\n\t}\n\t\n\tbindPseudoEvents(){\n\t\tObject.keys(this.pseudoTrackers).forEach((key) => {\n\t\t\tthis.pseudoTrackers[key].subscriber = this.pseudoMouseEnter.bind(this, key);\n\t\t\tthis.subscribe(key + \"-mouseover\", this.pseudoTrackers[key].subscriber);\n\t\t});\n\t\t\n\t\tthis.pseudoTracking = true;\n\t}\n\t\n\tpseudoMouseEnter(key, e, target){\n\t\tif(this.pseudoTrackers[key].target !== target){\n\t\t\t\n\t\t\tif(this.pseudoTrackers[key].target){\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, this.pseudoTrackers[key].target);\n\t\t\t}\n\t\t\t\n\t\t\tthis.pseudoMouseLeave(key, e);\n\t\t\t\n\t\t\tthis.pseudoTrackers[key].target = target;\n\t\t\t\n\t\t\tthis.dispatch(key + \"-mouseenter\", e, target);\n\t\t}\n\t}\n\t\n\tpseudoMouseLeave(key, e){\n\t\tvar leaveList = Object.keys(this.pseudoTrackers),\n\t\tlinkedKeys = {\n\t\t\t\"row\":[\"cell\"],\n\t\t\t\"cell\":[\"row\"],\n\t\t};\n\t\t\n\t\tleaveList = leaveList.filter((item) => {\n\t\t\tvar links = linkedKeys[key];\n\t\t\treturn item !== key && (!links || (links && !links.includes(item)));\n\t\t});\n\t\t\n\t\t\n\t\tleaveList.forEach((key) => {\n\t\t\tvar target = this.pseudoTrackers[key].target;\n\t\t\t\n\t\t\tif(this.pseudoTrackers[key].target){\n\t\t\t\tthis.dispatch(key + \"-mouseleave\", e, target);\n\t\t\t\t\n\t\t\t\tthis.pseudoTrackers[key].target = null;\n\t\t\t}\n\t\t});\n\t}\n\t\n\t\n\tbindSubscriptionWatchers(){\n\t\tvar listeners = Object.keys(this.listeners),\n\t\tcomponents = Object.values(this.componentMap);\n\t\t\n\t\tfor(let comp of components){\n\t\t\tfor(let listener of listeners){\n\t\t\t\tlet key = comp + \"-\" + listener;\n\t\t\t\t\n\t\t\t\tthis.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.subscribe(\"table-destroy\", this.clearWatchers.bind(this));\n\t}\n\t\n\tsubscriptionChanged(component, key, added){\n\t\tvar listener = this.listeners[key].components,\n\t\tindex = listener.indexOf(component),\n\t\tchanged = false;\n\t\t\n\t\tif(added){\n\t\t\tif(index === -1){\n\t\t\t\tlistener.push(component);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}else{\n\t\t\tif(!this.subscribed(component + \"-\" + key)){\n\t\t\t\tif(index > -1){\n\t\t\t\t\tlistener.splice(index, 1);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif((key === \"mouseenter\" || key === \"mouseleave\") && !this.pseudoTracking){\n\t\t\tthis.bindPseudoEvents();\n\t\t}\n\t\t\n\t\tif(changed){\n\t\t\tthis.updateEventListeners();\n\t\t}\n\t}\n\t\n\tupdateEventListeners(){\n\t\tfor(let key in this.listeners){\n\t\t\tlet listener = this.listeners[key];\n\t\t\t\n\t\t\tif(listener.components.length){\n\t\t\t\tif(!listener.handler){\n\t\t\t\t\tlistener.handler = this.track.bind(this, key);\n\t\t\t\t\tthis.el.addEventListener(key, listener.handler);\n\t\t\t\t\t// this.el.addEventListener(key, listener.handler, {passive: true})\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(listener.handler){\n\t\t\t\t\tthis.el.removeEventListener(key, listener.handler);\n\t\t\t\t\tlistener.handler = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\ttrack(type, e){\n\t\tvar path = (e.composedPath && e.composedPath()) || e.path;\n\t\t\n\t\tvar targets = this.findTargets(path);\n\t\ttargets = this.bindComponents(type, targets);\n\t\t\n\t\tthis.triggerEvents(type, e, targets);\n\t\t\n\t\tif(this.pseudoTracking && (type == \"mouseover\" || type == \"mouseleave\") && !Object.keys(targets).length){\n\t\t\tthis.pseudoMouseLeave(\"none\", e);\n\t\t}\n\t}\n\t\n\tfindTargets(path){\n\t\tvar targets = {};\n\t\t\n\t\tlet componentMap = Object.keys(this.componentMap);\n\t\t\n\t\tfor (let el of path) {\n\t\t\tlet classList = el.classList ? [...el.classList] : [];\n\t\t\t\n\t\t\tlet abort = classList.filter((item) => {\n\t\t\t\treturn this.abortClasses.includes(item);\n\t\t\t});\n\t\t\t\n\t\t\tif(abort.length){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tlet elTargets = classList.filter((item) => {\n\t\t\t\treturn componentMap.includes(item);\n\t\t\t});\n\t\t\t\n\t\t\tfor (let target of elTargets) {\n\t\t\t\tif(!targets[this.componentMap[target]]){\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(targets.group && targets.group === targets.row){\n\t\t\tdelete targets.row;\n\t\t}\n\t\t\n\t\treturn targets;\n\t}\n\t\n\tbindComponents(type, targets){\n\t\t//ensure row component is looked up before cell\n\t\tvar keys = Object.keys(targets).reverse(),\n\t\tlistener = this.listeners[type],\n\t\tmatches = {},\n\t\ttargetMatches = {};\n\t\t\n\t\tfor(let key of keys){\n\t\t\tlet component,\n\t\t\ttarget = targets[key],\n\t\t\tpreviousTarget = this.previousTargets[key];\n\t\t\t\n\t\t\tif(previousTarget && previousTarget.target === target){\n\t\t\t\tcomponent = previousTarget.component;\n\t\t\t}else{\n\t\t\t\tswitch(key){\n\t\t\t\t\tcase \"row\":\n\t\t\t\t\tcase \"group\":\n\t\t\t\t\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\n\t\t\t\t\t\t\tlet rows = this.table.rowManager.getVisibleRows(true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomponent = rows.find((row) => {\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\n\t\t\t\t\t\t\t\ttargets[key] = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"column\":\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"cell\":\n\t\t\t\t\t\tif(listener.components.includes(\"cell\")){\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\n\t\t\t\t\t\t\t}else{\t\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(component){\n\t\t\t\tmatches[key] = component;\n\t\t\t\ttargetMatches[key] = {\n\t\t\t\t\ttarget:target,\n\t\t\t\t\tcomponent:component,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.previousTargets = targetMatches;\n\t\t\n\t\treturn matches;\n\t}\n\t\n\ttriggerEvents(type, e, targets){\n\t\tvar listener = this.listeners[type];\n\n\t\tfor(let key in targets){\n\t\t\tif(targets[key] && listener.components.includes(key)){\n\t\t\t\tthis.dispatch(key + \"-\" + type, e, targets[key]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tclearWatchers(){\n\t\tfor(let key in this.listeners){\n\t\t\tlet listener = this.listeners[key];\n\t\t\t\n\t\t\tif(listener.handler){\n\t\t\t\tthis.el.removeEventListener(key, listener.handler);\n\t\t\t\tlistener.handler = null;\n\t\t\t}\n\t\t}\n\t}\n}","export default class ComponentFunctionBinder{\n\n\tconstructor(table){\n\t\tthis.table = table;\n\n\t\tthis.bindings = {};\n\t}\n\n\tbind(type, funcName, handler){\n\t\tif(!this.bindings[type]){\n\t\t\tthis.bindings[type] = {};\n\t\t}\n\n\t\tif(this.bindings[type][funcName]){\n\t\t\tconsole.warn(\"Unable to bind component handler, a matching function name is already bound\", type, funcName, handler);\n\t\t}else{\n\t\t\tthis.bindings[type][funcName] = handler;\n\t\t}\n\t}\n\n\thandle(type, component, name){\n\t\tif(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){\n\t\t\treturn this.bindings[type][name].bind(null, component);\n\t\t}else{\n\t\t\tif(name !== \"then\" && typeof name === \"string\" && !name.startsWith(\"_\")){\n\t\t\t\tif(this.table.options.debugInvalidComponentFuncs){\n\t\t\t\t\tconsole.error(\"The \" + type + \" component does not have a \" + name + \" function, have you checked that you have the correct Tabulator module installed?\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import CoreFeature from '../CoreFeature.js';\n\nexport default class DataLoader extends CoreFeature{\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.requestOrder = 0; //prevent requests coming out of sequence if overridden by another load request\n\t\tthis.loading = false;\n\t}\n\n\tinitialize(){}\n\n\tload(data, params, config, replace, silent, columnsChanged){\n\t\tvar requestNo = ++this.requestOrder;\n\n\t\tthis.dispatchExternal(\"dataLoading\", data);\n\n\t\t//parse json data to array\n\t\tif (data && (data.indexOf(\"{\") == 0 || data.indexOf(\"[\") == 0)){\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\n\t\tif(this.confirm(\"data-loading\", [data, params, config, silent])){\n\t\t\tthis.loading = true;\n\n\t\t\tif(!silent){\n\t\t\t\tthis.alertLoader();\n\t\t\t}\n\n\t\t\t//get params for request\n\t\t\tparams = this.chain(\"data-params\", [data, config, silent], params || {}, params || {});\n\n\t\t\tparams = this.mapParams(params, this.table.options.dataSendParams);\n\n\t\t\tvar result = this.chain(\"data-load\", [data, params, config, silent], false, Promise.resolve([]));\n\t\t\t\n\t\t\treturn result.then((response) => {\n\t\t\t\tif(!Array.isArray(response) && typeof response == \"object\"){\n\t\t\t\t\tresponse = this.mapParams(response, this.objectInvert(this.table.options.dataReceiveParams));\n\t\t\t\t}\n\n\t\t\t\tvar rowData = this.chain(\"data-loaded\", response, null, response);\n\n\t\t\t\tif(requestNo == this.requestOrder){\n\t\t\t\t\tthis.clearAlert();\n\n\t\t\t\t\tif(rowData !== false){\n\t\t\t\t\t\tthis.dispatchExternal(\"dataLoaded\", rowData);\n\t\t\t\t\t\tthis.table.rowManager.setData(rowData, replace, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made\");\n\t\t\t\t}\n\t\t\t}).catch((error) => {\n\t\t\t\tconsole.error(\"Data Load Error: \", error);\n\t\t\t\tthis.dispatchExternal(\"dataLoadError\", error);\n\n\t\t\t\tif(!silent){\n\t\t\t\t\tthis.alertError();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.clearAlert();\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\n\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.loading = false;\n\t\t\t\t});\n\t\t}else{\n\t\t\tthis.dispatchExternal(\"dataLoaded\", data);\n\n\t\t\tif(!data){\n\t\t\t\tdata = [];\n\t\t\t}\n\n\t\t\tthis.table.rowManager.setData(data, replace, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\n\t\t\treturn Promise.resolve();\n\t\t}\n\t}\n\n\tmapParams(params, map){\n\t\tvar output = {};\n\n\t\tfor(let key in params){\n\t\t\toutput[map.hasOwnProperty(key) ? map[key] : key] = params[key];\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tobjectInvert(obj){\n\t\tvar output = {};\n\n\t\tfor(let key in obj){\n\t\t\toutput[obj[key]] = key;\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tblockActiveLoad(){\n\t\tthis.requestOrder++;\n\t}\n\n\talertLoader(){\n\t\tvar shouldLoad = typeof this.table.options.dataLoader === \"function\" ? this.table.options.dataLoader() : this.table.options.dataLoader;\n\n\t\tif(shouldLoad){\n\t\t\tthis.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\n\t\t}\n\t}\n\n\talertError(){\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\n\t}\n\n\tclearAlert(){\n\t\tthis.table.alertManager.clear();\n\t}\n}","export default class ExternalEventBus {\n\n\tconstructor(table, optionsList, debug){\n\t\tthis.table = table;\n\t\tthis.events = {};\n\t\tthis.optionsList = optionsList || {};\n\t\tthis.subscriptionNotifiers = {};\n\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\n\t\tthis.debug = debug;\n\t}\n\n\tsubscriptionChange(key, callback){\n\t\tif(!this.subscriptionNotifiers[key]){\n\t\t\tthis.subscriptionNotifiers[key] = [];\n\t\t}\n\n\t\tthis.subscriptionNotifiers[key].push(callback);\n\n\t\tif(this.subscribed(key)){\n\t\t\tthis._notifySubscriptionChange(key, true);\n\t\t}\n\t}\n\n\tsubscribe(key, callback){\n\t\tif(!this.events[key]){\n\t\t\tthis.events[key] = [];\n\t\t}\n\n\t\tthis.events[key].push(callback);\n\n\t\tthis._notifySubscriptionChange(key, true);\n\t}\n\n\tunsubscribe(key, callback){\n\t\tvar index;\n\n\t\tif(this.events[key]){\n\t\t\tif(callback){\n\t\t\t\tindex = this.events[key].findIndex((item) => {\n\t\t\t\t\treturn item === callback;\n\t\t\t\t});\n\n\t\t\t\tif(index > -1){\n\t\t\t\t\tthis.events[key].splice(index, 1);\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdelete this.events[key];\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._notifySubscriptionChange(key, false);\n\t}\n\n\tsubscribed(key){\n\t\treturn this.events[key] && this.events[key].length;\n\t}\n\n\t_notifySubscriptionChange(key, subscribed){\n\t\tvar notifiers = this.subscriptionNotifiers[key];\n\n\t\tif(notifiers){\n\t\t\tnotifiers.forEach((callback)=>{\n\t\t\t\tcallback(subscribed);\n\t\t\t});\n\t\t}\n\t}\n\n\t_dispatch(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args.shift(),\n\t\tresult;\n\n\t\tif(this.events[key]){\n\t\t\tthis.events[key].forEach((callback, i) => {\n\t\t\t\tlet callResult = callback.apply(this.table, args);\n\n\t\t\t\tif(!i){\n\t\t\t\t\tresult = callResult;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t_debugDispatch(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args[0];\n\n\t\targs[0] = \"ExternalEvent:\" + args[0];\n\n\t\tif(this.debug === true || this.debug.includes(key)){\n\t\t\tconsole.log(...args);\n\t\t}\n\n\t\treturn this._dispatch(...arguments);\n\t}\n}","export default class InternalEventBus {\n\n\tconstructor(debug){\n\t\tthis.events = {};\n\t\tthis.subscriptionNotifiers = {};\n\n\t\tthis.dispatch = debug ? this._debugDispatch.bind(this) : this._dispatch.bind(this);\n\t\tthis.chain = debug ? this._debugChain.bind(this) : this._chain.bind(this);\n\t\tthis.confirm = debug ? this._debugConfirm.bind(this) : this._confirm.bind(this);\n\t\tthis.debug = debug;\n\t}\n\n\tsubscriptionChange(key, callback){\n\t\tif(!this.subscriptionNotifiers[key]){\n\t\t\tthis.subscriptionNotifiers[key] = [];\n\t\t}\n\n\t\tthis.subscriptionNotifiers[key].push(callback);\n\n\t\tif(this.subscribed(key)){\n\t\t\tthis._notifySubscriptionChange(key, true);\n\t\t}\n\t}\n\n\tsubscribe(key, callback, priority = 10000){\n\t\tif(!this.events[key]){\n\t\t\tthis.events[key] = [];\n\t\t}\n\n\t\tthis.events[key].push({callback, priority});\n\n\t\tthis.events[key].sort((a, b) => {\n\t\t\treturn a.priority - b.priority;\n\t\t});\n\n\t\tthis._notifySubscriptionChange(key, true);\n\t}\n\n\tunsubscribe(key, callback){\n\t\tvar index;\n\n\t\tif(this.events[key]){\n\t\t\tif(callback){\n\t\t\t\tindex = this.events[key].findIndex((item) => {\n\t\t\t\t\treturn item.callback === callback;\n\t\t\t\t});\n\n\t\t\t\tif(index > -1){\n\t\t\t\t\tthis.events[key].splice(index, 1);\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Cannot remove event, no matching event found:\", key, callback);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.warn(\"Cannot remove event, no events set on:\", key);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._notifySubscriptionChange(key, false);\n\t}\n\n\tsubscribed(key){\n\t\treturn this.events[key] && this.events[key].length;\n\t}\n\n\t_chain(key, args, initialValue, fallback){\n\t\tvar value = initialValue;\n\n\t\tif(!Array.isArray(args)){\n\t\t\targs = [args];\n\t\t}\n\n\t\tif(this.subscribed(key)){\n\t\t\tthis.events[key].forEach((subscriber, i) => {\n\t\t\t\tvalue = subscriber.callback.apply(this, args.concat([value]));\n\t\t\t});\n\n\t\t\treturn value;\n\t\t}else{\n\t\t\treturn typeof fallback === \"function\" ? fallback() : fallback;\n\t\t}\n\t}\n\n\t_confirm(key, args){\n\t\tvar confirmed = false;\n\n\t\tif(!Array.isArray(args)){\n\t\t\targs = [args];\n\t\t}\n\n\t\tif(this.subscribed(key)){\n\t\t\tthis.events[key].forEach((subscriber, i) => {\n\t\t\t\tif(subscriber.callback.apply(this, args)){\n\t\t\t\t\tconfirmed = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn confirmed;\n\t}\n\n\t_notifySubscriptionChange(key, subscribed){\n\t\tvar notifiers = this.subscriptionNotifiers[key];\n\n\t\tif(notifiers){\n\t\t\tnotifiers.forEach((callback)=>{\n\t\t\t\tcallback(subscribed);\n\t\t\t});\n\t\t}\n\t}\n\n\t_dispatch(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args.shift();\n\n\t\tif(this.events[key]){\n\t\t\tthis.events[key].forEach((subscriber) => {\n\t\t\t\tsubscriber.callback.apply(this, args);\n\t\t\t});\n\t\t}\n\t}\n\n\t_debugDispatch(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args[0];\n\n\t\targs[0] = \"InternalEvent:\" + key;\n\n\t\tif(this.debug === true || this.debug.includes(key)){\n\t\t\tconsole.log(...args);\n\t\t}\n\n\t\treturn this._dispatch(...arguments);\n\t}\n\n\t_debugChain(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args[0];\n\n\t\targs[0] = \"InternalEvent:\" + key;\n\n\t\tif(this.debug === true || this.debug.includes(key)){\n\t\t\tconsole.log(...args);\n\t\t}\n\n\t\treturn this._chain(...arguments);\n\t}\n\n\t_debugConfirm(){\n\t\tvar args = Array.from(arguments),\n\t\tkey = args[0];\n\n\t\targs[0] = \"InternalEvent:\" + key;\n\n\t\tif(this.debug === true || this.debug.includes(key)){\n\t\t\tconsole.log(...args);\n\t\t}\n\n\t\treturn this._confirm(...arguments);\n\t}\n}","import CoreFeature from '../CoreFeature.js';\n\nexport default class DeprecationAdvisor extends CoreFeature{\n\t\n\tconstructor(table){\n\t\tsuper(table);\n\t}\n\t\n\t_warnUser(){\n\t\tif(this.options(\"debugDeprecation\")){\n\t\t\tconsole.warn(...arguments);\n\t\t}\n\t}\n\t\n\tcheck(oldOption, newOption){\n\t\tvar msg = \"\";\n\t\t\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\n\t\t\t\n\t\t\tif(newOption){\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\n\t\t\t}else{\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\tcheckMsg(oldOption, msg){\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\n\t\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\tmsg(msg){\n\t\tthis._warnUser(msg);\n\t}\n}","import Tabulator from '../Tabulator.js';\n\nclass TableRegistry {\n\n\tstatic register(table){\n\t\tTableRegistry.tables.push(table);\n\t}\n\n\tstatic deregister(table){\n\t\tvar index = TableRegistry.tables.indexOf(table);\n\n\t\tif(index > -1){\n\t\t\tTableRegistry.tables.splice(index, 1);\n\t\t}\n\t}\n\n\tstatic lookupTable(query, silent){\n\t\tvar results = [],\n\t\tmatches, match;\n\n\t\tif(typeof query === \"string\"){\n\t\t\tmatches = document.querySelectorAll(query);\n\n\t\t\tif(matches.length){\n\t\t\t\tfor(var i = 0; i < matches.length; i++){\n\t\t\t\t\tmatch = TableRegistry.matchElement(matches[i]);\n\n\t\t\t\t\tif(match){\n\t\t\t\t\t\tresults.push(match);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}else if((typeof HTMLElement !== \"undefined\" && query instanceof HTMLElement) || query instanceof Tabulator){\n\t\t\tmatch = TableRegistry.matchElement(query);\n\n\t\t\tif(match){\n\t\t\t\tresults.push(match);\n\t\t\t}\n\t\t}else if(Array.isArray(query)){\n\t\t\tquery.forEach(function(item){\n\t\t\t\tresults = results.concat(TableRegistry.lookupTable(item));\n\t\t\t});\n\t\t}else{\n\t\t\tif(!silent){\n\t\t\t\tconsole.warn(\"Table Connection Error - Invalid Selector\", query);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\tstatic matchElement(element){\n\t\treturn TableRegistry.tables.find(function(table){\n\t\t\treturn element instanceof Tabulator ? table === element : table.element === element;\n\t\t});\n\t}\n}\n\nTableRegistry.tables = [];\n\nexport default TableRegistry;","//resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable\nexport default function(columns, forced){\n\tcolumns.forEach(function(column){\n\t\tcolumn.reinitializeWidth();\n\t});\n\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\n\t\tthis.table.modules.responsiveLayout.update();\n\t}\n}","import fitData from './modes/fitData.js';\nimport fitDataGeneral from './modes/fitDataGeneral.js';\nimport fitDataStretch from './modes/fitDataStretch.js';\nimport fitColumns from './modes/fitColumns.js';\n\nexport default {\n\tfitData:fitData,\n\tfitDataFill:fitDataGeneral,\n\tfitDataTable:fitDataGeneral,\n\tfitDataStretch:fitDataStretch,\n\tfitColumns:fitColumns ,\n};","//resize columns to fit data they contain\nexport default function(columns, forced){\n\tif(forced){\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\n\t}\n\t\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\n\t\tthis.table.modules.responsiveLayout.update();\n\t}\n}","//resize columns to fit data the contain and stretch last column to fill table\nexport default function(columns, forced){\n\tvar colsWidth = 0,\n\ttableWidth = this.table.rowManager.element.clientWidth,\n\tgap = 0,\n\tlastCol = false;\n\n\tcolumns.forEach((column, i) => {\n\t\tif(!column.widthFixed){\n\t\t\tcolumn.reinitializeWidth();\n\t\t}\n\n\t\tif(this.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible){\n\t\t\tlastCol = column;\n\t\t}\n\n\t\tif(column.visible){\n\t\t\tcolsWidth += column.getWidth();\n\t\t}\n\t});\n\n\tif(lastCol){\n\t\tgap = tableWidth - colsWidth + lastCol.getWidth();\n\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\n\t\t\tlastCol.setWidth(0);\n\t\t\tthis.table.modules.responsiveLayout.update();\n\t\t}\n\n\t\tif(gap > 0){\n\t\t\tlastCol.setWidth(gap);\n\t\t}else{\n\t\t\tlastCol.reinitializeWidth();\n\t\t}\n\t}else{\n\t\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\n\t\t\tthis.table.modules.responsiveLayout.update();\n\t\t}\n\t}\n}","//resize columns to fit\nexport default function(columns, forced){\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //table element width\n\tvar fixedWidth = 0; //total width of columns with a defined width\n\tvar flexWidth = 0; //total width available to flexible columns\n\tvar flexGrowUnits = 0; //total number of widthGrow blocks across all columns\n\tvar flexColWidth = 0; //desired width of flexible columns\n\tvar flexColumns = []; //array of flexible width columns\n\tvar fixedShrinkColumns = []; //array of fixed width columns that can shrink\n\tvar flexShrinkUnits = 0; //total number of widthShrink blocks across all columns\n\tvar overflowWidth = 0; //horizontal overflow width\n\tvar gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps\n\n\tfunction calcWidth(width){\n\t\tvar colWidth;\n\n\t\tif(typeof(width) == \"string\"){\n\t\t\tif(width.indexOf(\"%\") > -1){\n\t\t\t\tcolWidth = (totalWidth / 100) * parseInt(width);\n\t\t\t}else{\n\t\t\t\tcolWidth = parseInt(width);\n\t\t\t}\n\t\t}else{\n\t\t\tcolWidth = width;\n\t\t}\n\n\t\treturn colWidth;\n\t}\n\n\t//ensure columns resize to take up the correct amount of space\n\tfunction scaleColumns(columns, freeSpace, colWidth, shrinkCols){\n\t\tvar oversizeCols = [],\n\t\toversizeSpace = 0,\n\t\tremainingSpace = 0,\n\t\tnextColWidth = 0,\n\t\tremainingFlexGrowUnits = flexGrowUnits,\n\t\tgap = 0,\n\t\tchangeUnits = 0,\n\t\tundersizeCols = [];\n\n\t\tfunction calcGrow(col){\n\t\t\treturn (colWidth * (col.column.definition.widthGrow || 1));\n\t\t}\n\n\t\tfunction calcShrink(col){\n\t\t\treturn (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0)));\n\t\t}\n\n\t\tcolumns.forEach(function(col, i){\n\t\t\tvar width = shrinkCols ? calcShrink(col) : calcGrow(col);\n\t\t\tif(col.column.minWidth >= width){\n\t\t\t\toversizeCols.push(col);\n\t\t\t}else{\n\t\t\t\tif(col.column.maxWidth && col.column.maxWidth < width){\n\t\t\t\t\tcol.width = col.column.maxWidth;\n\t\t\t\t\tfreeSpace -= col.column.maxWidth;\n\n\t\t\t\t\tremainingFlexGrowUnits -= shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\n\n\t\t\t\t\tif(remainingFlexGrowUnits){\n\t\t\t\t\t\tcolWidth = Math.floor(freeSpace/remainingFlexGrowUnits);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tundersizeCols.push(col);\n\t\t\t\t\tchangeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif(oversizeCols.length){\n\t\t\toversizeCols.forEach(function(col){\n\t\t\t\toversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth;\n\t\t\t\tcol.width = col.column.minWidth;\n\t\t\t});\n\n\t\t\tremainingSpace = freeSpace - oversizeSpace;\n\n\t\t\tnextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace;\n\n\t\t\tgap = scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols);\n\t\t}else{\n\t\t\tgap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace;\n\n\t\t\tundersizeCols.forEach(function(column){\n\t\t\t\tcolumn.width = shrinkCols ? calcShrink(column) : calcGrow(column);\n\t\t\t});\n\t\t}\n\n\t\treturn gap;\n\t}\n\n\tif(this.table.options.responsiveLayout && this.table.modExists(\"responsiveLayout\", true)){\n\t\tthis.table.modules.responsiveLayout.update();\n\t}\n\n\t//adjust for vertical scrollbar if present\n\tif(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){\n\t\ttotalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth;\n\t}\n\n\tcolumns.forEach(function(column){\n\t\tvar width, minWidth, colWidth;\n\n\t\tif(column.visible){\n\n\t\t\twidth = column.definition.width;\n\t\t\tminWidth = parseInt(column.minWidth);\n\n\t\t\tif(width){\n\n\t\t\t\tcolWidth = calcWidth(width);\n\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\n\n\t\t\t\tif(column.definition.widthShrink){\n\t\t\t\t\tfixedShrinkColumns.push({\n\t\t\t\t\t\tcolumn:column,\n\t\t\t\t\t\twidth:colWidth > minWidth ? colWidth : minWidth\n\t\t\t\t\t});\n\t\t\t\t\tflexShrinkUnits += column.definition.widthShrink;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tflexColumns.push({\n\t\t\t\t\tcolumn:column,\n\t\t\t\t\twidth:0,\n\t\t\t\t});\n\t\t\t\tflexGrowUnits += column.definition.widthGrow || 1;\n\t\t\t}\n\t\t}\n\t});\n\n\t//calculate available space\n\tflexWidth = totalWidth - fixedWidth;\n\n\t//calculate correct column size\n\tflexColWidth = Math.floor(flexWidth / flexGrowUnits);\n\n\t//generate column widths\n\tgapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false);\n\n\t//increase width of last column to account for rounding errors\n\tif(flexColumns.length && gapFill > 0){\n\t\tflexColumns[flexColumns.length-1].width += gapFill;\n\t}\n\n\t//calculate space for columns to be shrunk into\n\tflexColumns.forEach(function(col){\n\t\tflexWidth -= col.width;\n\t});\n\n\toverflowWidth = Math.abs(gapFill) + flexWidth;\n\n\t//shrink oversize columns if there is no available space\n\tif(overflowWidth > 0 && flexShrinkUnits){\n\t\tgapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true);\n\t}\n\n\t//decrease width of last column to account for rounding errors\n\tif(gapFill && fixedShrinkColumns.length){\n\t\tfixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill;\n\t}\n\n\tflexColumns.forEach(function(col){\n\t\tcol.column.setWidth(col.width);\n\t});\n\n\tfixedShrinkColumns.forEach(function(col){\n\t\tcol.column.setWidth(col.width);\n\t});\n}\n","import Module from '../../core/Module.js';\n\nimport defaultModes from './defaults/modes.js';\n\nclass Layout extends Module{\n\n\tconstructor(table){\n\t\tsuper(table, \"layout\");\n\n\t\tthis.mode = null;\n\n\t\tthis.registerTableOption(\"layout\", \"fitData\"); //layout type\n\t\tthis.registerTableOption(\"layoutColumnsOnNewData\", false); //update column widths on setData\n\n\t\tthis.registerColumnOption(\"widthGrow\");\n\t\tthis.registerColumnOption(\"widthShrink\");\n\t}\n\n\t//initialize layout system\n\tinitialize(){\n\t\tvar layout = this.table.options.layout;\n\n\t\tif(Layout.modes[layout]){\n\t\t\tthis.mode = layout;\n\t\t}else{\n\t\t\tconsole.warn(\"Layout Error - invalid mode set, defaulting to 'fitData' : \" + layout);\n\t\t\tthis.mode = 'fitData';\n\t\t}\n\n\t\tthis.table.element.setAttribute(\"tabulator-layout\", this.mode);\n\t}\n\n\tgetMode(){\n\t\treturn this.mode;\n\t}\n\n\t//trigger table layout\n\tlayout(dataChanged){\n\t\tthis.dispatch(\"layout-refreshing\");\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\n\t\tthis.dispatch(\"layout-refreshed\");\n\t}\n}\n\nLayout.moduleName = \"layout\";\n\n//load defaults\nLayout.modes = defaultModes;\n\nexport default Layout;","import Module from '../../core/Module.js';\n\nimport Helpers from '../../core/tools/Helpers.js';\n\nimport defaultLangs from './defaults/langs.js';\n\nclass Localize extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\n\t\tthis.locale = \"default\"; //current locale\n\t\tthis.lang = false; //current language\n\t\tthis.bindings = {}; //update events to call when locale is changed\n\t\tthis.langList = {};\n\n\t\tthis.registerTableOption(\"locale\", false); //current system language\n\t\tthis.registerTableOption(\"langs\", {});\n\t}\n\n\tinitialize(){\n\t\tthis.langList = Helpers.deepClone(Localize.langs);\n\n\t\tif(this.table.options.columnDefaults.headerFilterPlaceholder !== false){\n\t\t\tthis.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);\n\t\t}\n\n\t\tfor(let locale in this.table.options.langs){\n\t\t\tthis.installLang(locale, this.table.options.langs[locale]);\n\t\t}\n\n\t\tthis.setLocale(this.table.options.locale);\n\n\t\tthis.registerTableFunction(\"setLocale\", this.setLocale.bind(this));\n\t\tthis.registerTableFunction(\"getLocale\", this.getLocale.bind(this));\n\t\tthis.registerTableFunction(\"getLang\", this.getLang.bind(this));\n\t}\n\n\t//set header placeholder\n\tsetHeaderFilterPlaceholder(placeholder){\n\t\tthis.langList.default.headerFilters.default = placeholder;\n\t}\n\n\t//setup a lang description object\n\tinstallLang(locale, lang){\n\t\tif(this.langList[locale]){\n\t\t\tthis._setLangProp(this.langList[locale], lang);\n\t\t}else{\n\t\t\tthis.langList[locale] = lang;\n\t\t}\n\t}\n\n\t_setLangProp(lang, values){\n\t\tfor(let key in values){\n\t\t\tif(lang[key] && typeof lang[key] == \"object\"){\n\t\t\t\tthis._setLangProp(lang[key], values[key]);\n\t\t\t}else{\n\t\t\t\tlang[key] = values[key];\n\t\t\t}\n\t\t}\n\t}\n\n\t//set current locale\n\tsetLocale(desiredLocale){\n\t\tdesiredLocale = desiredLocale || \"default\";\n\n\t\t//fill in any matching language values\n\t\tfunction traverseLang(trans, path){\n\t\t\tfor(var prop in trans){\n\t\t\t\tif(typeof trans[prop] == \"object\"){\n\t\t\t\t\tif(!path[prop]){\n\t\t\t\t\t\tpath[prop] = {};\n\t\t\t\t\t}\n\t\t\t\t\ttraverseLang(trans[prop], path[prop]);\n\t\t\t\t}else{\n\t\t\t\t\tpath[prop] = trans[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//determining correct locale to load\n\t\tif(desiredLocale === true && navigator.language){\n\t\t\t//get local from system\n\t\t\tdesiredLocale = navigator.language.toLowerCase();\n\t\t}\n\n\t\tif(desiredLocale){\n\t\t\t//if locale is not set, check for matching top level locale else use default\n\t\t\tif(!this.langList[desiredLocale]){\n\t\t\t\tlet prefix = desiredLocale.split(\"-\")[0];\n\n\t\t\t\tif(this.langList[prefix]){\n\t\t\t\t\tconsole.warn(\"Localization Error - Exact matching locale not found, using closest match: \", desiredLocale, prefix);\n\t\t\t\t\tdesiredLocale = prefix;\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Localization Error - Matching locale not found, using default: \", desiredLocale);\n\t\t\t\t\tdesiredLocale = \"default\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.locale = desiredLocale;\n\n\t\t//load default lang template\n\t\tthis.lang = Helpers.deepClone(this.langList.default || {});\n\n\t\tif(desiredLocale != \"default\"){\n\t\t\ttraverseLang(this.langList[desiredLocale], this.lang);\n\t\t}\n\n\t\tthis.dispatchExternal(\"localized\", this.locale, this.lang);\n\n\t\tthis._executeBindings();\n\t}\n\n\t//get current locale\n\tgetLocale(locale){\n\t\treturn this.locale;\n\t}\n\n\t//get lang object for given local or current if none provided\n\tgetLang(locale){\n\t\treturn locale ? this.langList[locale] : this.lang;\n\t}\n\n\t//get text for current locale\n\tgetText(path, value){\n\t\tvar fillPath = value ? path + \"|\" + value : path,\n\t\tpathArray = fillPath.split(\"|\"),\n\t\ttext = this._getLangElement(pathArray, this.locale);\n\n\t\t// if(text === false){\n\t\t// \tconsole.warn(\"Localization Error - Matching localized text not found for given path: \", path);\n\t\t// }\n\n\t\treturn text || \"\";\n\t}\n\n\t//traverse langs object and find localized copy\n\t_getLangElement(path, locale){\n\t\tvar root = this.lang;\n\n\t\tpath.forEach(function(level){\n\t\t\tvar rootPath;\n\n\t\t\tif(root){\n\t\t\t\trootPath = root[level];\n\n\t\t\t\tif(typeof rootPath != \"undefined\"){\n\t\t\t\t\troot = rootPath;\n\t\t\t\t}else{\n\t\t\t\t\troot = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn root;\n\t}\n\n\t//set update binding\n\tbind(path, callback){\n\t\tif(!this.bindings[path]){\n\t\t\tthis.bindings[path] = [];\n\t\t}\n\n\t\tthis.bindings[path].push(callback);\n\n\t\tcallback(this.getText(path), this.lang);\n\t}\n\n\t//iterate through bindings and trigger updates\n\t_executeBindings(){\n\t\tfor(let path in this.bindings){\n\t\t\tthis.bindings[path].forEach((binding) => {\n\t\t\t\tbinding(this.getText(path), this.lang);\n\t\t\t});\n\t\t}\n\t}\n}\n\nLocalize.moduleName = \"localize\";\n\n//load defaults\nLocalize.langs = defaultLangs;\n\nexport default Localize;","export default {\n\t\"default\":{ //hold default locale text\n\t\t\"groups\":{\n\t\t\t\"item\":\"item\",\n\t\t\t\"items\":\"items\",\n\t\t},\n\t\t\"columns\":{\n\t\t},\n\t\t\"data\":{\n\t\t\t\"loading\":\"Loading\",\n\t\t\t\"error\":\"Error\",\n\t\t},\n\t\t\"pagination\":{\n\t\t\t\"page_size\":\"Page Size\",\n\t\t\t\"page_title\":\"Show Page\",\n\t\t\t\"first\":\"First\",\n\t\t\t\"first_title\":\"First Page\",\n\t\t\t\"last\":\"Last\",\n\t\t\t\"last_title\":\"Last Page\",\n\t\t\t\"prev\":\"Prev\",\n\t\t\t\"prev_title\":\"Prev Page\",\n\t\t\t\"next\":\"Next\",\n\t\t\t\"next_title\":\"Next Page\",\n\t\t\t\"all\":\"All\",\n\t\t\t\"counter\":{\n\t\t\t\t\"showing\": \"Showing\",\n\t\t\t\t\"of\": \"of\",\n\t\t\t\t\"rows\": \"rows\",\n\t\t\t\t\"pages\": \"pages\",\n\t\t\t}\n\t\t},\n\t\t\"headerFilters\":{\n\t\t\t\"default\":\"filter column...\",\n\t\t\t\"columns\":{}\n\t\t}\n\t},\n};","import Module from '../../core/Module.js';\nimport TableRegistry from '../../core/tools/TableRegistry.js';\n\nclass Comms extends Module{\n\n\tconstructor(table){\n\t\tsuper(table);\n\t}\n\n\tinitialize(){\n\t\tthis.registerTableFunction(\"tableComms\", this.receive.bind(this));\n\t}\n\n\tgetConnections(selectors){\n\t\tvar connections = [],\n\t\tconnection;\n\n\t\tconnection = TableRegistry.lookupTable(selectors);\n\n\t\tconnection.forEach((con) =>{\n\t\t\tif(this.table !== con){\n\t\t\t\tconnections.push(con);\n\t\t\t}\n\t\t});\n\n\t\treturn connections;\n\t}\n\n\tsend(selectors, module, action, data){\n\t\tvar connections = this.getConnections(selectors);\n\n\t\tconnections.forEach((connection) => {\n\t\t\tconnection.tableComms(this.table.element, module, action, data);\n\t\t});\n\n\t\tif(!connections.length && selectors){\n\t\t\tconsole.warn(\"Table Connection Error - No tables matching selector found\", selectors);\n\t\t}\n\t}\n\n\treceive(table, module, action, data){\n\t\tif(this.table.modExists(module)){\n\t\t\treturn this.table.modules[module].commsReceived(table, action, data);\n\t\t}else{\n\t\t\tconsole.warn(\"Inter-table Comms Error - no such module:\", module);\n\t\t}\n\t}\n}\n\nComms.moduleName = \"comms\";\n\nexport default Comms;","import * as coreModules from '../modules/core.js';\nimport TableRegistry from './TableRegistry.js';\n\nexport default class ModuleBinder {\n\t\n\tconstructor(tabulator, modules){\n\t\tthis.bindStaticFunctionality(tabulator);\n\t\tthis.bindModules(tabulator, coreModules, true);\n\t\t\n\t\tif(modules){\n\t\t\tthis.bindModules(tabulator, modules);\n\t\t}\n\t}\n\t\n\tbindStaticFunctionality(tabulator){\n\t\ttabulator.moduleBindings = {};\n\t\t\n\t\ttabulator.extendModule = function(name, property, values){\n\t\t\tif(tabulator.moduleBindings[name]){\n\t\t\t\tvar source = tabulator.moduleBindings[name][property];\n\t\t\t\t\n\t\t\t\tif(source){\n\t\t\t\t\tif(typeof values == \"object\"){\n\t\t\t\t\t\tfor(let key in values){\n\t\t\t\t\t\t\tsource[key] = values[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.warn(\"Module Error - Invalid value type, it must be an object\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn(\"Module Error - property does not exist:\", property);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Module Error - module does not exist:\", name);\n\t\t\t}\n\t\t};\n\t\t\n\t\ttabulator.registerModule = function(modules){\n\t\t\tif(!Array.isArray(modules)){\n\t\t\t\tmodules = [modules];\n\t\t\t}\n\t\t\t\n\t\t\tmodules.forEach((mod) => {\n\t\t\t\ttabulator.registerModuleBinding(mod);\n\t\t\t});\n\t\t};\n\t\t\n\t\ttabulator.registerModuleBinding = function(mod){\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\n\t\t};\n\t\t\n\t\ttabulator.findTable = function(query){\n\t\t\tvar results = TableRegistry.lookupTable(query, true);\n\t\t\treturn Array.isArray(results) && !results.length ? false : results;\n\t\t};\n\t\t\n\t\t//ensure that module are bound to instantiated function\n\t\ttabulator.prototype.bindModules = function(){\n\t\t\tvar orderedStartMods = [],\n\t\t\torderedEndMods = [],\n\t\t\tunOrderedMods = [];\n\t\t\t\n\t\t\tthis.modules = {};\n\t\t\t\n\t\t\tfor(var name in tabulator.moduleBindings){\n\t\t\t\tlet mod = tabulator.moduleBindings[name];\n\t\t\t\tlet module = new mod(this);\n\t\t\t\t\n\t\t\t\tthis.modules[name] = module;\n\t\t\t\t\n\t\t\t\tif(mod.prototype.moduleCore){\n\t\t\t\t\tthis.modulesCore.push(module);\n\t\t\t\t}else{\n\t\t\t\t\tif(mod.moduleInitOrder){\n\t\t\t\t\t\tif(mod.moduleInitOrder < 0){\n\t\t\t\t\t\t\torderedStartMods.push(module);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\torderedEndMods.push(module);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tunOrderedMods.push(module);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\n\t\t\t\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\n\t\t};\n\t}\n\t\n\tbindModules(tabulator, modules, core){\n\t\tvar mods = Object.values(modules);\n\t\t\n\t\tif(core){\n\t\t\tmods.forEach((mod) => {\n\t\t\t\tmod.prototype.moduleCore = true;\n\t\t\t});\n\t\t}\n\t\t\n\t\ttabulator.registerModule(mods);\n\t}\n}","import CoreFeature from '../CoreFeature.js';\n\nexport default class Alert extends CoreFeature{\n\tconstructor(table){\n\t\tsuper(table);\n \n\t\tthis.element = this._createAlertElement();\n\t\tthis.msgElement = this._createMsgElement();\n\t\tthis.type = null;\n \n\t\tthis.element.appendChild(this.msgElement);\n\t}\n \n\t_createAlertElement(){\n\t\tvar el = document.createElement(\"div\");\n\t\tel.classList.add(\"tabulator-alert\");\n\t\treturn el;\n\t}\n \n\t_createMsgElement(){\n\t\tvar el = document.createElement(\"div\");\n\t\tel.classList.add(\"tabulator-alert-msg\");\n\t\tel.setAttribute(\"role\", \"alert\");\n\t\treturn el;\n\t}\n \n\t_typeClass(){\n\t\treturn \"tabulator-alert-state-\" + this.type;\n\t}\n \n\talert(content, type = \"msg\"){\n\t\tif(content){\n\t\t\tthis.clear();\n \n\t\t\tthis.type = type;\n \n\t\t\twhile(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild);\n \n\t\t\tthis.msgElement.classList.add(this._typeClass());\n \n\t\t\tif(typeof content === \"function\"){\n\t\t\t\tcontent = content();\n\t\t\t}\n \n\t\t\tif(content instanceof HTMLElement){\n\t\t\t\tthis.msgElement.appendChild(content);\n\t\t\t}else{\n\t\t\t\tthis.msgElement.innerHTML = content;\n\t\t\t}\n \n\t\t\tthis.table.element.appendChild(this.element);\n\t\t}\n\t}\n \n\tclear(){\n\t\tif(this.element.parentNode){\n\t\t\tthis.element.parentNode.removeChild(this.element);\n\t\t}\n \n\t\tthis.msgElement.classList.remove(this._typeClass());\n\t}\n}","'use strict';\n\nimport defaultOptions from './defaults/options.js';\n\nimport ColumnManager from './ColumnManager.js';\nimport RowManager from './RowManager.js';\nimport FooterManager from './FooterManager.js';\n\nimport InteractionMonitor from './tools/InteractionMonitor.js';\nimport ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';\nimport DataLoader from './tools/DataLoader.js';\n\nimport ExternalEventBus from './tools/ExternalEventBus.js';\nimport InternalEventBus from './tools/InternalEventBus.js';\n\nimport DeprecationAdvisor from './tools/DeprecationAdvisor.js';\n\nimport TableRegistry from './tools/TableRegistry.js';\nimport ModuleBinder from './tools/ModuleBinder.js';\n\nimport OptionsList from './tools/OptionsList.js';\n\nimport Alert from './tools/Alert.js';\n\nclass Tabulator {\n\t\n\tconstructor(element, options){\n\t\t\n\t\tthis.options = {};\n\t\t\n\t\tthis.columnManager = null; // hold Column Manager\n\t\tthis.rowManager = null; //hold Row Manager\n\t\tthis.footerManager = null; //holder Footer Manager\n\t\tthis.alertManager = null; //hold Alert Manager\n\t\tthis.vdomHoz = null; //holder horizontal virtual dom\n\t\tthis.externalEvents = null; //handle external event messaging\n\t\tthis.eventBus = null; //handle internal event messaging\n\t\tthis.interactionMonitor = false; //track user interaction\n\t\tthis.browser = \"\"; //hold current browser type\n\t\tthis.browserSlow = false; //handle reduced functionality for slower browsers\n\t\tthis.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance\n\t\tthis.rtl = false; //check if the table is in RTL mode\n\t\tthis.originalElement = null; //hold original table element if it has been replaced\n\t\t\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\n\t\tthis.dataLoader = false; //bind component functions\n\t\t\n\t\tthis.modules = {}; //hold all modules bound to this table\n\t\tthis.modulesCore = []; //hold core modules bound to this table (for initialization purposes)\n\t\tthis.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)\n\t\t\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\n\t\t\n\t\tthis.initialized = false;\n\t\tthis.destroyed = false;\n\t\t\n\t\tif(this.initializeElement(element)){\n\t\t\t\n\t\t\tthis.initializeCoreSystems(options);\n\t\t\t\n\t\t\t//delay table creation to allow event bindings immediately after the constructor\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis._create();\n\t\t\t});\n\t\t}\n\t\t\n\t\tTableRegistry.register(this); //register table for inter-device communication\n\t}\n\t\n\tinitializeElement(element){\n\t\tif(typeof HTMLElement !== \"undefined\" && element instanceof HTMLElement){\n\t\t\tthis.element = element;\n\t\t\treturn true;\n\t\t}else if(typeof element === \"string\"){\n\t\t\tthis.element = document.querySelector(element);\n\t\t\t\n\t\t\tif(this.element){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tconsole.error(\"Tabulator Creation Error - no element found matching selector: \", element);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.error(\"Tabulator Creation Error - Invalid element provided:\", element);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\tinitializeCoreSystems(options){\n\t\tthis.columnManager = new ColumnManager(this);\n\t\tthis.rowManager = new RowManager(this);\n\t\tthis.footerManager = new FooterManager(this);\n\t\tthis.dataLoader = new DataLoader(this);\n\t\tthis.alertManager = new Alert(this);\n\t\t\n\t\tthis.bindModules();\n\t\t\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\n\t\t\n\t\tthis._clearObjectPointers();\n\t\t\n\t\tthis._mapDeprecatedFunctionality();\n\t\t\n\t\tthis.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);\n\t\tthis.eventBus = new InternalEventBus(this.options.debugEventsInternal);\n\t\t\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\n\t\t\n\t\tthis.dataLoader.initialize();\n\t\t// this.columnManager.initialize();\n\t\t// this.rowManager.initialize();\n\t\tthis.footerManager.initialize();\n\t}\n\t\n\t//convert deprecated functionality to new functions\n\t_mapDeprecatedFunctionality(){\n\t\t//all previously deprecated functionality removed in the 5.0 release\n\t}\n\t\n\t_clearSelection(){\n\t\t\n\t\tthis.element.classList.add(\"tabulator-block-select\");\n\t\t\n\t\tif (window.getSelection) {\n\t\t\tif (window.getSelection().empty) { // Chrome\n\t\t\t\twindow.getSelection().empty();\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\n\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t}\n\t\t} else if (document.selection) { // IE?\n\t\t\tdocument.selection.empty();\n\t\t}\n\t\t\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\n\t}\n\t\n\t//create table\n\t_create(){\n\t\tthis.externalEvents.dispatch(\"tableBuilding\");\n\t\tthis.eventBus.dispatch(\"table-building\");\n\t\t\n\t\tthis._rtlCheck();\n\t\t\n\t\tthis._buildElement();\n\t\t\n\t\tthis._initializeTable();\n\t\t\n\t\tthis._loadInitialData();\n\t\t\n\t\tthis.initialized = true;\n\t\t\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\n\t}\n\t\n\t_rtlCheck(){\n\t\tvar style = window.getComputedStyle(this.element);\n\t\t\n\t\tswitch(this.options.textDirection){\n\t\t\tcase\"auto\":\n\t\t\t\tif(style.direction !== \"rtl\"){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\tcase \"rtl\":\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\n\t\t\t\tthis.rtl = true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"ltr\":\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthis.rtl = false;\n\t\t}\n\t}\n\t\n\t//clear pointers to objects in default config object\n\t_clearObjectPointers(){\n\t\tthis.options.columns = this.options.columns.slice(0);\n\t\t\n\t\tif(Array.isArray(this.options.data) && !this.options.reactiveData){\n\t\t\tthis.options.data = this.options.data.slice(0);\n\t\t}\n\t}\n\t\n\t//build tabulator element\n\t_buildElement(){\n\t\tvar element = this.element,\n\t\toptions = this.options,\n\t\tnewElement;\n\t\t\n\t\tif(element.tagName === \"TABLE\"){\n\t\t\tthis.originalElement = this.element;\n\t\t\tnewElement = document.createElement(\"div\");\n\t\t\t\n\t\t\t//transfer attributes to new element\n\t\t\tvar attributes = element.attributes;\n\t\t\t\n\t\t\t// loop through attributes and apply them on div\n\t\t\tfor(var i in attributes){\n\t\t\t\tif(typeof attributes[i] == \"object\"){\n\t\t\t\t\tnewElement.setAttribute(attributes[i].name, attributes[i].value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// replace table with div element\n\t\t\telement.parentNode.replaceChild(newElement, element);\n\t\t\t\n\t\t\tthis.element = element = newElement;\n\t\t}\n\t\t\n\t\telement.classList.add(\"tabulator\");\n\t\telement.setAttribute(\"role\", \"grid\");\n\t\t\n\t\t//empty element\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\t\t\n\t\t//set table height\n\t\tif(options.height){\n\t\t\toptions.height = isNaN(options.height) ? options.height : options.height + \"px\";\n\t\t\telement.style.height = options.height;\n\t\t}\n\t\t\n\t\t//set table min height\n\t\tif(options.minHeight !== false){\n\t\t\toptions.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + \"px\";\n\t\t\telement.style.minHeight = options.minHeight;\n\t\t}\n\t\t\n\t\t//set table maxHeight\n\t\tif(options.maxHeight !== false){\n\t\t\toptions.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + \"px\";\n\t\t\telement.style.maxHeight = options.maxHeight;\n\t\t}\n\t}\n\t\n\t//initialize core systems and modules\n\t_initializeTable(){\n\t\tvar element = this.element,\n\t\toptions = this.options;\n\t\t\n\t\tthis.interactionMonitor.initialize();\n\t\t\n\t\tthis.columnManager.initialize();\n\t\tthis.rowManager.initialize();\n\t\t\n\t\tthis._detectBrowser();\n\t\t\n\t\t//initialize core modules\n\t\tthis.modulesCore.forEach((mod) => {\n\t\t\tmod.initialize();\n\t\t});\n\t\t\n\t\t//build table elements\n\t\telement.appendChild(this.columnManager.getElement());\n\t\telement.appendChild(this.rowManager.getElement());\n\t\t\n\t\tif(options.footerElement){\n\t\t\tthis.footerManager.activate();\n\t\t}\n\t\t\n\t\tif(options.autoColumns && options.data){\n\t\t\t\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\n\t\t}\n\t\t\n\t\t//initialize regular modules\n\t\tthis.modulesRegular.forEach((mod) => {\n\t\t\tmod.initialize();\n\t\t});\n\t\t\n\t\tthis.columnManager.setColumns(options.columns);\n\t\t\n\t\tthis.eventBus.dispatch(\"table-built\");\n\t}\n\t\n\t_loadInitialData(){\n\t\tthis.dataLoader.load(this.options.data);\n\t}\n\t\n\t//deconstructor\n\tdestroy(){\n\t\tvar element = this.element;\n\t\t\n\t\tthis.destroyed = true;\n\t\t\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\n\t\t\n\t\tthis.eventBus.dispatch(\"table-destroy\");\n\t\t\n\t\t//clear row data\n\t\tthis.rowManager.destroy();\n\t\t\n\t\t//clear DOM\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\n\t\telement.classList.remove(\"tabulator\");\n\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\n\t}\n\t\n\t_detectBrowser(){\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\n\t\t\n\t\tif(ua.indexOf(\"Trident\") > -1){\n\t\t\tthis.browser = \"ie\";\n\t\t\tthis.browserSlow = true;\n\t\t}else if(ua.indexOf(\"Edge\") > -1){\n\t\t\tthis.browser = \"edge\";\n\t\t\tthis.browserSlow = true;\n\t\t}else if(ua.indexOf(\"Firefox\") > -1){\n\t\t\tthis.browser = \"firefox\";\n\t\t\tthis.browserSlow = false;\n\t\t}else if(ua.indexOf(\"Mac OS\") > -1){\n\t\t\tthis.browser = \"safari\";\n\t\t\tthis.browserSlow = false;\n\t\t}else{\n\t\t\tthis.browser = \"other\";\n\t\t\tthis.browserSlow = false;\n\t\t}\n\t\t\n\t\tthis.browserMobile = /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ua.slice(0,4));\n\t}\n\t\n\tinitGuard(func, msg){\n\t\tvar stack, line;\n\t\t\n\t\tif(this.options.debugInitialization && !this.initialized){\n\t\t\tif(!func){\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\n\t\t\t\t\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\n\t\t\t\t\n\t\t\t\tif(line[0] == \" \"){\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\n\t\t\t\t}else{\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\n\t\t}\n\t\t\n\t\treturn this.initialized;\n\t}\n\t\n\t////////////////// Data Handling //////////////////\n\t//block table redrawing\n\tblockRedraw(){\n\t\tthis.initGuard();\n\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\n\t\t\n\t\tthis.rowManager.blockRedraw();\n\t\tthis.columnManager.blockRedraw();\n\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\n\t}\n\t\n\t//restore table redrawing\n\trestoreRedraw(){\n\t\tthis.initGuard();\n\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\n\n\t\tthis.rowManager.restoreRedraw();\n\t\tthis.columnManager.restoreRedraw();\n\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\n\t}\n\t\n\t//load data\n\tsetData(data, params, config){\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\n\t\t\n\t\treturn this.dataLoader.load(data, params, config, false);\n\t}\n\t\n\t//clear data\n\tclearData(){\n\t\tthis.initGuard();\n\t\t\n\t\tthis.dataLoader.blockActiveLoad();\n\t\tthis.rowManager.clearData();\n\t}\n\t\n\t//get table data array\n\tgetData(active){\n\t\treturn this.rowManager.getData(active);\n\t}\n\t\n\t//get table data array count\n\tgetDataCount(active){\n\t\treturn this.rowManager.getDataCount(active);\n\t}\n\t\n\t//replace data, keeping table in position with same sort\n\treplaceData(data, params, config){\n\t\tthis.initGuard();\n\t\t\n\t\treturn this.dataLoader.load(data, params, config, true, true);\n\t}\n\t\n\t//update table data\n\tupdateData(data){\n\t\tvar responses = 0;\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.dataLoader.blockActiveLoad();\n\t\t\t\n\t\t\tif(typeof data === \"string\"){\n\t\t\t\tdata = JSON.parse(data);\n\t\t\t}\n\t\t\t\n\t\t\tif(data && data.length > 0){\n\t\t\t\tdata.forEach((item) => {\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\n\t\t\t\t\t\n\t\t\t\t\tif(row){\n\t\t\t\t\t\tresponses++;\n\t\t\t\t\t\t\n\t\t\t\t\t\trow.updateData(item)\n\t\t\t\t\t\t\t.then(()=>{\n\t\t\t\t\t\t\t\tresponses--;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!responses){\n\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.catch((e) => {\n\t\t\t\t\t\t\t\treject(\"Update Error - Unable to update row\", item, e);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\treject(\"Update Error - Unable to find row\", item);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\n\t\t\t\treject(\"Update Error - No data provided\");\n\t\t\t}\n\t\t});\n\t}\n\t\n\taddData(data, pos, index){\n\t\tthis.initGuard();\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.dataLoader.blockActiveLoad();\n\t\t\t\n\t\t\tif(typeof data === \"string\"){\n\t\t\t\tdata = JSON.parse(data);\n\t\t\t}\n\t\t\t\n\t\t\tif(data){\n\t\t\t\tthis.rowManager.addRows(data, pos, index)\n\t\t\t\t\t.then((rows) => {\n\t\t\t\t\t\tvar output = [];\n\t\t\t\t\t\n\t\t\t\t\t\trows.forEach(function(row){\n\t\t\t\t\t\t\toutput.push(row.getComponent());\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\tresolve(output);\n\t\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\n\t\t\t\treject(\"Update Error - No data provided\");\n\t\t\t}\n\t\t});\n\t}\n\t\n\t//update table data\n\tupdateOrAddData(data){\n\t\tvar rows = [],\n\t\tresponses = 0;\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.dataLoader.blockActiveLoad();\n\t\t\t\n\t\t\tif(typeof data === \"string\"){\n\t\t\t\tdata = JSON.parse(data);\n\t\t\t}\n\t\t\t\n\t\t\tif(data && data.length > 0){\n\t\t\t\tdata.forEach((item) => {\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\n\t\t\t\t\t\n\t\t\t\t\tresponses++;\n\t\t\t\t\t\n\t\t\t\t\tif(row){\n\t\t\t\t\t\trow.updateData(item)\n\t\t\t\t\t\t\t.then(()=>{\n\t\t\t\t\t\t\t\tresponses--;\n\t\t\t\t\t\t\t\trows.push(row.getComponent());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!responses){\n\t\t\t\t\t\t\t\t\tresolve(rows);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.rowManager.addRows(item)\n\t\t\t\t\t\t\t.then((newRows)=>{\n\t\t\t\t\t\t\t\tresponses--;\n\t\t\t\t\t\t\t\trows.push(newRows[0].getComponent());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!responses){\n\t\t\t\t\t\t\t\t\tresolve(rows);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\n\t\t\t\treject(\"Update Error - No data provided\");\n\t\t\t}\n\t\t});\n\t}\n\t\n\t//get row object\n\tgetRow(index){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tif(row){\n\t\t\treturn row.getComponent();\n\t\t}else{\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", index);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t//get row object\n\tgetRowFromPosition(position){\n\t\tvar row = this.rowManager.getRowFromPosition(position);\n\t\t\n\t\tif(row){\n\t\t\treturn row.getComponent();\n\t\t}else{\n\t\t\tconsole.warn(\"Find Error - No matching row found:\", position);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t//delete row from table\n\tdeleteRow(index){\n\t\tvar foundRows = [];\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(!Array.isArray(index)){\n\t\t\tindex = [index];\n\t\t}\n\t\t\n\t\t//find matching rows\n\t\tfor(let item of index){\n\t\t\tlet row = this.rowManager.findRow(item, true);\n\t\t\t\n\t\t\tif(row){\n\t\t\t\tfoundRows.push(row);\n\t\t\t}else{\n\t\t\t\tconsole.error(\"Delete Error - No matching row found:\", item);\n\t\t\t\treturn Promise.reject(\"Delete Error - No matching row found\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//sort rows into correct order to ensure smooth delete from table\n\t\tfoundRows.sort((a, b) => {\n\t\t\treturn this.rowManager.rows.indexOf(a) > this.rowManager.rows.indexOf(b) ? 1 : -1;\n\t\t});\n\t\t\n\t\t//delete rows\n\t\tfoundRows.forEach((row) =>{\n\t\t\trow.delete();\n\t\t});\n\t\t\n\t\tthis.rowManager.reRenderInPosition();\n\t\t\n\t\treturn Promise.resolve();\n\t}\n\t\n\t//add row to table\n\taddRow(data, pos, index){\n\t\tthis.initGuard();\n\t\t\n\t\tif(typeof data === \"string\"){\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\t\t\n\t\treturn this.rowManager.addRows(data, pos, index, true)\n\t\t\t.then((rows)=>{\n\t\t\t\treturn rows[0].getComponent();\n\t\t\t});\n\t}\n\t\n\t//update a row if it exists otherwise create it\n\tupdateOrAddRow(index, data){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(typeof data === \"string\"){\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\t\t\n\t\tif(row){\n\t\t\treturn row.updateData(data)\n\t\t\t\t.then(()=>{\n\t\t\t\t\treturn row.getComponent();\n\t\t\t\t});\n\t\t}else{\n\t\t\treturn this.rowManager.addRows(data)\n\t\t\t\t.then((rows)=>{\n\t\t\t\t\treturn rows[0].getComponent();\n\t\t\t\t});\n\t\t}\n\t}\n\t\n\t//update row data\n\tupdateRow(index, data){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(typeof data === \"string\"){\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\t\t\n\t\tif(row){\n\t\t\treturn row.updateData(data)\n\t\t\t\t.then(()=>{\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\n\t\t\t\t});\n\t\t}else{\n\t\t\tconsole.warn(\"Update Error - No matching row found:\", index);\n\t\t\treturn Promise.reject(\"Update Error - No matching row found\");\n\t\t}\n\t}\n\t\n\t//scroll to row in DOM\n\tscrollToRow(index, position, ifVisible){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tif(row){\n\t\t\treturn this.rowManager.scrollToRow(row, position, ifVisible);\n\t\t}else{\n\t\t\tconsole.warn(\"Scroll Error - No matching row found:\", index);\n\t\t\treturn Promise.reject(\"Scroll Error - No matching row found\");\n\t\t}\n\t}\n\t\n\tmoveRow(from, to, after){\n\t\tvar fromRow = this.rowManager.findRow(from);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(fromRow){\n\t\t\tfromRow.moveToRow(to, after);\n\t\t}else{\n\t\t\tconsole.warn(\"Move Error - No matching row found:\", from);\n\t\t}\n\t}\n\t\n\tgetRows(active){\n\t\treturn this.rowManager.getComponents(active);\t\n\t}\n\t\n\t//get position of row in table\n\tgetRowPosition(index){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tif(row){\n\t\t\treturn row.getPosition();\n\t\t}else{\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/////////////// Column Functions ///////////////\n\tsetColumns(definition){\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\n\t\t\n\t\tthis.columnManager.setColumns(definition);\n\t}\n\t\n\tgetColumns(structured){\n\t\treturn this.columnManager.getComponents(structured);\n\t}\n\t\n\tgetColumn(field){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tif(column){\n\t\t\treturn column.getComponent();\n\t\t}else{\n\t\t\tconsole.warn(\"Find Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\tgetColumnDefinitions(){\n\t\treturn this.columnManager.getDefinitionTree();\n\t}\n\t\n\tshowColumn(field){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(column){\n\t\t\tcolumn.show();\n\t\t}else{\n\t\t\tconsole.warn(\"Column Show Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\thideColumn(field){\n\t\tvar column = this.columnManager.findColumn(field); \n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(column){\n\t\t\tcolumn.hide();\n\t\t}else{\n\t\t\tconsole.warn(\"Column Hide Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\ttoggleColumn(field){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(column){\n\t\t\tif(column.visible){\n\t\t\t\tcolumn.hide();\n\t\t\t}else{\n\t\t\t\tcolumn.show();\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.warn(\"Column Visibility Toggle Error - No matching column found:\", field);\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\taddColumn(definition, before, field){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\treturn this.columnManager.addColumn(definition, before, column)\n\t\t\t.then((column) => {\n\t\t\t\treturn column.getComponent();\n\t\t\t});\n\t}\n\t\n\tdeleteColumn(field){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(column){\n\t\t\treturn column.delete();\n\t\t}else{\n\t\t\tconsole.warn(\"Column Delete Error - No matching column found:\", field);\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\tupdateColumnDefinition(field, definition){\n\t\tvar column = this.columnManager.findColumn(field);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(column){\n\t\t\treturn column.updateDefinition(definition);\n\t\t}else{\n\t\t\tconsole.warn(\"Column Update Error - No matching column found:\", field);\n\t\t\treturn Promise.reject();\n\t\t}\n\t}\n\t\n\tmoveColumn(from, to, after){\n\t\tvar fromColumn = this.columnManager.findColumn(from),\n\t\ttoColumn = this.columnManager.findColumn(to);\n\t\t\n\t\tthis.initGuard();\n\t\t\n\t\tif(fromColumn){\n\t\t\tif(toColumn){\n\t\t\t\tthis.columnManager.moveColumn(fromColumn, toColumn, after);\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Move Error - No matching column found:\", toColumn);\n\t\t\t}\n\t\t}else{\n\t\t\tconsole.warn(\"Move Error - No matching column found:\", from);\n\t\t}\n\t}\n\t\n\t//scroll to column in DOM\n\tscrollToColumn(field, position, ifVisible){\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tvar column = this.columnManager.findColumn(field);\n\t\t\t\n\t\t\tif(column){\n\t\t\t\treturn this.columnManager.scrollToColumn(column, position, ifVisible);\n\t\t\t}else{\n\t\t\t\tconsole.warn(\"Scroll Error - No matching column found:\", field);\n\t\t\t\treturn Promise.reject(\"Scroll Error - No matching column found\");\n\t\t\t}\n\t\t});\n\t}\n\t\n\t//////////// General Public Functions ////////////\n\t//redraw list without updating data\n\tredraw(force){\n\t\tthis.initGuard();\n\n\t\tthis.columnManager.redraw(force);\n\t\tthis.rowManager.redraw(force);\n\t}\n\t\n\tsetHeight(height){\n\t\tthis.options.height = isNaN(height) ? height : height + \"px\";\n\t\tthis.element.style.height = this.options.height;\n\t\tthis.rowManager.initializeRenderer();\n\t\tthis.rowManager.redraw();\n\t}\n\t\n\t//////////////////// Event Bus ///////////////////\n\t\n\ton(key, callback){\n\t\tthis.externalEvents.subscribe(key, callback);\n\t}\n\t\n\toff(key, callback){\n\t\tthis.externalEvents.unsubscribe(key, callback);\n\t}\n\t\n\tdispatchEvent(){\n\t\tvar args = Array.from(arguments);\n\t\targs.shift();\n\t\t\n\t\tthis.externalEvents.dispatch(...arguments);\n\t}\n\n\t//////////////////// Alerts ///////////////////\n\n\talert(contents, type){\n\t\tthis.initGuard();\n\n\t\tthis.alertManager.alert(contents, type);\n\t}\n\n\tclearAlert(){\n\t\tthis.initGuard();\n\n\t\tthis.alertManager.clear();\n\t}\n\t\n\t////////////// Extension Management //////////////\n\tmodExists(plugin, required){\n\t\tif(this.modules[plugin]){\n\t\t\treturn true;\n\t\t}else{\n\t\t\tif(required){\n\t\t\t\tconsole.error(\"Tabulator Module Not Installed: \" + plugin);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\tmodule(key){\n\t\tvar mod = this.modules[key];\n\t\t\n\t\tif(!mod){\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\n\t\t}\n\t\t\n\t\treturn mod;\n\t}\n}\n\n//default setup options\nTabulator.defaultOptions = defaultOptions;\n\n//bind modules and static functionality\nnew ModuleBinder(Tabulator);\n\nexport default Tabulator;\n","export default {\n\n\tdebugEventsExternal:false, //flag to console log events\n\tdebugEventsInternal:false, //flag to console log events\n\tdebugInvalidOptions:true, //allow toggling of invalid option warnings\n\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\n\tdebugDeprecation:true, //allow toggling of deprecation warnings\n\n\theight:false, //height of tabulator\n\tminHeight:false, //minimum height of tabulator\n\tmaxHeight:false, //maximum height of tabulator\n\n\tcolumnHeaderVertAlign:\"top\", //vertical alignment of column headers\n\n\tpopupContainer:false,\n\n\tcolumns:[],//store for colum header info\n\tcolumnDefaults:{}, //store column default props\n\n\tdata:false, //default starting data\n\n\tautoColumns:false, //build columns from data row structure\n\tautoColumnsDefinitions:false,\n\n\tnestedFieldSeparator:\".\", //separator for nested data\n\n\tfooterElement:false, //hold footer element\n\n\tindex:\"id\", //filed for row index\n\n\ttextDirection:\"auto\",\n\n\taddRowPos:\"bottom\", //position to insert blank rows, top|bottom\n\n\theaderVisible:true, //hide header\n\n\trenderVertical:\"virtual\",\n\trenderHorizontal:\"basic\",\n\trenderVerticalBuffer:0, // set virtual DOM buffer size\n\n\tscrollToRowPosition:\"top\",\n\tscrollToRowIfVisible:true,\n\n\tscrollToColumnPosition:\"left\",\n\tscrollToColumnIfVisible:true,\n\n\trowFormatter:false,\n\trowFormatterPrint:null,\n\trowFormatterClipboard:null,\n\trowFormatterHtmlOutput:null,\n\n\trowHeight:null,\n\n\tplaceholder:false,\n\n\tdataLoader:true,\n\tdataLoaderLoading:false,\n\tdataLoaderError:false,\n\tdataLoaderErrorTimeout:3000,\n\n\tdataSendParams:{},\n\n\tdataReceiveParams:{},\n};\n","//tabulator with all modules installed\nimport {default as Tabulator} from './Tabulator.js';\nimport * as modules from '../core/modules/optional.js';\nimport ModuleBinder from './tools/ModuleBinder.js';\n\nclass TabulatorFull extends Tabulator {}\n\n//bind modules and static functionality\nnew ModuleBinder(TabulatorFull, modules);\n\nexport default TabulatorFull;","export default class PseudoRow {\n\n\tconstructor (type){\n\t\tthis.type = type;\n\t\tthis.element = this._createElement();\n\t}\n\n\t_createElement(){\n\t\tvar el = document.createElement(\"div\");\n\t\tel.classList.add(\"tabulator-row\");\n\t\treturn el;\n\t}\n\n\tgetElement(){\n\t\treturn this.element;\n\t}\n\n\tgetComponent(){\n\t\treturn false;\n\t}\n\n\tgetData(){\n\t\treturn {};\n\t}\n\n\tgetHeight(){\n\t\treturn this.element.outerHeight;\n\t}\n\n\tinitialize(){}\n\n\treinitialize(){}\n\n\tnormalizeHeight(){}\n\n\tgenerateCells(){}\n\n\treinitializeHeight(){}\n\n\tcalcHeight(){}\n\n\tsetCellHeight(){}\n\n\tclearCellHeight(){}\n}"],"names":["CoreFeature","constructor","table","this","reloadData","data","silent","columnsChanged","dataLoader","load","undefined","langText","modules","localize","getText","arguments","langBind","bind","langLocale","getLocale","commsConnections","comms","getConnections","commsSend","send","layoutMode","layout","getMode","layoutRefresh","force","subscribe","eventBus","unsubscribe","subscribed","key","subscriptionChange","dispatch","chain","confirm","dispatchExternal","externalEvents","subscribedExternal","subscriptionChangeExternal","options","setOption","value","deprecationCheck","oldOption","newOption","deprecationAdvisor","check","deprecationCheckMsg","msg","checkMsg","deprecationMsg","module","Helpers","static","el","offsetWidth","offsetHeight","box","getBoundingClientRect","top","window","pageYOffset","document","documentElement","clientTop","left","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","i","Object","assign","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","Popup","element","parent","super","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","visible","hideable","classList","add","blurEvent","hide","escEvent","_escapeCheck","destroyBinding","tableDestroyed","destroyed","popupContainer","querySelector","console","warn","_checkContainerIsParent","body","parentNode","renderCallback","callback","containerEventCoords","e","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elOffset","elementPositionCoords","position","containerOffset","offset","show","origin","parentEl","coords","HTMLElement","style","appendChild","_fitToScreen","addEventListener","stopPropagation","scrollTop","right","Math","max","scrollHeight","parseInt","isVisible","hideOnBlur","setTimeout","rowManager","keyCode","blockHide","restoreHide","removeEventListener","removeChild","child","Module","name","_handler","initialize","registerTableOption","optionsList","register","registerColumnOption","columnManager","registerTableFunction","func","args","initGuard","registerComponentFunction","component","handler","componentFunctionBinder","registerDataHandler","priority","registerDataPipelineHandler","registerDisplayHandler","registerDisplayPipelineHandler","displayRows","adjust","lookupIndex","index","length","displayPipeline","getDisplayRows","activeRows","refreshData","renderInPosition","refreshActiveData","footerAppend","footerManager","append","footerPrepend","prepend","footerRemove","remove","popup","menuEl","menuContainer","alert","content","type","alertManager","clearAlert","clear","Accessor","allowedTypes","initializeColumn","transformRow","column","config","forEach","accessor","charAt","toUpperCase","slice","definition","lookupAccessor","params","accessors","row","rowComponent","getComponent","traverse","colComponent","getFieldValue","setFieldValue","moduleName","generateParamsList","prefix","output","concat","push","serializeParams","encoded","encodeURIComponent","join","url","keys","method","toLowerCase","includes","json","headers","JSON","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","call","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","then","ajaxResponse","Promise","reject","contentType","resolve","ajaxContentType","Accept","mode","location","credentials","fetch","response","ok","catch","error","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","setData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","rowData","columns","col","getKey","range","internal","sel","textRange","getSelection","createRange","selectNodeContents","toString","removeAllRanges","addRange","selection","createTextRange","moveToElementText","select","execCommand","action","pasteActions","parser","pasteParsers","rows","checkPaseOrigin","getPasteData","modExists","mutateData","mutator","valid","target","tagName","edit","currentCell","getData","replace","update","updateOrAddData","insert","addData","headerFindSuccess","columnMap","split","find","title","trim","field","columnsByIndex","shift","CalcComponent","_row","Proxy","get","receiver","handle","transform","getElement","getTable","getCells","cells","cell","getCell","_getSelf","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","getField","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","oldValue","height","width","minWidth","loaded","build","generateElement","setWidth","_configureCell","createElement","className","setAttribute","textAlign","hozAlign","vertAlign","display","alignItems","bottom","middle","justifyContent","center","cssClass","_generateContents","val","innerHTML","Node","firstChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","changed","widthStyled","clearWidth","getWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","delete","redrawBlock","deleteCell","calcs","getIndex","getCellIndex","ColumnComponent","_column","getDefinition","getTitleDownload","isGroup","toggle","getSubColumns","getParentColumn","Column","scrollTo","scrollToColumn","move","to","after","toColumn","findColumn","moveColumn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","result","reinitializeWidth","rerenderColumns","maxInitialWidth","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","columnHeaderVertAlign","defaults","columnDefaults","generate","defaultOptionList","checkDefinition","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","_buildColumnHeaderTitle","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","splice","setWidthActual","isNaN","floor","clientWidth","min","checkCellHeights","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","getLeftOffset","offsetLeft","ceil","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","addColumn","defaultOptions","RowComponent","getPosition","watchPosition","scrollToRow","moveToRow","updateData","normalizeHeight","reformat","reinitialize","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","initialized","positionWatchers","created","create","detachElement","generateCells","deleteCells","renderer","renderRowCells","rowFormatter","rerenderRowCells","deinitialize","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","elVisible","tempData","parse","attrname","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","before","toRow","findRow","moveRowActual","deleteActual","blockRedraw","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","avg","values","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","topRow","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","scrollHorizontal","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","visibleRows","adjustForScrollbar","restoreRedraw","resizeHolderWidth","getResults","userRecalc","headersElement","recalc","redraw","blockCheck","viewable","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","adjustTableSize","reinitializeCalcs","getContentsElement","insertBefore","nextSibling","scrollLeft","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","pos","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","results","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","groups","rtl","paddingLeft","paddingRight","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","initializeRow","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","getRows","reinitializeRowChildren","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","marginRight","marginLeft","getComputedStyle","getPropertyValue","oldControl","replaceChild","getChildren","allChildren","generateChildren","dataTreeFilter","filter","dataTreeSort","sort","sub","childData","childRow","getTreeParentRoot","childIndex","findChildIndex","recurse","getChildField","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","compression","compress","generateSheet","merges","worksheet","s","c","r","a","b","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","active","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","mimeType","Blob","deprecatedOptionsCheck","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","blob","downloadEncoder","URL","createObjectURL","navigator","msSaveOrOpenBlob","click","commsReceived","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","ctrlKey","metaKey","maskAutoFill","placeholder","defaultDownloaders","Edit","editor","onRendered","success","cancel","editorParams","_initializeParams","displayItems","currentItems","focusedItem","input","_createInputElement","listEl","_createListElement","initialValues","isFilter","filterTimeout","filtered","typing","listIteration","lastAction","filterTerm","actions","_deprecatedOptionsCheck","_initializeValue","_onRendered","listItemFormatter","sortValuesList","searchFunc","searchingPlaceholder","defaultValue","multiselect","headerFilterInitialListGen","cellEl","clickStop","preventScroll","_preventPopupBlur","_preventBlur","_inputKeyDown","_setListWidth","attribs","elementAttributes","clearable","padding","boxSizing","autocomplete","cursor","caretColor","getAttribute","_bindInputEvents","valueCheck","valueKeys","verticalNavigation","placeholderLoading","placeholderEmpty","filterDelay","emptyValue","freetext","filterFunc","filterRemote","allowEmpty","listOnEmpty","valuesLookup","valuesURL","_inputFocus","_inputClick","_inputBlur","_inputSearch","_inputKeyUp","rebuildOptionsList","_filter","clearTimeout","_filterList","_resolveValue","_clearChoices","_keyUp","_keyDown","_keySide","_keyEnter","_keyEsc","_keyHomeEnd","_keySelectLetter","_keyAutoCompLetter","stopImmediatePropagation","_focusItem","_chooseItem","_cancel","_scrollToValue","character","fromCharCode","label","startsWith","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","getColumnByField","inputValues","entries","map","_parseListItem","option","level","_parseListGroup","itemParams","selected","original","sorter","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","test","_defaultFilterFunc","_filterItem","matches","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","resize","heightNow","shiftKey","shiftEnterSubmit","selectionStart","number","step","blurFunc","date","inputFormat","DT","DateTime","luxon","convertDate","isDateTime","fromISO","fromFormat","toFormat","luxDate","toISO","relatedTarget","rangeParent","explicitOriginalTarget","time","newDatetime","luxTime","datetime","luxDateTime","List","star","self","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","browser","buildStar","starHolder","nextStar","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","trueValueSet","falseValueSet","marginTop","checkedValue","checked","trueValue","falseValue","indeterminate","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellIsEdited","clearEdited","editCell","cellCancelEdit","bindEditor","updateCellClass","columnDeleteCheck","rowDeleteCheck","rowEditableCheck","cancelEdit","keybindingNavigateNext","newRow","addRow","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","getRenderMode","topEdge","bottomEdge","rowEl","offsetTop","leftEdge","rightEdge","leftMargin","rightMargin","renderHorizontal","vDomPadLeft","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","getVisibleRows","selectRow","selectedRows","pagination","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","visProp","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","generateHeaderElement","generateGroupElement","generateCalcElement","generateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","cellStyle","cellWrapper","formatCells","formatExportValue","align","holder","htmlOutputConfig","from","props","lookup","color","fromStyle","prop","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","headerFilters","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","searchRows","searchData","userSetFilter","userRefreshFilter","userAddFilter","getFilters","userSetHeaderFilterFocus","userGetHeaderFilterValue","userSetHeaderFilterValue","getHeaderFilters","userRemoveFilter","userClearFilter","userClearHeaderFilter","setHeaderFilterFocus","reloadHeaderFilter","getHeaderFilterValue","setHeaderFilterValue","initializeColumnHeaderFilter","hideHeaderFilterElements","showHeaderFilterElements","tableBuilt","filterMode","remoteFilterParams","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","onRenderedCallback","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterPlaceholder","contentsElement","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","hasChanged","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","abs","link","urlPrefix","labelField","labelTraverse","path","urlField","image","src","urlSuffix","empty","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","diff","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","responsiveLayout","toggleList","isOpen","rowSelection","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","leftColumns","rightColumns","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","margin","edge","frozenCheck","frozen","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","reinitializeRows","getTableElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","styleRow","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","old","elementContents","arrowElement","createElements","addBindings","createValueGroups","elementsOnly","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","toIndex","updateGroupRows","scrollHeader","getRowIndex","removeRow","groupValues","generateGroupHeaderContents","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","prev","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","_blockRedrawing","_restore_redrawing","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","lang","items","getRealColumns","lookupFunc","prevValue","tableElement","assignRowToGroup","moveRowInArray","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","onlyGroupHeaders","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","addRowActual","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","originalElement","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","attributes","optionsArr","attrib","_attribValue","_findCol","exists","textContent","registeredDefaults","inQuote","nextChar","array","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","err","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","autoColumns","structureArrayToObject","structureArrayToColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowMouseDown","rowMouseUp","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellMouseDown","cellMouseUp","cellTap","cellDblTap","cellTapHold","headerClick","headerDblClick","headerContext","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","headerMouseDown","headerMouseUp","headerTap","headerDblTap","headerTapHold","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupMouseDown","groupMouseUp","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tap","tapDbl","tapHold","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChanged","added","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","dispatchEvent","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","bindings","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","binding","mapBinding","symbolsList","ctrl","meta","code","checkBinding","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","displayRowsCount","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","on","rowClickMenu","rowDblClickMenu","groupContextMenu","groupClickMenu","groupDblClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerDblClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","dblClickMenu","headerMenuEl","icon","headerMenuIcon","menu","loadMenu","parentPopup","itemEl","disabled","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","colEl","mousemove","which","startMove","bindTouchEvents","nextColWidth","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","moveColumnActual","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connection","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connections","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","query","prototype","querySelectorAll","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromRow","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","links","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","footerRedraw","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","testElRow","testElCell","paginationSize","visibility","generatePageSizeSelectList","setPageSize","dir","loading","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","start","end","actualStartRow","actualRowPageSize","actualRows","finally","last_page","last_row","addRows","progressiveLoadDelay","footer","containerElement","scrollWidth","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","setItem","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","localStorageTest","testKey","removeItem","persistence","retrievedData","persistenceMode","persistenceID","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retrieveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","setColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","definitions","excludedKeys","defStore","colDef","moduleInitOrder","defaultReaders","defaultWriters","_componentPopupCall","loadPopupEvent","rowContextPopup","rowClickPopup","rowDblClickPopup","groupContextPopup","groupClickPopup","groupDblClickPopup","headerContextPopup","loadPopupTableColumnEvent","headerClickPopup","headerDblClickPopup","headerPopup","initializeColumnHeaderPopup","contextPopup","loadPopupTableCellEvent","clickPopup","dblClickPopup","headerPopupEl","headerPopupIcon","loadPopup","contentsEl","Print","manualBlock","beforeprintEventHandler","afterprintEventHandler","printAsHtml","replaceTable","cleanup","destroy","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","reactiveData","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","apply","getRowFromDataObject","pop","startRow","newRows","reverse","oldRows","reRenderInPosition","writable","watchKey","watchTreeChildren","childField","rebuildTree","unwatchRow","ResizeColumns","startColumn","startWidth","latestX","initialNextColumn","layoutColumnHeader","initializeEventWatchers","layoutCellHandles","deInitializeComponent","resizeHandle","columnLayoutUpdated","deInitializeColumn","columnWidthUpdated","resizable","reinitializeColumn","frozenColumnOffset","frozenOffset","handleEl","nearestColumn","_checkResizability","handleDown","_mouseDown","oldWidth","parentElement","mouseMove","blockedBefore","blockedAfter","startDiff","moveDiff","resizableColumnFit","colWidth","browserSlow","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","tableWidth","containerHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","browserMobile","nodeHeight","contentRect","nodeWidth","redrawTable","observe","fixedHeight","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","responsive","order","generateCollapsedContent","hideColumn","colCount","showColumn","working","getFlexBaseWidth","headerVisible","activeRowsCount","renderEmptyScroll","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","prevSelected","_rowSelectionChanged","endSelect","checkRowSelectability","_clearSelection","lastClickedRowIdx","getDisplayRowIndex","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","selectableCheck","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","locale","localeCompare","boolean","calc","d","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortClickElement","headerSortElement","setColumnHeaderSortIcon","columnHeaderSortMulti","newSortList","findSorter","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","setColumnHeader","_sortItems","sortEl","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","Tooltip","tooltipSubscriber","headerSubscriber","timeout","popupInstance","headerTooltip","mousemoveCheck","mouseoutCheck","tooltip","clearPopup","loadTooltip","tooltipDelay","parameters","float","numeric","minLength","maxLength","unique","cellData","required","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","OptionsList","msgType","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","verticalFillMode","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","scrollColumns","scrollRows","scrollToRowNearestTop","includingBuffer","render","rerender","scrollToRowPosition","ifVisible","rowIndex","scrollToRowIfVisible","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","vDomScrollPosLeft","vDomScrollPosRight","vDomPadRight","fitDataColAvg","windowBuffer","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","cols","colPos","leftPos","rightPos","fitDataCheck","vdomHoz","reinitChanged","reinitializeRow","change","colEnd","otherRows","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","changes","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","appendCell","ColumnManager","blockHozScrollEvent","columnsByField","defaultColumnOptions","redrawBlockUpdate","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","padVerticalScrollbar","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","generateColumnsFromRowData","autoColumnsDefinitions","_addColumn","_reIndexColumns","nextToColumn","topColumn","parentIndex","nextEl","root","getDefinitions","getDefinitionTree","getComponents","structured","_moveColumnInArray","updateRows","fromIndex","scrollToColumnPosition","scrollToColumnIfVisible","totalWidth","fixedWidth","resetScroll","BasicVertical","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topOffset","tableEmpty","topDiff","bottomDiff","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topFound","bottomRow","forceMove","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholderContents","firstRender","renderMode","activeRowsPipeline","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","scrollbarWidth","initializePlaceholder","leftDir","topDir","_positionPlaceholder","getRowFromPosition","_setDataActual","_wipeElements","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","refreshDisplayOnly","findAddRowPos","_clearPlaceholder","addRowPos","chainResult","clearData","findRowIndex","rowOnly","getDataCount","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","_clearTable","_showPlaceholder","initialHeight","otherHeight","external","event","createEvent","initEvent","Event","FooterManager","createContainerElement","initializeElement","footerElement","activate","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","comp","clearWatchers","updateEventListeners","track","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","requestNo","alertLoader","mapParams","dataSendParams","objectInvert","dataReceiveParams","alertError","dataLoaderErrorTimeout","blockActiveLoad","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","callResult","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","matchElement","Tabulator","lookupTable","forced","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","modes","dataChanged","defaultModes","Localize","langList","langs","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","_setLangProp","desiredLocale","language","traverseLang","trans","_executeBindings","pathArray","_getLangElement","rootPath","page_size","page_title","first","first_title","last","last_title","prev_title","next","next_title","showing","of","Comms","receive","selectors","con","tableComms","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","textDirection","direction","newElement","_detectBrowser","deregister","ua","userAgent","vendor","opera","stack","line","debugInitialization","Error","replaceData","responses","foundRows","updateOrAddRow","updateRow","getRowPosition","getColumnDefinitions","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","off","plugin","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","TabulatorFull","PseudoRow","_createElement"],"mappings":";AAAe,MAAMA,EAEpBC,YAAYC,GACXC,KAAKD,MAAQA,EAOdE,WAAWC,EAAMC,EAAQC,GACxB,OAAOJ,KAAKD,MAAMM,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,EAAQC,GAOlFI,WACC,OAAOR,KAAKD,MAAMU,QAAQC,SAASC,WAAWC,WAG/CC,WACC,OAAOb,KAAKD,MAAMU,QAAQC,SAASI,QAAQF,WAG5CG,aACC,OAAOf,KAAKD,MAAMU,QAAQC,SAASM,aAAaJ,WAQjDK,mBACC,OAAOjB,KAAKD,MAAMU,QAAQS,MAAMC,kBAAkBP,WAGnDQ,YACC,OAAOpB,KAAKD,MAAMU,QAAQS,MAAMG,QAAQT,WAOzCU,aACC,OAAOtB,KAAKD,MAAMU,QAAQc,OAAOC,UAGlCC,cAAcC,GACb,OAAO1B,KAAKD,MAAMU,QAAQc,OAAOA,OAAOG,GAQzCC,YACC,O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