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.min.js.map | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/tabulator/js/tabulator.min.js.map (limited to 'static/tabulator/js/tabulator.min.js.map') diff --git a/static/tabulator/js/tabulator.min.js.map b/static/tabulator/js/tabulator.min.js.map new file mode 100644 index 0000000..855fa09 --- /dev/null +++ b/static/tabulator/js/tabulator.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tabulator.min.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/Column.js","../../src/js/core/tools/Helpers.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/row/RowComponent.js","../../src/js/core/row/Row.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/core/tools/Popup.js","../../src/js/core/Module.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/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/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/TabulatorFull.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}","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};","//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 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","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}","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}","//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","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;","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;","//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","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;","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","//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;"],"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","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","getCells","cells","forEach","cell","push","getComponent","isVisible","visible","show","isGroup","columns","hide","toggle","delete","getSubColumns","output","length","getParentColumn","parent","Column","_getSelf","scrollTo","columnManager","scrollToColumn","getTable","move","to","after","toColumn","findColumn","moveColumn","console","warn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","getWidth","setWidth","width","result","reinitializeWidth","rerenderColumns","title","field","hozAlign","vertAlign","minWidth","maxWidth","maxInitialWidth","cssClass","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","row","getData","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","super","element","oldValue","height","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","style","textAlign","display","alignItems","top","bottom","middle","justifyContent","left","right","center","definition","split","classList","add","_generateContents","val","innerHTML","Node","firstChild","removeChild","appendChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","call","rowManager","changed","setFieldValue","widthStyled","clearWidth","offsetWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getIndex","getCellIndex","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","el","columnHeaderVertAlign","defaults","columnDefaults","optionsList","generate","defaultOptionList","checkDefinition","Object","keys","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","parseInt","_buildColumnHeaderTitle","addEventListener","e","stopPropagation","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","traverse","concat","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","index","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","checkCellHeights","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","getLeftOffset","offset","offsetLeft","ceil","getBoundingClientRect","Promise","resolve","reject","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","error","assign","addColumn","then","defaultOptions","Helpers","static","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","register","option","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","initialize","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","callback","update","blockRedraw","renderRowCells","rerenderRowCells","scrollColumns","dir","scrollRows","resize","scrollToRow","scrollToRowNearestTop","visibleRows","includingBuffer","getDisplayRows","styleRow","rowEl","remove","clear","render","rerender","scrollToRowPosition","position","ifVisible","rowIndex","scrollToRowIfVisible","elVisible","elOffset","scrollHeight","scrollTop","offsetTop","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","startsWith","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","columnsByIndex","old","cols","colPos","config","frozen","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","deinitialize","change","generateCells","colEnd","col","getVisibleRows","otherRows","getRows","filter","includes","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","start","end","changes","working","getCell","insertBefore","nextSibling","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","frozenColumns","leftColumns","appendCell","rightColumns","ColumnManager","blockHozScrollEvent","headersElement","contentsElement","columnsByField","defaultColumnOptions","redrawBlockUpdate","renderer","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","scrollHorizontal","padVerticalScrollbar","rtl","marginLeft","marginRight","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","renderHorizontal","headerVisible","getContentsElement","generateColumnsFromRowData","sorter","definitions","autoColumnsDefinitions","find","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","adjustTableSize","HTMLElement","getColumnByField","getColumnsByFieldRoot","root","matches","getFirstVisibleColumn","getRealColumns","getDefinitions","active","getDefinitionTree","getComponents","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","updateRows","toIndex","fromIndex","adjust","scrollToColumnPosition","scrollToColumnIfVisible","scrollWidth","getFlexBaseWidth","totalWidth","fixedWidth","colWidth","restoreRedraw","resetScroll","footerManager","RowComponent","_row","transform","getPosition","watchPosition","moveToRow","updateData","normalizeHeight","reformat","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","positionWatchers","created","setData","create","detachElement","deleteCells","rowFormatter","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","tempData","JSON","parse","attrname","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","BasicVertical","visibility","onlyGroupHeaders","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","tableEmpty","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","scrollbarWidth","initializePlaceholder","getTableElement","leftDir","topDir","_positionPlaceholder","getRowFromDataObject","getRowFromPosition","renderInPosition","pagination","_setDataActual","reRenderInPosition","autoColumns","_wipeElements","destroy","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","addRow","pos","addRowActual","addRows","refreshDisplayOnly","findAddRowPos","reverse","_clearPlaceholder","addRowPos","chainResult","moveRow","moveRowInArray","clearData","getRowIndex","findRowIndex","getDisplayRowIndex","rowOnly","getDataCount","registerDataPipelineHandler","handler","priority","sort","a","b","registerDisplayPipelineHandler","skipStage","stage","cascadeOrder","destroyed","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","getRenderMode","_clearTable","renderEmptyScroll","_showPlaceholder","initialHeight","otherHeight","external","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","initializeElement","footerElement","querySelector","append","activate","prepend","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","links","values","comp","subscriptionChanged","clearWatchers","added","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","loading","params","replace","requestNo","alertLoader","mapParams","dataSendParams","response","objectInvert","dataReceiveParams","rowData","clearAlert","catch","alertError","setTimeout","dataLoaderErrorTimeout","finally","map","blockActiveLoad","alertManager","alert","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Popup","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","hideable","blurEvent","escEvent","_escapeCheck","destroyBinding","tableDestroyed","popupContainer","_checkContainerIsParent","body","renderCallback","containerEventCoords","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elementPositionCoords","containerOffset","origin","parentEl","coords","_fitToScreen","hideOnBlur","keyCode","blockHide","restoreHide","Module","_handler","registerTableOption","registerColumnOption","registerTableFunction","func","initGuard","registerComponentFunction","registerDataHandler","registerDisplayHandler","lookupIndex","refreshData","footerAppend","footerPrepend","footerRemove","popup","menuEl","menuContainer","content","forced","responsiveLayout","modExists","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","responsive","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","nextColWidth","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","mode","modes","dataChanged","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","headerFilters","_setLangProp","desiredLocale","navigator","language","toLowerCase","prefix","traverseLang","trans","prop","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","groups","items","page_size","page_title","first","first_title","last","last_title","prev","prev_title","next","next_title","all","counter","showing","of","pages","Comms","receive","selectors","connections","con","action","connection","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","browserSlow","browserMobile","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_clearSelection","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","textDirection","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","deregister","ua","userAgent","vendor","opera","test","stack","line","debugInitialization","Error","trim","replaceData","responses","addData","updateOrAddData","newRows","foundRows","updateOrAddRow","updateRow","fromRow","getRowPosition","getColumnDefinitions","showColumn","hideColumn","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","on","off","plugin","required","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","Accessor","allowedTypes","initializeColumn","transformRow","accessor","charAt","toUpperCase","lookupAccessor","accessors","rowComponent","colComponent","generateParamsList","serializeParams","encoded","encodeURIComponent","join","url","method","json","headers","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","ajaxResponse","contentType","ajaxContentType","Accept","location","credentials","fetch","ok","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","getKey","range","internal","sel","textRange","createRange","selectNodeContents","toString","addRange","createTextRange","moveToElementText","select","execCommand","pasteActions","parser","pasteParsers","checkPaseOrigin","getPasteData","mutateData","mutator","valid","edit","currentCell","insert","headerFindSuccess","columnMap","CalcComponent","avg","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","adjustForScrollbar","resizeHolderWidth","getResults","userRecalc","recalc","blockCheck","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","reinitializeCalcs","rowsToData","generateRow","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","reinitializeRowChildren","firstCol","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","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","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","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","msSaveOrOpenBlob","click","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","ctrlKey","metaKey","maskAutoFill","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","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","inputValues","entries","_parseListItem","_parseListGroup","itemParams","selected","original","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","_defaultFilterFunc","_filterItem","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","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","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","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","leftEdge","rightEdge","leftMargin","rightMargin","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","selectRow","selectedRows","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","htmlOutputConfig","props","lookup","color","fromStyle","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","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","clearFilter","clearHeaderFilter","headerFilter","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","onRenderedCallback","headerElement","headerFilterEmptyCheck","headerFilterParams","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","link","urlPrefix","labelField","labelTraverse","urlField","image","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","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","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","edge","frozenCheck","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","elementsOnly","arrow","movableRows","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","updateGroupRows","scrollHeader","removeRow","groupValues","generateGroupHeaderContents","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","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","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","_findCol","exists","textContent","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","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","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","mapBinding","symbolsList","ctrl","meta","code","checkBinding","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","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","mousemove","which","startMove","bindTouchEvents","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","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","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","actualStartRow","actualRowPageSize","actualRows","last_page","last_row","progressiveLoadDelay","footer","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","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","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","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","pop","startRow","oldRows","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","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","nodeHeight","contentRect","nodeWidth","redrawTable","observe","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","colCount","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","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","selectableCheck","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","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","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";0OAAe,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,OAAO3B,KAAKD,MAAM6B,SAASD,aAAaf,WAGzCiB,cACC,OAAO7B,KAAKD,MAAM6B,SAASC,eAAejB,WAG3CkB,WAAWC,GACV,OAAO/B,KAAKD,MAAM6B,SAASE,WAAWC,GAGvCC,qBACC,OAAOhC,KAAKD,MAAM6B,SAASI,sBAAsBpB,WAGlDqB,WACC,OAAOjC,KAAKD,MAAM6B,SAASK,YAAYrB,WAGxCsB,QACC,OAAOlC,KAAKD,MAAM6B,SAASM,SAAStB,WAGrCuB,UACC,OAAOnC,KAAKD,MAAM6B,SAASO,WAAWvB,WAGvCwB,mBACC,OAAOpC,KAAKD,MAAMsC,eAAeJ,YAAYrB,WAG9C0B,mBAAmBP,GAClB,OAAO/B,KAAKD,MAAMsC,eAAeP,WAAWC,GAG7CQ,6BACC,OAAOvC,KAAKD,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